Order status mapping
Mapping of order statuses from a CRM to status types in Yandex Metrica.
Status types are required for matching order statuses to sessions and displaying statistics by status.
- Use this method to assign a corresponding status type in Yandex Metrica for each status in your CRM. For example, the “New” status with the “new” ID can be assigned the IN_PROGRESS type, and the “Successful” status with the “success” ID — the PAID status. As a result, order statuses are distributed by type.
- Use the methods POST /cdp/apiv1/counter/{counterId}/data/orders or POST /cdp/api/v1/counter/{counterId}/data/orders/json to upload the IDs of statuses distributed across groups, along with other order data.
The reports display status types predefined in Yandex Metrica.
Request syntax
counterId
: Tag ID.
https://api-metrika.yandex.net/cdp/api/v1/counter/{counterId}/schema/order_statuses
?
In the request body
--data '{
"order_statuses": [
{
"id": "new",
"humanized": "New",
"type": "IN_PROGRESS"
},
{
"id": "prepairing",
"humanized": "Processing",
"type": "IN_PROGRESS"
},
{
"id": "delivery",
"humanized": "Out for delivery",
"type": "IN_PROGRESS"
},
{
"id": "cancelled_by_client",
"humanized": "Canceled by customer",
"type": "CANCELLED"
},
{
"id": "cancelled_by_shop",
"humanized": "Canceled by shop",
"type": "CANCELLED"
},
{
"id": "test_order",
"humanized": "Test order",
"type": "SPAM"
},
{
"id": "success",
"humanized": "Completed successfully",
"type": "PAID"
}
]
}'
Parameters | Description |
---|---|
order_statuses | List of order statuses. |
order_statuses | |
id | Order status ID. |
humanized | Order status name. |
type | Status type Possible values:
|
goal_action_ids | Goal IDs |
Parameters | Description |
---|---|
order_statuses | List of order statuses. |
order_statuses | |
id | Order status ID. |
humanized | Order status name. |
type | Status type Possible values:
|
goal_action_ids | Goal IDs |
Sample request
POST https://api-metrika.yandex.net/cdp/api/v1/counter/{counterId}/schema/order_statuses?
Response format
{
"success" : < boolean >
}
Parameters | Description |
---|---|
success | Result of performing the action. |
Parameters | Description |
---|---|
success | Result of performing the action. |