Skip to main content

Promotion Usage

v1

Description

Promotion has a fixed start date and end date, and during its validity period, there are certain number of products on which a promotion is applicable. Get notified on the quantity of products ordered by your customer during the promotional period.


Supported Type

  • Update

Payload

{
"event":{
"id":"rOcs838XXrj5ef6LoJkfu9y3TTW25tDekAsleAA4Eck=",
"name":"promotion_usage",
"type":"update",
"version":"1",
"category":"application",
"trace_id":[
"convex.f4009557-4cb2-46c2-b8f8-769aaf8e8855"
],
"created_timestamp":1661319161914
},
"payload":{
"promotion_usage":{
"user_id":"6091568fb204cd80f9d2f015",
"usage_count":2,
"app_id":"5d7c71a9a4e5b431b95bdb29",
"promotion_id":"628399498262806bf2c50c36",
"_version":2
}
},
"contains":[
"promotion_usage"
],
"company_id":2,
"application_id":"000000000000000000000001"
}

Object Properties

KeyTypeDescription
promotion_usage.promotion_idStringID of the promotion
promotion_usage.app_idStringID of the application (sales channel) where promotion is used
promotion_usage.order_quantity.<item_id>IntegerShows the quantity of products ordered by your customers during the promotional period
promotion_usage.user_idStringUser's _id for which promotion usage count event is triggered
promotion_usage.usage_countIntegerTotal order count for current user during the promotional period
promotion_usage._versionIntegerDocument version key. Since event throughput is high, event generation order might be different and latest event might get triggered first. Doc version can be used to discard old event data.