Add a pipeline step to resolve the target item

Abstract

How to create a pipeline step in Sitecore Data Exchange Framework to resolve the target item.

The first pipeline step must check if there is an existing Sitecore item that matches the value from the text file row.

If the pipeline finds a matching item, it must set that item as the target object in the pipeline context. This means that during the mapping process, the pipeline updates the matching item with the new values.

If the pipeline does not find a matching item, it must create a new item, and set the new item as the target object in the pipeline context.

To set up these actions in the pipeline:

  1. Navigate to the pipeline item City Info from File to City Info Item Sync Pipeline.

    City Info From File to City Info Item Sync pipeline in the content tree
  2. Add a new Resolve Sitecore Item Pipeline Step item and name it Resolve City Info Item.

  3. Select the new item.

    Resolve City Info item in the content tree
  4. Set the following field values:

    Field

    Value

    Template for New Item

    Templates/User Defined/City Information

    Item Name Value Accessor

    Data Access/Value Accessor Sets/Providers/File System/City Information File Fields/City from City Information File

    Endpoint From

    Sitecore/Sitecore Database Endpoint

    Identifier Value Accessor

    Data Access/Value Accessor Sets/Providers/File System/City Information File Fields/Identifier from City Information File

    Identifier Object Location

    Pipeline Context Source

    Resolved Object Location

    Pipeline Context Target

    Parent for Item

    sitecore/content/Cities

    Matching Field Value Accessor

    Data Access/Value Accessor Sets/Providers/Sitecore/City Information Item Fields/Identifier on City Information Item

  5. Save the item.