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 items file",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"items" : "${export_items.output.file}",
"extraFilters": [
{
"type": "eq",
"field": "isAcknowledged",
"value": false
}
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
json
{
"name": "exchange-apply-suggestions",
"taskReferenceName": "exchange-apply-suggestions",
"description": "Apply all suggestions based on items file",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"items" : "${export_items.output.file}",
"extraFilters": [
{
"type": "eq",
"field": "isAcknowledged",
"value": false
}
],
"screens": [
"ALL_ATTRIBUTES",
"MEDIA"
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
json
{
"name": "exchange-apply-suggestions",
"taskReferenceName": "exchange-apply-suggestions",
"description": "Apply all suggestions based on items file using options",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"items" : "${export_items.output.file}",
"isAcknowledged": "NO-CHANGES"
}
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
json
{
"name": "exchange-apply-suggestions",
"taskReferenceName": "exchange-apply-suggestions",
"description": "Apply all suggestions based on items file using options",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"items" : "${export_items.output.file}",
"extraFilters": [
{
"type": "eq",
"field": "isAcknowledged",
"value": false
},
{
"type": "eq",
"field": "hasCreatedItem",
"value": true
}
],
"hasCreatedItem": "NO"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
json
{
"name": "exchange-apply-suggestions",
"taskReferenceName": "exchange-apply-suggestions",
"description": "Apply all suggestions based on items file for specific fields",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"items" : "${export_items.output.file}",
"extraFilters": [
{
"type": "eq",
"field": "isAcknowledged",
"value": false
},
{
"type": "eq",
"field": "hasCreatedItem",
"value": true
}
],
"fields": "file://assets/fields.xml"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
json
{
"name": "exchange-apply-suggestions",
"taskReferenceName": "exchange-apply-suggestions",
"description": "Apply all suggestions based on items file using options",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"items" : "${export_items.output.file}"
}
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
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 ) | |||
Defines the acknowledgement status to apply to the suggestions.YES : All suggestions are set to acknowledged (default value).NO : All suggestions are set to not acknowledged.NO_CHANGES : No changes are made to acknowledgement status.YES_IF_EMPTY : Suggestion is set at aknowledged only if all the suggested fields in suggestion are applied. Requires the fields input. | |||
You can apply only certain fields when applying the suggestion. If you don't specify, all fields will be applied. | |||
Default : api.product-live.com | |||
Definition of the screens on which the suggestions must be applied. If not specified, all screens will be taken into account. | |||
Definition of the extra filters thant must be applied when defining suggestions to take into account (see details here : find-request) |
Input items
See details on the input items
in the Data Factory task table-export-items
output - file.
Input fields
example
xml
<Fields>
<Field key="TITLE"/>
<Field key="MAIN-IMAGE"/>
</Fields>
1
2
3
4
2
3
4
Input options
definition
XPath | Description | Occurs |
---|---|---|
Fields | The root element | 1 |
Fields/Field | Defines the behavior for a single field | 1..* |
Fields/Field/@key | The field key | 1..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).
- Only 100 items can be processed at a time.