Event schema (Payload)

This page provides the schema of transaction and customer events with sample data.

Customer

Customer Added Event

Request Parameters

ParameterDatatypeDescription
eventNameStringName of the event.
eventIdStringUsed by the consumer of the event notification for idempotency check, i.e., to check if the event is duplicate or unique before saving the event.
If duplicate, the consumer should ignore the event.
orgIdIntegerCapillary organization ID
refIdStringReference ID for the internal debugging purpose.
customerIdIntegerUnique identifier for the customer.
mobileIntegerMobile number of the customer.
emailStringEmail ID of the customer.
externalIdStringExternal ID associated with the customer.
card_numberIntegerCard number associated with the customer.
apiRequestIdStringInternal request ID generated for the API request.
createdAtIntegerUnix timestamp in milliseconds when the event was stored in Capillary.
{
   "eventName":"customerAdded",
   "eventId":"06750c10-dcf1-45de-a0eb-d9c64372feed",
   "orgId":1800,
   "refId":"1800_482579328",
   "apiRequestId":"4b6330d3e10bf660783a9ba77248c9f7",
   "createdAt":1619199042493,
   "data":{
      "loyaltyType":"loyalty",
      "source":"INSTORE",
      "enteredAt":1619199041201,
      "enteredBy":{
         "id":12970395,
         "till":{
            "code":"aa.sit.admin",
            "name":"aa.sit.admin"
         },
         "store":{
            "code":"aa.admin",
            "name":"Air Asia Admin Store",
            "externalId":"AirAsiaAdmin",
            "externalId1":"",
            "externalId2":""
         }
      },
      "customerIdentifiers":{
         "customerId":482579328,
         "instore":{
            "mobile":"testuserfortata",
            "email":"testuserfortata",
            "externalId":"testuserfortata",
            "card_number": "1234567890"
         }
      }
   },
   "loyaltyEventId":null
}

Customer Updated Event

Request Parameters

ParameterDatatypeDescription
loyaltyTypeEnumType of customer loyalty - LOYALTY, NON_LOYALTY
sourceStringCapillary organization ID
emailStringEmail ID of the customer.
mobileStringMobile number of the customer.
card_numberIntegerCard number associated with the customer.
enteredAtIntegerUnix timestamp in milliseconds when the event was stored in Capillary.
enteredByStringSource from which customer details are updated.
Value: FACEBOOK, WEB_ENGAGE, WECHAT, INSTORE, MARTJACK, TMALL,
{
   "eventName":"customerAdded",
   "eventId":"06750c10-dcf1-45de-a0eb-d9c64372feed",
   "orgId":1800,
   "refId":"1800_482579328",
   "apiRequestId":"4b6330d3e10bf660783a9ba77248c9f7",
   "createdAt":1619199042493,
   "data":{
      "loyaltyType":"loyalty",
      "source":"INSTORE",
      "enteredAt":1619199041201,
      "enteredBy":{
         "id":12970395,
         "till":{
            "code":"aa.sit.admin",
            "name":"aa.sit.admin"
         },
         "store":{
            "code":"aa.admin",
            "name":"Air Asia Admin Store",
            "externalId":"AirAsiaAdmin",
            "externalId1":"",
            "externalId2":""
         }
      },
      "customerIdentifiers":{
         "customerId":482579328,
         "instore":{
            "mobile":"testuserfortata",
            "email":"testuserfortata",
            "externalId":"testuserfortata",
            "card_number": "1234567"
         }
      }
   },
   "loyaltyEventId":null
}

Transaction

Transaction Added Event (transactionAdded)

Request Parameters

ParameterDatatypeDescription
amountDoubleNet transaction amount.
billClientIdStringUnique id of the bill as per the client (org) end.
billNumberStringUnique transaction number. The uniqueness depends on the configuration.
enteredAt
enteredByobjDetails of the store at which the transaction happened.
transactionIdlongUnique transaction ID generated internally.
deliveryStatusEnumDelivery status of the order. Value: PLACED, PROCESSED, SHIPPED, DELIVERED, RETURNED.
billTypeEnumType of transaction. Supported value: regular for loyalty transactions. ‘RETURN’ for return transactions.
lineItemCountIntegerNumber of line-items in the transaction.
DiscountDoubleDiscount availed for the transaction (discount amount).
grossAmountDoubleTransaction amount before discount.
currencyCodeStringISO currency code that you want to update. For example EUR for Euro, SGD for the Singapore Dollar, CNY for China Yuan Renminbi, SAR Saudi Riyal. For more codes, see ISO currency codes.
{
   "eventName":"transactionAdded",
   "eventId":"f8129682-4b57-4029-8761-b291404fae5e",
   "orgId":1231,
   "refId":"1231_2147864816",
   "apiRequestId":"08ccc811706f99919580fdf035c52a72",
   "createdAt":1630927652264,
   "data":{
      "amount":50000,
      "billClientId":"1121888",
      "billNumber":"293866733",
      "enteredAt":1630927646973,
      "transactionId":2147864816,
      "deliveryStatus":"DELIVERED",
      "billType":"MIXED",
      "lineItemCount":2,
      "discount":10,
      "grossAmount":100,
      "currencyCode":" ",
      "enteredBy":{
         "id":15071481,
         "till":{
            "code":"cm.1",
            "name":"cm.1"
         },
         "store":{
            "code":"mergestore1",
            "name":"MERGE FRONT ONE",
            "externalId":"aS123",
            "externalId1":"Q123",
            "externalId2":"ASDA123"
         }
      },
      "customerIdentifiers":{
         "customerId":414935964,
         "instore":{
            
         },
         "wechat":{
            "accounts":[
               {
                  "accountId":"WECHAT-CM",
                  "identifiers":[
                     {
                        "identifierType":"cuid",
                        "identifierValue":"cuid_91796467656"
                     },
                     {
                        "identifierType":"unionId",
                        "identifierValue":"unionId_91796467656"
                     },
                     {
                        "identifierType":"cardnumber",
                        "identifierValue":"card_91796467656"
                     }
                  ]
               }
            ]
         }
      }
   },
   "loyaltyEventId":null
}

