Upload Advanced Merchandising Rules in JSON Format

This section contains instructions on and details around adding rules from other sources into Advanced Merchandising through file upload. This is meant to avoid double-work and lessen effort needed to build rules in Advanced Merchandising that exist in a different system. You can upload product, attribute, and category context values in JSON format for advanced merchandising rules. The mandatory fields in the rule creation UI are also mandatory in the uploaded file, while all other fields are optional. Additionally, you can combine and upload a group of product IDs for a context or recommendation into a new rule. Upload Rules feature is designed for creating new rules, and it won't update existing rules.

Uploading Rules

  1. Ensure the file you want to upload is available on your computer and is in JSON format.

  2. Example file format: https://richrelevance.egnyte.com/dl/PAugqrGA3r

  3. On the Omnichannel Personalization dashboard, go to Recommendations > Advanced Merchandising. The Advanced Merchandising page is displayed with the rules already created. 

  1. Click + Upload Rules.

    This will open up an Open files window.

  1. Find the file you want to upload, select it and click Open.

    • If the upload was successful, your rules will be saved, and listed on the Advanced Merchandising rules page for review. The rules will be live in production upon upload.

    • If the upload was unsuccessful, you will see a red error box in the top right corner letting you know an error occurred.

    • If an uploaded rule calls out something that does not exist, then it will simply not return anything for that rule.

    • If an error occurs with a rule in a batch file, the whole file gets rolled back.

Upload File Guidelines

  • Format: json

  • How should the file be structured? See Sample JSON.

  • Limitations:

    • Each rule can only have a maximum of 100 groups of product IDs uploaded.

    • A maximum of 1500 rules with three groups each can be uploaded.

  • What can be uploaded?

    • Context values possible

      • Products, Attributes, Categories

  • Fields that are mandatory in Advanced Merchandising are also mandatory in the uploaded file. All other fields are optional.

  • Can a group of product IDs be uploaded for a context or recommendation group for one specific rule? This can be done for new rules. Updating a rule with an uploaded file is not supported.

  • Compatibility mapping files are not currently supported in the Upload Rules feature.

  • Naming conventions:

    • If a rule has a name, and a 2nd rule is created with the same name, it will be available to save. There are no restrictions on rules having the same name.

Sample JSON

Copy
[{
"name":"Rule Bundle Test L001",
"importance":1,
"message":"Tilbehør",
"placements":[
"Item page.recs_accessories"
],
"startDate":"2017-07-16T19:20:30",
"endDate":"2018-10-12T21:20",
"context":{
"type":"CATEGORY",
"values":[
"21415"
]
},
"recommendedGroups":[
{
"name":"TestGroup1",
"itemsNumber":2,
"items":{
"type":"PRODUCT",
"values":[
"867712",
"954621",
"831179"
]
}
}, {
"name":"TestGroup2",
"itemsNumber":3,
"items":{
"type":"ATTR_MERCHANT",
"name":"MARGIN",
"values":[
"5.37",
"5.35"
]
}
}, {
"name":"TestGroup3",
"itemsNumber":5,
"items":{
"type":"TEMPLATE",
"name":"appleacc"
}
}
]
}, {
"name":"Rule Bundle Test L002",
"importance":1,
"message":"Tilbehør",
"placements":[
"Item page.recs_accessories"
],
"startDate":"2017-07-16T19:20:30",
"endDate":"2018-10-12T21:20",
"context":{
"type":"CATEGORY",
"values":[
"21415"
]
},
"recommendedGroups":[
{
"name":"TestGroup1",
"itemsNumber":2,
"items":{
"type":"PRODUCT",
"values":[
"867712",
"954621",
"831179"
]
}
}, {
"name":"TestGroup2",
"itemsNumber":3,
"items":{
"type":"ATTR_MERCHANT",
"name":"MARGIN",
"values":[
"5.37",
"5.35"
]
}
}, {
"name":"TestGroup3",
"itemsNumber":5,
"items":{
"type":"TEMPLATE",
"name":"appleacc"
}
}
]
}, {
"name":"Rule Bundle Test L003",
"importance":1,
"message":"Tilbehør",
"placements":[
"Item page.recs_accessories"
],
"startDate":"2017-07-16T19:20:30",
"endDate":"2018-10-12T21:20",
"context":{
"type":"CATEGORY",
"values":[
"21415"
]
},
"recommendedGroups":[
{
"name":"TestGroup1",
"itemsNumber":2,
"items":{
"type":"PRODUCT",
"values":[
"867712",
"954621",
"831179"
]
}
}, {
"name":"TestGroup2",
"itemsNumber":3,
"items":{
"type":"ATTR_MERCHANT",
"name":"MARGIN",
"values":[
"5.37",
"5.35"
]
}
}, {
"name":"TestGroup3",
"itemsNumber":5,
"items":{
"type":"TEMPLATE",
"name":"appleacc"
}
}
]
}]

Additional Tips

  • If an uploaded rule calls out something that does not exist (for example, a category that is not in the feed), then it will simply not return anything for that rule.
  • If a batch file includes a rule with an error, the whole batch will be rejected/rolled back.
  • When rules are uploaded, they go live in production.