Receive Items
Allows to receive items from partners. It must be used with the Send Items task.
Examples
json
{
"name": "exchange-receive-items",
"taskReferenceName": "receive_items",
"description": "Receive products",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"new": "CREATE",
"exist": "SUGGEST",
"matching": {
"first": "EAN"
},
"handleDeletedValues" : true
}
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Definition
| Property | Type | Required | Description |
|---|---|---|---|
| The name (or type) of the task | |||
| The unique name of the task in your job. It is used to reference this task in the workflow. | |||
| The functional description of this task in your job. | |||
The type of the task. It must be SUB_WORKFLOW. | |||
| : | true: the job continues if there is an error on this task. false: the job fails. | ||
| Input parameters of the task. See below |
Inputs
| Property | Type | Required | Description |
|---|---|---|---|
| : | Defines the behavior to adopt when collecting suggestions on an item (if it exists in the target table).SUGGEST: Propose an update to the userUPDATE: Automatically applies all suggested updates | ||
| Allows to define reconciliation rules between items that have been published and items present in the target table. The identifier referenced in the first property is used to find a matching item. If the first match is not found then the second, third, fourth and fifth properties are used in this order. If no match is found, the item is considered as new and a new item is created. | |||
| The key of the first identifier to be taken into account when reconciling items | |||
| The key of the second identifier to be taken into account when reconciling items | |||
| The key of the third identifier to be taken into account when reconciling items | |||
| The key of the fourth identifier to be taken into account when reconciling items | |||
| The key of the fifth identifier to be taken into account when reconciling items | |||
| : | Enables you to collect deleted field values from your partner so that you can see and accept fields deletion and update your items A field deletion is published when it is empty and there was a value in the last published suggestion. | ||
| : | Default: falseWhen set to true, the report generation is skipped and thus the report is not available in the output parameters. | ||
| : | Default: info It defines the log level to be recorded in the report. error < warning < info < debug |
TIP
The handleDeletedValues parameter allows to compare the current version of the item and the last published version of it (the last publication made). So if the current item does not have a value for a field, and the last suggestion contains a value for it, then deletion will be suggested in the suggestion sent to the partner.
Outputs
| Property | Type | Description |
|---|---|---|
| Number of items created by this import | ||
| Number of items updated by this import | ||
| : | YES: all items have been created or updated successfully. NO: at least one item has not been created or updated. | |
An XML file containing a set of logs related to the execution of the task. This output is not available if the input skipReportGeneration=true. |
What collecting does to a suggestion
A suggestion moves through four statuses, and this task drives two of them:
| Status | Set when |
|---|---|
SENT | The partner published the suggestion, with Send Items. |
RECEIVED | This task collected the suggestion successfully. |
REJECTED | This task failed on the suggestion - see the log codes below. |
ACKNOWLEDGED | The suggestion was applied, and the item created or updated. |
A rejected suggestion gets a comment automatically
When collecting a suggestion fails, the task does not merely reject it: it opens a system comment thread on the publication, owned by and assigned to the account that sent the suggestion, holding the reason for the failure.
That is what lets the publishing partner see what happened and act on it without you having to tell them. The thread appears alongside the publication in the interface, and is assigned to them, not to you.
Execution report log codes
| Code | Severity | Raised when |
|---|---|---|
ITEM_CREATED_IN_COLLECT | info | The suggestion was collected and the target item was created. |
ITEM_UPDATED_IN_COLLECT | info | The suggestion was collected and an existing item was updated. |
SUGGESTION_CREATED | info | A suggestion was created on the item. |
IDENTIFIER_NOT_FOUND | error | The identifier the suggestion relies on is missing. The item is not imported. |
IDENTIFIER_IS_ARCHIVED | error | That identifier exists but is archived. The item is not imported. |
IDENTIFIER_ALREADY_EXISTS | error | Another item already carries this identifier. The item is not imported. |
NO_MATCHING_OPTIONS_RECEIVED | error | None of the received options match the target field. The item is not imported. |
ITEM_QUOTA_ERROR | error | The target table has reached its item quota. The item is not imported. |
MAX_ITEM_SIZE | error | The item exceeds the maximum allowed size, which the log states. |
TECHNICAL_ERROR | error | An unexpected error, for instance a suggestion that can no longer be found. |
Every one of these errors rejects that one suggestion and lets the task carry on with the next, so a COMPLETED task can still have rejected suggestions.
Limits and additional notes
- Publish and receive up to 10 000 items at a time.
- Publish and receive items on up to 3 screens.