Transaction Updated Event (transactionUpdated)

Request Parameters

ParameterDatatypeDescription
amountDoubleNet transaction amount.
billClientIdStringUnique id of the bill as per the client (org) end.
billNumberStringUnique transaction number. The uniqueness depends on the configuration.
enteredAt
enteredByobjDetails of the store at which the transaction happened.
transactionIdlongUnique transaction ID generated internally.
deliveryStatusEnumDelivery status of the order. Value: PLACED, PROCESSED, SHIPPED, DELIVERED, RETURNED.
Delivery status of the order. Value: PLACED, PROCESSED, SHIPPED, DELIVERED, RETURNED.
billTypeEnumType of transaction. Supported value: regular for loyalty transactions. ‘RETURN’ for return transactions.
lineItemCountIntegerNumber of line-items in the transaction.
DiscountDoubleDiscount availed for the transaction (discount amount).
grossAmountDoubleTransaction amount before discount.
currencyCodeStringISO currency code that you want to update. For example EUR for Euro, SGD for Singapore Dollar, CNY for China Yuan Renminbi, SAR Saudi Riyal. For more codes, see ISO currency codes.
{
   "eventName":"transactionUpdated",
   "eventId":"4fb0f785-d67f-4cc7-bd0f-489f776b9ffa",
   "orgId":1800,
   "refId":"1800_161440570",
   "apiRequestId":"6ab060b39bca036f5046e61c6b4f4f33",
   "createdAt":1619198938278,
   "data":{
      "amount":30000,
      "billNumber":"trans_update001",
      "enteredAt":1619198817000,
      "transactionId":161440570,
      "deliveryStatus":"DELIVERED",
      "billType":"REGULAR",
      "discount":0,
      "grossAmount":0,
      "enteredBy":{
         "id":12970488
      },
      "customerIdentifiers":{
         "customerId":482579301,
         "instore":{
            "externalId":"22222222222222222"
         }
      }
   },
   "loyaltyEventId":null
}

Points

Points Issued Event (pointsIssued)

Request Parameters

ParameterTypeDescription
eventIdStringUnique identifier for the event.
eventTypeStringType of event, e.g., "50660_pointsIssued".
consumerGroupIdIdentifier for a consumer group (empty in this case).
actionTypeStringType of action, e.g., "START".
timeStampNumberTimestamp of the event.
attributesObjectAdditional attributes related to the event.
- createdAtNumberTimestamp when the event was created.
- dataObjectData related to the event.
-- customerIdentifiersObjectIdentifiers related to the customer.
--- customerIdNumberUnique identifier for the customer.
-- entityInformationObjectInformation about the entity involved in the event.
--- entityTypeStringType of entity, e.g., "USER".
--- entityIdNumberUnique identifier for the entity.
-- triggeringActivityObjectDetails about the activity that triggered the event.
--- nameStringName of the triggering activity.
--- identifiersArrayIdentifiers related to the activity.
---- keyStringKey identifier, e.g., "CustomerId".
---- valueStringValue of the key identifier.
--- enteredByObjectUser who entered the activity.
---- idNumberUnique identifier for the user.
--- additionalAttributesArrayAdditional attributes related to the activity.
---- keyStringKey attribute, e.g., "customerId".
---- valueStringValue of the key attribute.
-- loyaltyProgramDetailsObjectDetails about the loyalty program.
--- idNumberUnique identifier for the program.
--- nameStringName of the program.
--- isDefaultBooleanIndicates if it's the default program.
--- pointsToCurrencyRatioNumberPoints-to-currency conversion ratio.
--- tiersArrayList of program tiers.
---- tierNumberNumberTier number, e.g., 1.
---- tierNameStringTier name, e.g., "Silver".
-- loyaltyProgramIdNumberUnique identifier for the loyalty program.
-- programCurrentPointsNumberCurrent points in the loyalty program.
-- programLifetimePointsNumberLifetime points in the loyalty program.
-- totalPointsIssuedNumberTotal points issued in the event.
-- regularPointsIssuedNumberRegular points issued in the event.
-- regularPointsBreakupArrayBreakdown of regular points issued (empty in this case).
-- promotionalPointsIssuedArrayPromotional points issued in the event.
--- promotionIdentifierStringIdentifier for the promotion.
--- promotionTypeStringType of promotion, e.g., "CUSTOMER_PROMOTION".
--- promotionPointsNumberPoints awarded for the promotion.
--- promotionPointsExpiryDateStringExpiry date of the promotion points.
-- promisedPointsIssuedArrayPromised points issued in the event (empty in this case).
-- behavioralEventAttributes*ObjectAttributes related to behavioral events.
--- webhookIdStringIdentifier for the webhook.
--- event_flagNumberEvent flag.
--- identifier_valueStringIdentifier value, e.g., "unionId918821563441".
--- requestIdStringUnique identifier for the request.
--- event_nameStringName of the event.
--- startTimeNumberStart time of the event.
loyaltyEventIdStringIdentifier for the loyalty event.
eventNameStringName of the event, e.g., "pointsIssued".
refIdStringReference identifier for the event.
apiRequestIdStringIdentifier for the API request.
orgIdNumberUnique identifier for the organization.

*The addition of behavioralEventAttributes is done on a demand basis. To enable it, you need to enable the configuration awardedReferenceEnrichmentEnabled . Raise a JIRA ticket with the sustenance team to enable this feature.

Example of points Issued on Transaction/Add

