<Link>

The <Link> element is an optional child of a <Step> element. It is used to indicate that the current step is a child of another step, identified by the StepId attribute. The link reflects a parent/child relationship between the steps’ target business objects. A step that is not linked to another step is known as a root step, and a step that is linked is known as a child step.

You can also have a <Link> element without a StepId if you want to use the RelativeQuery or ComparisonProperties attribute. In that case the step is still considered a root step, because the <Link> element doesn’t actually link it to another step; it just serves as a holder for those attributes.

This table describes each attribute of the <Link> element:

AttributeDescription
StepId ID of the parent step.
RelativeQueryRelative XPath query for the step. Can be used to drill down to child elements in the import file. If not set, the step will use the same query as its parent.

If the step is a root step, the RelativeQuery is concatenated with the RootQuery of the <Steps> element to produce the full XPath query for the step. If no RootQuery is defined, the RelativeQuery is used alone. If the step is a child step, the RelativeQuery is relative to the node returned by the parent step.

ComparisonPropertiesIf a step’s action is “Sync,” the ComparisonProperties attribute defines the properties that will be used to select the records to be synchronized. The attribute should specify one or more properties of the step’s target business object in a comma-separated list. Each property listed must be the target of one of the step’s <Map> elements.
ForCan be used to make the child step conditional, depending on the action performed by the parent step. You can specify one or more of three values in a comma-separated list: Create, Update, and Delete. The child step will only be processed if the parent performs one of the specified actions.

The sample below shows a link with the For attribute set to “Create.” If the parent step’s action is “Create, Update,” the child will be processed when the parent adds a new record, but not when it updates an existing one.

<Link StepId="1" 
For="Create" />