Create 2
Creates a Context Mapping
POST/rest/organizations/{organizationId}/commerce/v2/tracking-ids/{trackingId}/context-mappings
Use it in a workflow
- Add a step and choose the Coveo connector.
- Pick the Create 2 action (under Commerce).
- Fill in the fields below, then reference the result from later steps as
{{create2.response.data}}.
Request
Path parameters
organizationIdstringrequired
The unique identifier of the target [organization](https://docs.coveo.com/en/185/).<br />**Example:** `acmecorporation8tp8wu3`
trackingIdstringrequired
The unique identifier of the tracking target.
Request body
Enter the body as JSON in the step's Body field.
destinationsarray<object>requiredThe list of destinations where this context mapping should be applied.
attributestringrequired
The destination type where context mapping values can be applied
One ofQUERY_PIPELINE_CONTEXTML_CONTEXTFIELD_ALIASES
fieldAliasstring
The field alias template used when attribute is FIELD_ALIASES. Must resolve to a field name pattern.
fieldSourcestring
The field source template used when attribute is FIELD_ALIASES. Must resolve to 'field.subkey' pattern.
keystringrequired
A unique key for the context mapping. Must start with a letter and contain only letters, numbers, and underscores.
typestringrequired
The data type for context mapping values
One ofBOOLEANSTRINGNUMBERPRODUCT_LIST
{
"destinations": [
{
"attribute": "QUERY_PIPELINE_CONTEXT"
},
{
"attribute": "FIELD_ALIASES"
}
],
"key": "user_segment",
"type": "STRING"
}
Response
Returns 201 with an object. Read it in later steps with {{create2.response.data.<field>}}.
destinationsarray<object>The list of destinations where this context mapping should be applied.
attributestringrequired
The destination type where context mapping values can be applied
One ofQUERY_PIPELINE_CONTEXTML_CONTEXTFIELD_ALIASES
fieldAliasstring
The field alias template used when attribute is FIELD_ALIASES. Must resolve to a field name pattern.
fieldSourcestring
The field source template used when attribute is FIELD_ALIASES. Must resolve to 'field.subkey' pattern.
keystring
A unique key for the context mapping. Must start with a letter and contain only letters, numbers, and underscores.
typestring
The data type for context mapping values
One ofBOOLEANSTRINGNUMBERPRODUCT_LIST
{
"destinations": [
{
"attribute": "QUERY_PIPELINE_CONTEXT"
},
{
"attribute": "FIELD_ALIASES"
}
],
"key": "user_segment",
"type": "STRING"
}
Need more? See the Coveo guide for connection setup and behaviour shared by every action.