{
  "eventId": "e2d67457-8189-4e34-9b03-c7e6cec69d14",
  "eventType": "50660_pointsIssued",
  "consumerGroupId": "",
  "actionType": "START",
  "timeStamp": 1695633731154,
  "attributes": {
    "createdAt": 1695633634461,
    "data": {
      "customerIdentifiers": {
        "customerId": 374717298
      },
      "entityInformation": {
        "entityType": "USER",
        "entityId": 374717298
      },
      "triggeringActivity": {
        "name": "GenericEvent",
        "identifiers": [
          {
            "key": "CustomerId",
            "value": "374717298"
          }
        ],
        "enteredBy": {
          "id": 50025277
        },
        "entityInformation": {
          "entityType": "USER",
          "entityId": 374717298
        },
        "additionalAttributes": [
          {
            "key": "customerId",
            "value": "374717298"
          },
          {
            "key": "accountId",
            "value": "WECHAT-APIAUTO"
          },
          {
            "key": "source",
            "value": "WECHAT"
          },
          {
            "key": "event_flag",
            "value": "20.19"
          }
        ]
      },
      "loyaltyProgramDetails": {
        "id": 1465,
        "name": "ApiAutomationOrgDefaultProgram",
        "isDefault": true,
        "pointsToCurrencyRatio": 1.0,
        "tiers": [
          {
            "tierNumber": 1,
            "tierName": "Silver"
          },
          {
            "tierNumber": 2,
            "tierName": "Gold"
          },
          {
            "tierNumber": 3,
            "tierName": "Diamond"
          }
        ]
      },
      "loyaltyProgramId": 1465,
      "programCurrentPoints": 200.0,
      "programLifetimePoints": 440.0,
      "totalPointsIssued": 100.0,
      "regularPointsIssued": 0.0,
      "regularPointsBreakup": [],
      "promotionalPointsIssued": [
        {
          "promotionIdentifier": "b44e7aa6-5c15-433a-a90b-6babbc5e42ce",
          "promotionType": "CUSTOMER_PROMOTION",
          "promotionPoints": 100.0,
          "promotionPointsExpiryDate": "2024-09-30"
        }
      ],
      "promisedPointsIssued": [],
      "behavioralEventAttributes": {
        "webhookId": "8b2cf9247899d6e0f88423332ccb7f36",
        "event_flag": 20.19,
        "identifier_value": "unionId918821563441",
        "requestId": "cbc9400f-7e3e-4dda-9401-aa0883e70edf",
        "event_name": "clickEventPromoPoint",
        "startTime": 1695633631229
      }
    },
    "loyaltyEventId": "cbc9400f-7e3e-4dda-9401-aa0883e70edf",
    "eventName": "pointsIssued",
    "refId": "50660_cbc9400f-7e3e-4dda-9401-aa0883e70edf",
    "apiRequestId": "cbc9400f-7e3e-4dda-9401-aa0883e70edf",
    "orgId": 50660
  }
}

Points Redeemed Event (pointsRedeemed)

Sample schema of group program redemption.

{
   "body":{
      "eventName":"pointsRedeemed",
      "eventId":"b4743495-399b-4662-81e2-1455ca770f00",
      "orgId":50614,
      "refId":"50614_aNsL8RiCIp",
      "apiRequestId":"d1bc99d398412c329ef47b21a6746125",
      "createdAt":1620042311898,
      "data":{
         "customerIdentifiers":{
            "customerId":406361177,
            "instore":{
               "mobile":"919627263745",
               "email":"[email protected]"
            }
         },
         "triggeringActivity":{
            "name":"PointsRedemption",
            "identifiers":[
               {
                  "key":"billId",
                  "value":"2147644775"
               },
               {
                  "key":"redemptionId",
                  "value":"hhSRLt"
               }
            ],
            "enteredBy":{
               "id":50021318,
               "till":{
                  "code":"emftill1",
                  "name":"emftill1"
               },
               "store":{
                  "code":"emf_auto.store1",
                  "name":"EmfAutoStore",
                  "externalId":"EMFauto1",
                  "externalId1":"",
                  "externalId2":""
               }
            }
         },
         "loyaltyProgramDetails":{
            "id":1398,
            "name":"EMF_AutoDefaultProgram",
            "isDefault":true,
            "pointsToCurrencyRatio":1,
            "tiers":[
               {
                  "tierNumber":1,
                  "tierName":"Silver"
               },
               {
                  "tierNumber":2,
                  "tierName":"Gold"
               },
               {
                  "tierNumber":3,
                  "tierName":"Diamond"
               },
               {
                  "tierNumber":4,
                  "tierName":"Ruby"
               }
            ]
         },
         "loyaltyProgramId":1398,
         "totalPointsRedeemed":40,
         "redemptionSummaryId":8768,
         "redeemedPointsCurrencyValue":40,
         "redemptionNotes":"redeem",
         "redemptionBillNumber":"trans_BillNo_9807417180",
         "isGroupRedemption":true,
         "redemptionFromEarningPrograms":[
            {
               "programId":1398,
               "pointsRedeemed":40,
               "programCurrentPoints":1260
            }
         ]
      },
      "loyaltyEventId":"aNsL8RiCIp"
   }
}

Sample schema of Participating Program Redemption

{
   "eventName":"pointsRedeemed",
   "eventId":"ABC-87484sdas&$",
   "orgId":1655,
   "refId":"1655_684494987",
   "createdAt":156474848484,
   "data":{
      "customerIdentifiers":{
         "customerId":876,
         "Instore":{
            "mobile":"919740000000",
            "email":"[email protected]",
            "externalId":"536236462453"
         },
         "wechat":{
            "accounts":[
               {
                  "accountId":"HDHSDHS32347287D",
                  "identifiers":[
                     {
                        "identifierType":"wechatId",
                        "identifierValue":"SGHDGAHA74278sdfG"
                     }
                  ]
               },
               {
                  "accountId":"JKLMNOPuy4y3554Y",
                  "identifiers":[
                     {
                        "identifierType":"wechatId",
                        "identifierValue":"cbdhdhhad74278sdfj"
                     }
                  ]
               }
            ]
         }
      },
      "triggeringActivity":{
         "name":"pointsRedemption",
         "identifiers":[
            {
               "key":"billId",
               "value":"123456"
            }
         ],
         "enteredAt":{
            "id":949,
            "store":{
               "code":"str1.brand",
               "name":"str1.brand",
               "externalId":"DFSDHGFSH6642664617",
               "externalId1":"GDGSDHDGH3744277474",
               "externalId2":"GHSDGHGHH6776246444"
            },
            "till":{
               "code":"till1.str1.brand",
               "name":"till1.str1.brand"
            }
         }
      },
      "loyaltyProgramId":1487,
      "totalPointsRedeemed":235,
      "redeemedPointsCurrencyValue":470,
      "redemptionFromEarningPrograms":[
         {
            "programId":1487,
            "pointsRedeemed":235,
            "programCurrentPoints":500
         }
      ]
   }
}

