Exchange / Apply suggestions
Task in alpha phase
This Data Factory task is in phase. You can contact the Product-Live team at contact@product-live.com if you want more details and get an early access.
This task enables to apply all suggestions on a list of items, and optionally to mark them as read.
Task name:
Examples
json
{
"name": "exchange-apply-suggestions",
"taskReferenceName": "exchange-apply-suggestions",
"description": "Apply all suggestions based on request",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"items" : "${export_items.output.file}",
"apiKey": "${workflow.variable.api_key}",
"domain": "api.product-live.com",
}
}
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
json
{
"name": "exchange-apply-suggestions",
"taskReferenceName": "exchange-apply-suggestions",
"description": "Apply all suggestions based on request",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"items" : "${export_items.output.file}",
"options": "file://assets/options.xml",
"apiKey": "${workflow.variable.api_key}",
"domain": "api.product-live.com",
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
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 |
Input Parameters
Property | Type | Required | Description |
---|---|---|---|
An export items file (see details here : table-export-items ) | |||
You can apply options on the behavior of the suggestion application. If not specified, all suggestions and all fields will be applied, in chronological order, and suggestions will be set as read. | |||
The Product-Live API key | |||
Default : api.product-live.com |
Input items
See details on the input items
in the Data Factory task table-export-items
output - file.
Input options
example
xml
<Options>
<Apply-Suggestions-Update>YES</Apply-Suggestions-Update>
<Mark-Suggestion-As-Read>YES</Mark-Suggestion-As-Read>
<Fields>
<Field key="TITLE" only-apply-if-target-empty="YES"/>
<Field key="MAIN-IMAGE"/>
</Fields>
</Options>
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Input options
definition
XPath | Description | Occurs |
---|---|---|
Options | The root element. | 1 |
./Apply-Suggestions-Update | Sets if the update suggestions (orange) must be applied. Otherwise, only new suggestions (blue ones) are applied Default value YES | 0..1 |
./Mark-Suggestion-As-Read | Sets if the suggestion must be marked as read.YES : the suggestion will be marked as read YES-IF-EMPTY : the suggestion will be marked as read, only if all the suggestion's fields are applied. NO : the suggestion will not be marked as readDefault value : YES | 0..1 |
./Fields | Defines the fields for which suggestions should be managed. If absent, all fields will be applied | 0..1 |
./Fields/Field | Defines the behavior for a single field | 1..* |
./Fields/Field/@key | The field key | 1..1 |
./Fields/Field/@only-apply-if-target-empty | Defines the behavior for the field if there is already a value in the target.YES : the existing value will be replaced by the suggestionNO : the existing value will be keptDefault value : YES | 0..1 |
Outputs
Property | Description |
---|---|
report | An XML a report of managed suggestions |
Output report
example
xml
<Report task="exchange-apply-suggestions">
<Log type="info" code="SUGGESTION_APPLIED">
<Metadata name="suggestionCreationDate">2024-08-21T09:55:18.000Z</Metadata>
<Metadata name="acknowledged">true</Metadata>
<Metadata key="newItem">true</Metadata>
<Metadata-Collection name="identifiers">
<Metadata name="EAN">3221616129726</Metadata>
</Metadata-Collection>
<Metadata-Collection name="modifications">
<Metadata key="MULTI-SELECT-QUANTIFIE" deleted="true"/>
<Metadata key="NUMBER">
<Old-Value>2</Old-Value>
<New-Value>3</New-Value>
</Metadata>
<Metadata key="NUMBER-WITH-SUFFIX">
<Old-Value suffix="cm">2</Old-Value>
<New-Value suffix="mm">3</New-Value>
</Metadata>
<Metadata key="CONNECTORS">
<Added key="USB">
<Quantity new="2"/>
<Comment new="1 USB-2, 1 USB-3"/>
</Added>
<Added key="HDMI">
<Quantity old="2" new="3"/>
<Comment new="2 HDMI-2.0, 1 HDMI 3.0"/>
</Added>
</Metadata>
</Metadata-Collection>
<Message>The suggestion has been treated</Message>
</Log>
</Report>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Output report
definition
XPath | Description | Occurs |
---|---|---|
Report | The root of the document | 1..1 |
Report/@task | The name of the task (always exchange-apply-suggestions ) | 1..1 |
Report/Log | For each item for which data has been modified | 0..* |
../@type | The type of the log (can be info , error ) | 1..1 |
../@code | The code of the log (can be SUGGESTION_APPLIED , ERROR ) | 1..1 |
../Metadata[@key='suggestionCreationDate'] | The date of the processing | 1..1 |
../Metadata[@key='acknowledged'] | true if the suggestion has been acknowledged, false otherwise | 1..1 |
../Metadata[@key='newItem'] | true if the suggestion has created an item (blue envelope acknoledgement), false otherwise (yellow envelope) | 1..1 |
../Metadata-Collection[@key='identifiers'] | Identifiers of the item | 1..1 |
../Metadata-Collection[@key='modifications'] | All the modifications applied to the product during the suggestion acknowledgement | 0..1 |
../Metadata-Collection[@key='modifications']/Metadata | A field impacted by the suggestion acknowledgement | 1..1 |
../Metadata-Collection[@key='modifications']/Metadata/@key | The field key | 1..1 |
../Metadata-Collection[@key='modifications']/Metadata/@delete | true if the suggestion aknowledgement has deleted the field value | 1..1 |
../Metadata-Collection[@key='modifications']/Metadata/Old-Value | The previous value of the field (if applicable) | 0..1 |
../Metadata-Collection[@key='modifications']/Metadata/Old-Value/@suffix | The previous suffix of the field (if applicable) | 0..1 |
../Metadata-Collection[@key='modifications']/Metadata/New-Value/@suffix | The new suffix of the field (if applicable) | 0..1 |
../Metadata-Collection[@key='modifications']/Metadata/Added | In the case of multivalued fields, lists the added values | 0..1 |
../Metadata-Collection[@key='modifications']/Metadata/Modified | In the case of multivalued fields, lists the added values | 0..1 |
../Metadata-Collection[@key='modifications']/Metadata/Deleted | In the case of multivalued fields, lists the added values | 0..1 |
../Metadata-Collection[@key='modifications']/Metadata/*[Added,Modified,Deleted]/@key | The option key | 1..1 |
../Metadata-Collection[@key='modifications']/Metadata/*[Added,Modified,Deleted]/Comment | In the case of multivalued fields with comment, describes the modifications applied to comment | 0..1 |
../Metadata-Collection[@key='modifications']/Metadata/*[Added,Modified,Deleted]/Quantity | In the case of multivalued fields with quantity, describes the modifications applied to quantity | 0..1 |
../Message | The log message | 1..1 |
Limits
Only items files exported with the task Table export items can be used as an input of this task (items IDs are required to process to the suggestions application).