---
title: "Implement a pipeline step converter"
slug: "implement-a-pipeline-step-converter"
abstract: "How to implement a pipeline step converter to convert the item into a plugin in Sitecore Data Exchange Framework."
---
# Implement a pipeline step converter

You must use a converter to convert the settings on a pipeline step item into a plugin. The plugin identifies the endpoint that the pipeline step will read from.

To implement a pipeline step converter:

1. In Visual Studio, add the following class:

    ```csharp
    using Sitecore.DataExchange.Attributes;
    using Sitecore.DataExchange.Converters.PipelineSteps;
    using Sitecore.DataExchange.Models;
    using Sitecore.DataExchange.Plugins;
    using Sitecore.DataExchange.Repositories;
    using Sitecore.Services.Core.Model;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    namespace Examples.DataExchange.Providers.FileSystem
    {
        [SupportedIds(ReadTextFileStepTemplateId)]
        public class ReadTextFileStepConverter : BasePipelineStepConverter
        {
            public const string ReadTextFileStepTemplateId = "[PIPELINE STEP TEMPLATE ID]";
            public const string TemplateFieldEndpointFrom = "EndpointFrom";
            public ReadTextFileStepConverter(IItemModelRepository repository) : base(repository)
            {
            }
            protected override void AddPlugins(ItemModel source, PipelineStep pipelineStep)
            {
                //
                //create the plugin
                var settings = new EndpointSettings
                {
                    //
                    //populate the plugin using values from the item
                    EndpointFrom = this.ConvertReferenceToModel<Endpoint>(source, TemplateFieldEndpointFrom)
                };
                //
                //add the plugin to the pipeline step
                pipelineStep.AddPlugin(settings);
            }
        }
    }
    ```

    > [!important]
    > You must change the value of `[PIPELINE STEP TEMPLATE ID]` to match the ID from the pipeline step template named *Read Text File Pipeline Step*.

    > [!note]
    > By inheriting from `[BasePipelineStepConverter](base-pipeline-step-converter.html "Base pipeline step converter")` you get access to a number of methods that facilitate reading values from fields on a Sitecore item.
    >
    > In addition to being able to read simple values like strings, numbers, and dates, methods are available to automatically convert referenced items into the appropriate Data Exchange Framework component.

2. Compile the project.
3. Deploy `Examples.DataExchange.Providers.FileSystem.dll` to the Sitecore server.