Promised Points Conversion to Current Points Event (promisedToCurrentPointsConversion)

{
   "eventName":"promisedToCurrentPointsConversion",
   "eventId":"9c4b09c2-f564-4c6a-abb9-3ecd14506ec4",
   "orgId":50241,
   "refId":"50241_null",
   "apiRequestId":"66f7e67c-576d-4120-9dd2-9cdeb1878063",
   "createdAt":1637753410382,
   "data":{
      "customerIdentifiers":{
         "customerId":341598908,
         "instore":{
            "mobile":"919700000380"
         }
      },
      "earningActivityReference":[
         {
            "name":"CustomerRegistration",
            "enteredAt":1637731450000,
            "pointsConverted":500,
            "identifiers":[
               {
                  "key":"billNumber",
                  "value":"null"
               },
               {
                  "key":"EventLogId",
                  "value":"1805818"
               }
            ]
         }
      ],
      "loyaltyProgramDetails":{
         "id":934,
         "name":"Ishita_OrgDefaultProgram",
         "isDefault":true,
         "pointsToCurrencyRatio":1,
         "tiers":[
            {
               "tierNumber":1,
               "tierName":"Bronze"
            },
            {
               "tierNumber":2,
               "tierName":"Silver"
            }
         ]
      },
      "loyaltyProgramId":934,
      "pointsConverted":500,
      "programCurrentPoints":500,
      "programLifetimePoints":500
   },
   "loyaltyEventId":null
}

Points Expired Event (PointsExpired)

{
   "eventName":"pointsExpired",
   "eventId":"abacd-12345-ABCD",
   "orgId":1655,
   "refId":"1655_684494987",
   "createdAt":156474848484,
   "data":{
      "customerIdentifiers":{
         "customerId":876,
         "instore":{
            "mobile":"919740000000",
            "email":"[email protected]",
            "externalId":"536236462453"
         }
      },
      "triggeringActivity":{
         
      },
      "loyaltyProgramId":1487,
      "pointsExpired":1000
   }
}

Points Expired Reminder Event (pointsExpired)

{
    "eventName": "pointsExpiryReminder",
    "eventId": "bd69ac73-0c7c-471a-b2cd-1f8251b34b60",
    "orgId": 50750,
    "refId": "50750_7616f6fc-9cc3-4b92-9cfa-b1177ea25a6c",
    "apiRequestId": "2cb3ea1a-0841-4cd4-ac6a-1adb1c3891d6",
    "createdAt": 1685864957859,
    "data": {
        "customerIdentifiers": {
            "customerId": 381750905
        },
        "entityInformation": {
            "entityType": "USER",
            "entityId": 381750905
        },
        "loyaltyProgramDetails": {
            "id": 1933,
            "name": "PellDungaAgarUseKiyaTohDefaultProgram",
            "isDefault": true,
            "pointsToCurrencyRatio": 1,
            "tiers": [
                {
                    "tierNumber": 1,
                    "tierName": "A"
                },
                {
                    "tierNumber": 2,
                    "tierName": "B"
                },
                {
                    "tierNumber": 3,
                    "tierName": "C"
                }
            ]
        },
        "loyaltyProgramId": 1933,
        "pointsScheduledForExpiry": 300,
        "scheduledExpiryDate": "2023-06-19"
    },
    "loyaltyEventId": null
}

Points Transferred Initiated Event (pointsTransferInitiated)

{
   "eventName":"pointsTransferredInitiated",
   "eventId":"5a6a4355-e0de-408b-af0b-09263f4a3a3c",
   "orgId":1800,
   "refId":"1800_wKYspGLRNC",
   "apiRequestId":"e6d312257f71e0a8705f602cbf91695d",
   "createdAt":1619199662949,
   "data":{
      "customerIdentifiers":{
         "customerId":481191981,
         "instore":{
            "externalId":"CAP00005"
         }
      },
      "loyaltyProgramDetails":{
         "id":1422,
         "name":"Tata IHCL Loyalty",
         "isDefault":false,
         "pointsToCurrencyRatio":1,
         "tiers":[
            {
               "tierNumber":1,
               "tierName":"Copper*"
            },
            {
               "tierNumber":2,
               "tierName":"Copper"
            },
            {
               "tierNumber":3,
               "tierName":"Silver"
            },
            {
               "tierNumber":4,
               "tierName":"Gold"
            },
            {
               "tierNumber":5,
               "tierName":"Platinum"
            }
         ]
      },
      "loyaltyProgramId":1422,
      "totalPointsTransferred":10,
      "transferReceivingCustomerIdentifiers":{
         "customerId":473772509,
         "instore":{
            "mobile":"e59baa6df5a41d818608688fe3dcaccc",
            "email":"e59baa6df5a41d818608688fe3dcaccc",
            "externalId":"e59baa6df5a41d818608688fe3dcaccc"
         }
      },
      "redemptionFromEarningPrograms":[
         {
            "programId":1422,
            "pointsRedeemed":10,
            "programCurrentPoints":480
         }
      ]
   },
   "loyaltyEventId":"wKYspGLRNC"
}

Points Transferred Received (pointsTransferReceived)

