The Resolve multilanguage Sitecore item dictionary and Select languages pipeline steps

Abstract

How to configure multilanguage related pipeline steps in Data Exchange Framework

In a pipeline you can use the Resolve Multilanguage Sitecore Item Dictionary pipeline step to resolve an item with all selected language versions. You must use this pipeline step together with the Select Languages pipeline step.

You can find the templates for both pipeline steps in /sitecore/templates/Data Exchange/Providers/Sitecore/Pipeline Steps.

Configuring the Select languages pipeline step

You use this pipeline step at the beginning of the pipeline.

You can configure the following information on the pipeline step:

  • Languages – a list of languages to be retrieved from item on resolve operation. You can select languages that you have added to Sitecore.

You set this information on the pipeline context. It applies to all multilanguage pipeline steps within the pipeline context.

Configuring the Resolve multilanguage Sitecore item dictionary pipeline step

You can configure the following information on the Resolve Multilanguage Sitecore Item Dictionary pipeline step:

Section

Field

Description

Create New Item

DoNotCreateItemIfItDoesNotExist

If you select this, the item is created in memory only. If you clear it, the item is created on the server immediately.

TemplateForNewItem

If the item does not exist in Parent For Item folder, this template is used to create it.

ItemNameValueAccessor

The value accessor used to determine the name for the new item.

Endpoints

EndpointFrom

Endpoint to read data from. Select the Sitecore Item Model Repository endpoint here.

Identifier

IdentifierValueAccessor

Value Accessor used to read the identifier value from Identifier Object. The value is compared with the value in MatchingFieldValueAccessor.

IdentifierObjectLocation

Location for the object that the identifier value is read from. For example, you can use xConnect contact in Pipeline Context Source and use the xConnect First Name Property on Personal Info Facet value accessor to read it.

ValueReaderToConvertIdentifierValueForComparison

Component used to convert the identifier value into a format that allows the identifier value to be compared to another value. You must use this if the IdentifierValueAccessor return type does not match the MatchingFieldValueAccessor return type.

Object Resolution

ResolvedObjectLocation

If the item is resolved or created, it is added to this location, where it is available to subsequent pipeline steps.

Find Existing Item

ParentForItem

The root folder for the item to be resolved. It is also where the pipeline step places new items.

For example, if you set this to sitecore/content/MyItems the pipeline searches this folder for existing items. If it does not find any items, it creates a new item under Myitems.

ParentForItemLocation

Use this to resolve or store your items in dynamically created folders. For example, if you select Pipeline Context Source, the pipeline step retrieves the object from the Source pipeline location, tries to convert it into a Sitecore Item, and uses this item as parent, thereby overriding the ParentForItem setting.

If you specify a location, and the object at the location is a Sitecore item, this item is used as the parent instead of the item specified in the ParentForItem field.

MatchingFieldValueAccessor

A value accessor for the Sitecore item field used to match the identifier value. For example, you can use the Item Name Value Accessor to match the item by name. The value is compared to the value in IdentifierValueAccessor.

Logic executed by the pipeline step

When the pipeline step executes, it executes the following logic:

  • The pipeline step gets all the selected languages from the Pipeline Context.

  • The pipeline step requests each language version from the item model repository and stores them into the dictionary as item models.

  • If the pipeline step cannot resolve the language version and the DoNotCreateIfExistingObjectNotFound setting is selected, the pipeline step skips it. In all other cases it adds the language to the missed languages collection to create empty item models in the end of processing.

  • If the pipeline step has not resolved any language versions, it sets RepositoryObjectStatus.DoesNotExist to the pipeline context and exits.

  • If the pipeline step can resolve at least one language version, it sets RepositoryObjectStatus.Exists to the pipeline context.