Merchandising

A merchandising rule is represented as a merchandising object.

AttributeTypeRequiredContent
idstrRequired For certain endpointsThe id of the merchandising campaign, will be given after creation
namestrRequiredThe name of the merchandising campaign
descriptionstrOptionalDescription of the merchandising campaign
activebooleanRequiredDetermines if the merchandising campaign is active or not
start_atstrOptionaldatetime stamp in format 'yyyy-mm-dd'
end_atstrOptionaldatetime stamp in format 'yyyy-mm-dd'
ruleslist of rule objectsRequired*
triggerslist of trigger objectsRequired**
triggers_matchstrRequiredDetermines if all triggers should be satisfied to trigger the merchandising campaign, can be either any or all`

Rules

Rules decide how the merchandising campaign should behave, e.g. which products should be boosted.

*Each rule object has an action and what products should be affected by that action. An action could be pinning or filtering products. The action can also be custom which then requires the multiplier argument to be set.

AttributeTypeRequiredContent
actionstrRequiredCan be either remove, bury, promote, boost, custom, filter, pin, custom,
selectionlist or strRequiredEither a list of product ids, a query to find products or a filter.
multiplierfloat or intOptionalMultiplies the score of products if the action custom is set.

Triggers

Triggers decide where the Merchandising campaign should be activated.

**A trigger can have several different types, and depending on the type, requires different arguments. A trigger can be either of global, searches_all, categories_all, recommendations_all, email_campaign_all, email_trigger_all, search, category, products, content, api, email_campaign, email_trigger . All triggers with type global or all, require no additional arguments. Below we will go through each non-global trigger and describe what options is required for each of them.

search trigger.

AttributeTypeRequiredContent
typestrRequiredsearches_all, search
querystrRequiredThe search query that the campaign should target
matchstrRequiredexact, like, contains

category trigger

AttributeTypeContent
typestrcategory
categorystr or intThe id of the category to trigger upon

products trigger

AttributeTypeContent
typestrproducts
selectionlist or strEither a list of product ids, a query to find products or a filter.

content trigger

AttributeTypeContent
typestrcontent
contentstrThe id of the content for which the merchandising campaign should apply

api trigger

AttributeTypeContent
typestrapi
endpointstrThe endpoint that should trigger the merchandising campaign, for example recommendations/popular

email campaign trigger

AttributeTypeContent
typestremail_campaign
email_contentstrThe id of the email campaign that should be affected by the merchandising campaign

email trigger trigger

AttributeTypeContent
typestremail_trigger
email_trigger_contentstrThe id of the email trigger
{
		"id": 7247299805359,
		"name":[7247288664239], 
		"description": [7245445267631],
		"active": true,
    "start_at": "2022-09-15",
    "end_at"  : "2022-10-16",
		"triggers": [{
			"type": "search",
			"query": "Sport shoes",
			"match": "like"
		},{
			"type": "category",
			"category": 199
		}],
		"triggers_match": "all",
		"rules": [{
			"action": "promote",
			"selection": [123,456]
		}]
	}