{
   "eventName":"pointsTransferredReceived",
   "eventId":"ae51684a-5e64-4d1e-b48a-9dcd4fc5c6ec",
   "orgId":1800,
   "refId":"1800_wKYspGLRNC",
   "apiRequestId":"e6d312257f71e0a8705f602cbf91695d",
   "createdAt":1619199662971,
   "data":{
      "customerIdentifiers":{
         "customerId":473772509,
         "instore":{
            "mobile":"e59baa6df5a41d818608688fe3dcaccc",
            "email":"e59baa6df5a41d818608688fe3dcaccc",
            "externalId":"e59baa6df5a41d818608688fe3dcaccc"
         }
      },
      "loyaltyProgramDetails":{
         "id":1422,
         "name":"Tata IHCL Loyalty",
         "isDefault":false,
         "pointsToCurrencyRatio":1,
         "tiers":[
            {
               "tierNumber":1,
               "tierName":"Copper*"
            },
            {
               "tierNumber":2,
               "tierName":"Copper"
            },
            {
               "tierNumber":3,
               "tierName":"Silver"
            },
            {
               "tierNumber":4,
               "tierName":"Gold"
            },
            {
               "tierNumber":5,
               "tierName":"Platinum"
            }
         ]
      },
      "loyaltyProgramId":1422,
      "totalPointsTransferred":10,
      "transferInitiatingCustomerIdentifiers":{
         "customerId":481191981,
         "instore":{
            "externalId":"CAP00005"
         }
      }
   },
   "loyaltyEventId":"wKYspGLRNC"
}

Redeemed Points Reversed Event (redeemedPointsReversed)

{
   "body":{
      "eventName":"redeemedPointsReversed",
      "eventId":"a95295a5-9b1c-41a0-a016-35c21a122eab",
      "orgId":50614,
      "refId":"50614_55a977cd872a51bdc00a998997ccf85f",
      "apiRequestId":"55a977cd872a51bdc00a998997ccf85f",
      "createdAt":1620043229080,
      "data":{
         "customerIdentifiers":{
            "customerId":406361177,
            "instore":{
               "mobile":"919627263745",
               "email":"[email protected]"
            }
         },
         "triggeringActivity":{
            "name":"PointsRedemptionReversal",
            "identifiers":[
               {
                  "key":"redemptionId",
                  "value":"hhSRLt"
               }
            ],
            "enteredBy":{
               "id":50021318,
               "till":{
                  "code":"emftill1",
                  "name":"emftill1"
               },
               "store":{
                  "code":"emf_auto.store1",
                  "name":"EmfAutoStore",
                  "externalId":"EMFauto1",
                  "externalId1":"",
                  "externalId2":""
               }
            }
         },
         "loyaltyProgramDetails":{
            "id":1398,
            "name":"EMF_AutoDefaultProgram",
            "isDefault":true,
            "pointsToCurrencyRatio":1,
            "tiers":[
               {
                  "tierNumber":1,
                  "tierName":"Silver"
               },
               {
                  "tierNumber":2,
                  "tierName":"Gold"
               },
               {
                  "tierNumber":3,
                  "tierName":"Diamond"
               },
               {
                  "tierNumber":4,
                  "tierName":"Ruby"
               }
            ]
         },
         "loyaltyProgramId":1398,
         "redeemedPointsReversed":10,
         "redemptionSummaryId":8770,
         "redemptionReversalToEarningPrograms":[
            {
               "programId":1398,
               "redeemedPointsReversed":10,
               "programCurrentPoints":1280
            }
         ]
      },
      "loyaltyEventId":"55a977cd872a51bdc00a998997ccf85f"
   }
}

Issued Points Reversed Event (issuedPointsReversed)

{
   "body":{
      "eventName":"issuedPointsReversed",
      "eventId":"43618011-da15-44b4-a779-97062b4f1955",
      "orgId":50614,
      "refId":"50614_X3gx2rgzLJ",
      "apiRequestId":"1c63828647dd3177650187311c63b025",
      "createdAt":1620042294779,
      "data":{
         "customerIdentifiers":{
            "customerId":406361177,
            "instore":{
               "mobile":"919627263745",
               "email":"[email protected]"
            }
         },
         "triggeringActivity":{
            "name":"ReturnBill",
            "identifiers":[
               {
                  "key":"billId",
                  "value":"2147644775"
               },
               {
                  "key":"billNumber",
                  "value":"trans_BillNo_9807417180"
               }
            ],
            "enteredBy":{
               "id":50021318,
               "till":{
                  "code":"emftill1",
                  "name":"emftill1"
               },
               "store":{
                  "code":"emf_auto.store1",
                  "name":"EmfAutoStore",
                  "externalId":"EMFauto1",
                  "externalId1":"",
                  "externalId2":""
               }
            }
         },
         "loyaltyProgramDetails":{
            "id":1398,
            "name":"EMF_AutoDefaultProgram",
            "isDefault":true,
            "pointsToCurrencyRatio":1,
            "tiers":[
               {
                  "tierNumber":1,
                  "tierName":"Silver"
               },
               {
                  "tierNumber":2,
                  "tierName":"Gold"
               },
               {
                  "tierNumber":3,
                  "tierName":"Diamond"
               },
               {
                  "tierNumber":4,
                  "tierName":"Ruby"
               }
            ]
         },
         "loyaltyProgramId":1398,
         "programCurrentPoints":1300,
         "programLifetimePoints":1300,
         "totalIssuedPointsReversed":2734.502,
         "regularPointsReversed":1711.5,
         "promisedPointsReversed":1023.002,
         "promotionalPointsReversed":[
            {
               "promotionIdentifier":"80542",
               "promotionType":"BILL",
               "promotionPoints":811.5
            },
            {
               "promotionIdentifier":"huhutest2",
               "promotionType":"LINEITEM",
               "promotionPoints":100
            },
            {
               "promotionIdentifier":"huhutest2",
               "promotionType":"LINEITEM",
               "promotionPoints":200
            }
         ]
      },
      "loyaltyEventId":"X3gx2rgzLJ"
   }
}

Coupon

Coupon Issue Event (CouponIssue)

