Walkthrough: Preparing Sitecore for a custom provider

Version: 8.0

This walkthrough is part one of the Implementing a custom provider for text files walkthrough series and describes how to prepare for constructing a custom provider.

Before you start preparing Sitecore, you must define the requirements for your provider. A good way to do this is to formulate user stories describing what you want to achieve.

The following user stories are examples of how to describe how someone responsible for building and managing synchronization processes uses text files:

  • I can specify a file to read from so that I can control which data is read.

  • I can specify whether or not the file contains a header row so that the provider does not impose constraints on the files it can read.

  • I can specify a limit to the number of rows to read from the file so that I can control the data that is read.

  • I can map the value from a column in the file to a field on a Sitecore item so I can populate Sitecore using data from the file.

When you have planned out what you want to achieve, you can begin preparing your project in Sitecore.

This walkthrough describes how to:

  • Create a Microsoft Visual Studio project

  • Create a provider in Sitecore

Create a Microsoft Visual Studio project

You must create a Microsoft Visual Studio project before you can implement the custom provider.

To create a Visual Studio project:

  1. In Visual Studio, create the following project:

    Project type

    Class Library (.NET Framework)

    .NET version

    .NET Framework 4.7.1

    Project name

    Examples.DataExchange.Providers.FileSystem

  2. Add references to the following NuGet package:

    • Sitecore.DataExchange

Note

Sitecore’s public NuGet feed is available at https://nuget.sitecore.com/resources/v3/index.json.

Create a provider in Sitecore

In Sitecore, a variety of templates and items must be created and configured for the provider. The Data Exchange Framework SDK automates much of this.

To create a provider:

  1. In Sitecore, open the Content Editor.

  2. To enable the Data Exchange SDK tab on the menu ribbon, right-click on the ribbon and select Data Exchange SDK.

    Enable the Data Exchange SDK tab on the ribbon
  3. On the ribbon, on the Data Exchange SDK tab, click Create Provider.

  4. In the Create Provider dialog, enter File System and click OK.

    Create Provider dialog

A progress box displays while Sitecore creates and configures the following templates and items in the Sitecore database:

  • /sitecore/templates/Branches/DataExchange/Providers/FileSystem

  • /sitecore/templates/DataExchange/Providers/FileSystem

  • /sitecore/system/Settings/Rules/InsertOptions/Rules/DataExchange-FileSystemProvider

The progress box disappears when Sitecore has created the provider.

Do you have some feedback for us?

If you have suggestions for improving this article,