{
   "eventName":"CouponIssue",
   "eventId":"78871533-bec4-457b-8dce-17bc38a5a2d1",
   "orgId":1231,
   "refId":"1231_353122_397759647:397759647",
   "apiRequestId":"08ccc811706f99919580fdf035c52a72",
   "createdAt":1630927651741,
   "data":{
      "addedAt":1630927651741,
      "addedBy":{
         "id":15071481
      },
      "coupons":[
         {
            "id":397759647,
            "code":"2YPHHFQR",
            "valid_till":2556124199000,
            "issued_on":1630927651000,
            "customerIdentifiers":{
               "customerId":414935964
            }
         }
      ],
      "series_info":{
         "id":353122,
         "description":"traffic_simulator",
         "seriesType":"LOYALTY",
         "clientHandlingType":"DISC_CODE",
         "valid_till":2556037800000,
         "discount_code":"NO_VALUE",
         "discount_type":"ABS",
         "discount_value":500
      },
      "issualType":"SINGLE"
   },
   "loyaltyEventId":null
}

Coupon Redeem Event (CouponRedeem)

{
   "eventName":"CouponRedeem",
   "eventId":"3e7bd633-1864-4e26-9f47-0c50f7a6e64c",
   "orgId":1231,
   "refId":"1231_353122_9575291",
   "apiRequestId":"3c6e2d73-9002-45fa-a9f3-6b09376b5f87",
   "createdAt":1630932050423,
   "data":{
      "addedAt":1630932050423,
      "addedBy":{
         "id":15071481
      },
      "coupon":{
         "id":397759647,
         "code":"2YPHHFQR",
         "redemptionId":9575291,
         "redemptionDate":1630932050000,
         "series_info":{
            "id":353122,
            "description":"traffic_simulator",
            "seriesType":"LOYALTY",
            "clientHandlingType":"DISC_CODE",
            "valid_till":2556037800000,
            "discount_code":"NO_VALUE",
            "discount_type":"ABS",
            "discount_value":500
         }
      },
      "customerIdentifiers":{
         "customerId":414935964,
         "instore":{
            
         },
         "wechat":{
            "accounts":[
               {
                  "accountId":"WECHAT-CM",
                  "identifiers":[
                     {
                        "identifierType":"cuid",
                        "identifierValue":"cuid_91796467656"
                     },
                     {
                        "identifierType":"unionId",
                        "identifierValue":"unionId_91796467656"
                     },
                     {
                        "identifierType":"cardnumber",
                        "identifierValue":"card_91796467656"
                     }
                  ]
               }
            ]
         }
      },
      "transaction":{
         "bill_id":0,
         "number":""
      }
   },
   "loyaltyEventId":null
}

Tier

Tier Upgraded (tierUpgraded)

{
   "body":{
      "eventName":"tierUpgraded",
      "eventId":"00c8084c-0db4-4411-875b-21249dbfc4d8",
      "orgId":50614,
      "refId":"50614_iLsAlmiyX8",
      "apiRequestId":"a07a098f6c10459da0fd41cd6abc8172",
      "createdAt":1619517441506,
      "data":{
         "customerIdentifiers":{
            "customerId":406273266,
            "instore":{
               "mobile":"919845600000",
               "email":"[email protected]"
            }
         },
         "loyaltyProgramDetails":{
            "id":1427,
            "name":"EMF_autoProgram2",
            "isDefault":false,
            "pointsToCurrencyRatio":1,
            "tiers":[
               {
                  "tierNumber":1,
                  "tierName":"SilverP2"
               },
               {
                  "tierNumber":2,
                  "tierName":"GoldP2"
               },
               {
                  "tierNumber":3,
                  "tierName":"Diamond"
               }
            ]
         },
         "loyaltyProgramId":1427,
         "previousTierNumber":1,
         "upgradedTierNumber":2,
         "tierExpiryDate":"2121-04-27",
         "notes":"Upgrading to Slab : Slab[2]: Name [GoldP2] Description [test] , Criteria: Primary",
         "upgradeType":"STRATEGY"
      },
      "loyaltyEventId":"iLsAlmiyX8"
   }
}

Tier Renewed Event (tierRenewed)

{
   "eventName":"tierRenewed",
   "eventId":"12345abacde",
   "orgId":1655,
   "refId":"1655_123684494987123",
   "createdAt":156474848484,
   "data":{
      "customerIdentifiers":{
         "customerId":876,
         "instore":{
            "mobile":"919740000000",
            "email":"[email protected]",
            "externalId":"536236462453"
         }
      },
      "triggeringActivity":{
         
      },
      "loyaltyProgramId":1487,
      "currentTierNumber":3,
      "tierExpiryDate":"2020-04-25",
      "notes":"Renewing to Slab : Slab[2]: Name [Cutter] Description [Cut 2]",
      "renewType":"STRATEGY"
   }
}
Generic

Tier Downgraded Event (tierDowngraded)

{
   "eventName":"tierDowngraded",
   "eventId":"12345XYZE",
   "orgId":1655,
   "refId":"1655_1237123",
   "createdAt":156474848484,
   "data":{
      "customerIdentifiers":{
         "customerId":876,
         "instore":{
            "mobile":"919740000000",
            "email":"[email protected]",
            "externalId":"536236462453"
         }
      },
      "triggeringActivity":{
         
      },
      "loyaltyProgramId":1487,
      "downgradedTierNumber":1,
      "previousTierNumber":3,
      "tierExpiryDate":"2020-04-25"
   }
}

Tier Downgrade Reminder Event (tierDowngradeReminder)

{
   "eventName":"tierDowngradeReminder",
   "eventId":"XYZE12345",
   "orgId":1655,
   "refId":"1655_14555523",
   "createdAt":156474848484,
   "data":{
      "customerIdentifiers":{
         "customerId":876,
         "instore":{
            "mobile":"919740390055",
            "email":"[email protected]",
            "externalId":"536236462453"
         }
      },
      "triggeringActivity":{
         
      },
      "loyaltyProgramId":1487,
      "scheduledDowngradeDate":"2020-04-25",
      "currentTierNumber":3
   }
}

Partner Program

Partner Program Linked (partnerProgramLinked)

{
   "eventName":"partnerProgramLinked",
   "eventId":"fcec96c2-eb9b-420b-80ed-71eba7f70837",
   "orgId":50191,
   "refId":"50191_rxw3wyNBGd",
   "apiRequestId":"a150f30e86f3749958f553809c6d3555",
   "createdAt":1622457270215,
   "data":{
      "customerIdentifiers":{
         "customerId":354971193,
         "instore":{
            "mobile":"919666308709",
            "email":"[email protected]",
            "externalId":"919666308709"
         }
      },
      "loyaltyProgramId":855,
      "partnerProgramId":25,
      "partnerProgramName":"Demo-p1",
      "partnerProgramType":"EXTERNAL",
      "customerPartnerProgramDetails":{
         "partnerTierExpiryDate":"2021-06-30",
         "partnerTierNumber":1,
         "membershipNumber":"123-asa3"
      }
   },
   "loyaltyEventId":null
}

Partner Program Updated (partnerProgramUpdated)

{
   "eventName":"partnerProgramUpdated",
   "eventId":"caff89da-4c1c-4a5c-a27d-8f4f6f74f541",
   "orgId":50191,
   "refId":"50191_esJyjQ23RQ",
   "apiRequestId":"95d1d0d76dda1565a3c2905f230c3975",
   "createdAt":1622457292026,
   "data":{
      "customerIdentifiers":{
         "customerId":354971193,
         "instore":{
            "mobile":"919666308709",
            "email":"[email protected]",
            "externalId":"919666308709"
         }
      },
      "loyaltyProgramId":855,
      "partnerProgramId":25,
      "partnerProgramName":"Demo-p1",
      "partnerProgramType":"EXTERNAL",
      "updateType":"UPGRADE",
      "customerPartnerProgramDetails":{
         "partnerTierExpiryDate":"2021-06-29",
         "partnerTierNumber":2,
         "membershipNumber":"123-asa3"
      }
   },
   "loyaltyEventId":null
}

Partner Program Delinked (partnerProgramDelinked)

{
   "eventName":"partnerProgramDelinked",
   "eventId":"3f9f300b-6110-462f-935a-0e34c1ad74f6",
   "orgId":50191,
   "refId":"50191_5bRlm026Ms",
   "apiRequestId":"72b54b94daf4a4de076b67915442a9dd",
   "createdAt":1622457570813,
   "data":{
      "customerIdentifiers":{
         "customerId":354971193,
         "instore":{
            "mobile":"919666308709",
            "email":"[email protected]",
            "externalId":"919666308709"
         }
      },
      "loyaltyProgramId":855,
      "partnerProgramId":24,
      "partnerProgramName":"NoTier-p1",
      "partnerProgramType":"EXTERNAL"
   },
   "loyaltyEventId":null
}

Supplementary Partner Program Expiry Reminder (supplementaryMembershipExpiryReminder)

{
   "eventName":"supplementaryMembershipExpiryReminder",
   "eventId":"e084e887-e1d5-45cf-b2bf-55024efeb8fe",
   "orgId":50191,
   "refId":"50191_90ab89ff-ca0d-4ccd-8b40-2b36614d4c20_b1",
   "apiRequestId":"dee1c05f-bbd1-407e-8244-ec4f36a8dcf3",
   "createdAt":1622518207403,
   "data":{
      "customerIdentifiers":{
         "customerId":354971186,
         "instore":{
            "mobile":"919100166820",
            "email":"[email protected]",
            "externalId":"919100166820"
         }
      },
      "loyaltyProgramId":855,
      "partnerProgramId":22,
      "partnerProgramName":"SPprogram1",
      "scheduledExpiryDate":"2021-06-01"
   },
   "loyaltyEventId":null
}

Marvel Rewards

RewardIssued

  • "type": VOUCHER, POINTS, physical voucher, free voucher,

  • "redemptionType": INTOUCH_REWARD, VENDOR_INTOUCH_REWARD, VENDOR_ONLY_REWARD

{
   "eventName":"rewardIssued",
   "eventId":"e8a80e96-4e0d-4c46-b15a-8de0636e5a0d",
   "orgId":151060,
   "refId":"151060_868",
   "apiRequestId":"53d7d026-ffbf-4e8d-a1d2-09507a782856",
   "createdAt":1619119175801,
   "data":{
      "customerIdentifiers":{
         "customerId":8381714,
         "instore":{
            "mobile":"919742000000",
            "email":"",
            "externalId":"90000000001832700"
         }
      },
      "rewardId":868,
      "type":"VOUCHER",
      "redemptionType":"INTOUCH_REWARD",
      "startDate":1619119170000,
      "endDate":1667174400000,
      "intouchPoints":10,
      "intouchSeriesId":"2483",
      "priority":1,
      "tier":"SILVER",
      "group":"test_group",
      "label":"test_lable",
      "intouchRewardDetails":{
         "intouchCouponCode":"CQDNUT1W",
         "codeExpiry":4758460200000
      }
   },
   "loyaltyEventId":null
}

Card

Card updated event (cardUpdated)

{
   "eventName":"cardUpdated",
   "eventId":"dacbadcf-921b-4723-b5b1-1cfb8bffeaef",
   "orgId":50740,
   "refId":"50740_204684",
   "apiRequestId":"f0bce574efab65c9acaa26ba0a6bf202",
   "createdAt":1637577440321,
   "data":{
      "cardNumber":"visa123112121744880",
      "previousStatusLabel":"new",
      "currentStatusLabel":"NOT_ISSUED",
      "currentExtendedFields":[
         {
            "name":"year_of_registration",
            "value":"36"
         },
         {
            "name":"limit_set_by",
            "value":"tom"
         }
      ],
      "previousExtendedFields":[
         {
            "name":"year_of_registration",
            "value":"12"
         },
         {
            "name":"card_balance",
            "value":"848.0"
         }
      ],
      "currentCustomFields":[
         {
            "name":"period_card",
            "value":"hdhfjhcfhfh"
         },
         {
            "name":"neymar",
            "value":"nhdjdj"
         },
         {
            "name":"bloodgroup",
            "value":"b-"
         },
         {
            "name":"inesita",
            "value":"hdd"
         }
      ],
      "previousCustomFields":[
         {
            "name":"period_card",
            "value":"2021"
         },
         {
            "name":"state",
            "value":"Karnataka"
         },
         {
            "name":"bloodgroup",
            "value":"0+"
         }
      ]
   },
   "loyaltyEventId":null
}

Request updated

Transaction request update

{
  "eventId": "0f5d96e4-f6ff-4a8a-8522-083dc0d2d0e5",
  "eventType": "requestUpdated",
  "consumerGroupId": null,
  "actionType": "START",
  "timeStamp": 1683879070938,
  "attributes": {
    "createdAt": 1683879070934,
    "data": {
      "requestType": "TRANSACTION",
      "requestBaseType": "REGULAR_TXN_ADD",
      "requestTrackingId": 10585,
      "status": "REJECTED",
      "comments": "Receipt is missing information",
      "updatedAt": 1683879070915,
      "updatedBy": {
        "user": {
          "username": "1675438912_"
        },
        "id": 441
      },
      "customerIdentifiers": {
        "customerId": 16971,
        "instore": {
          "email": "[email protected]",
          "externalId": "602f0c3c-e8e3-4b7f-9b18-0b7f3448a418"
        }
      },
      "updatedFields": [
        {
          "fieldName": "status",
          "previousVal ue": "PENDING",
          "currentValue": "REJECTED"
        }
      ],
      "associatedEntityFields": [
        
      ]
    },
    "eventName": "requestUpdated",
    "refId": "2000003_10585",
    "apiRequestId": "eb93e66d-5efa-44f7-9f47-ffcd1 a91dd78",
    "orgId": 2000003
  }
}


PII deletion request update

"eventName": "requestUpdated",
	"eventId": "48b6ad35-6232-45bf-bf41-deb77065b9e3",
	"orgId": 781,
	"createdAt": 1663690031667,
	"requestTrackingId": "7676878",
	"requestType": "CUSTOMER",
	"requestBaseType": "DELETE",
	"comments": "any request related comments",
	"status": "APPROVED",
	"customerId": 4545332,
	"data": {
		"requestId": "id",
		"createdBy": {
			"id": 15000375,
			"till": {
				"code": "kn.003",
				"name": "kn.003"
			},
			"store": {
				"code": "sskn1111",
				"name": "KNIGHT_STORE_QA",
				"externalId": "er4543",
				"externalId1": "fef343",
				"externalId2": "fef3434"
			}
		},
		"updatedFields": [{
			"fieldName": "status",
			"previousValue": "PENDING",
			"currentValue": "APPROVED"
		}]
	}
}

Target (Milestone)

Event notification for the change in milestone achieved value on return of purchases

As of now, whenever a customer makes a purchase, all the milestone values which can be impacted with that purchase will be impacted, and the information of the new milestone achieved value, etc.. will be sent as an event notification.

However, whenever a customer returns a transaction, the milestone value which previously increased because of that purchase will also be decreased accordingly. But there is no event notification for such instances. To understand with an example:

Step 1: Milestone on lifetime purchases created, and milestone value is 10,000.
Step 2: Customer made a transaction worth 3000.
Step 3: Customer’s milestone achieved value increased from 0 → 3000
Step 4: Brand will get an event notification about the above step.
Step 5: After days, the customer returned the purchase of step-2.
Step 6: Now the milestone achieved value will decrease from 3000 → 0.
Step 7: But brands/customers are not getting any event notification of the same.

Now, with this latest enhancement, brands will get notified even in the case of return transactions about the decreased milestone value.
Following example shows the value in the notification:

If the “Name” key is “ReturnBill”, it’s a return transaction where milestone value is decreased by the “currentEventTargetValue” (400 here). We are not returning negative since it can lead to integration issues.

Badges

Event notifications on earning a badge

{
    "eventName": "badgeEarned",
    "eventId": "72fe1900-a413-42d6-9582-f955474739aa",
    "orgId": 50933,
    "refId": "50933_651bb7bac983d041efbc78fc",
    "apiRequestId": "e4397e00-de8d-4a54-b86b-affe305406cb",
    "createdAt": 1696315322593,
    "data": {
        "customerIdentifiers": {
            "customerId": 381921157,
            "loyaltyType": "loyalty",
            "instore": {
                "mobile": "918811992995",
                "email": "[email protected]",
                "externalId": "5a1111cfc5e3239dc0b92cc410cb28"
            }
        },
        "badgeId": "650c0896aefcde237f3dba43",
        "earnId": "651bb7bac983d041efbc78fc",
        "earnedOn": 1696315322450,
        "earnConstraints": [
            {
                "constraintLevel": "BADGE",
                "constraintType": "OVERALL",
                "maxEarnLimit": 1000,
                "currentEarnCount": 5
            },
            {
                "constraintLevel": "BADGE",
                "constraintType": "ROLLING_WINDOW",
                "rollType": "DAYS",
                "rollValue": 7,
                "maxEarnLimit": 300,
                "currentEarnCount": 2
            },
            {
                "constraintLevel": "CUSTOMER",
                "constraintType": "ROLLING_WINDOW",
                "rollType": "DAYS",
                "rollValue": 5,
                "maxEarnLimit": 50,
                "currentEarnCount": 2
            },
            {
                "constraintLevel": "CUSTOMER",
                "constraintType": "ROLLING_WINDOW",
                "rollType": "WEEKS",
                "rollValue": 1,
                "maxEarnLimit": 100,
                "currentEarnCount": 2
            },
            {
                "constraintLevel": "CUSTOMER",
                "constraintType": "ROLLING_WINDOW",
                "rollType": "MONTHS",
                "rollValue": 1,
                "maxEarnLimit": 200,
                "currentEarnCount": 5
            },
            {
                "constraintLevel": "CUSTOMER",
                "constraintType": "NONE"
            }
        ],
        "triggeringActivity": {
            "identifiers": [],
            "enteredBy": {
                "id": 50660494,
                "till": {
                    "code": "shubham.test123",
                    "name": "shubham.test123"
                }
            },
            "additionalAttributes": []
        }
    },
    "loyaltyEventId": null
}