This page provides the list of events and associated payload for internal events (via RabbitMQ/AWS MQ) and external events (via EventBridge) for the Promotions microservice.
External Events via EventBridge
The following events contain the entity changed in the event message payload.
List of Events
| S.No. | API call | Call detail | Event Type | Identifier |
|---|---|---|---|---|
| 1. | POST | CreatePromotion | promotionservice/promotion/create | response_Promotion.id |
| 2. | PUT | UpdatePromotion | promotionservice/promotion/update | response_Promotion.id |
| 3. | DELETE | DeletePromotion | promotionservice/promotion/delete | response_Promotion.id |
| 4. | POST | AssignOffer | promotionservice/offer/assign | response_promoCodeState.userId |
| 5. | POST | BlockOffer | promotionservice/offer/block | response_promoCodeState.userId |
| 6. | POST | ClonePromotionGroup | promotionservice/promotiongroup/clone | response_promotionGroupResponse.promotionGroup.id |
| 7. | POST | ClonePromotion | promotionservice/promotion/clone | response_promotionResponse.promotion.id |
| 8. | POST | CreateProject | promotionservice/project/create | request_id |
| 9. | POST | CreatePromoCodeList | promotionservice/promocodelist/create | response_promoCodeListResponse.collectionId |
| 10. | POST | CreatePromotionGroup | promotionservice/promotiongroup/create | response_promotionGroupResponse.promotionGroup.id |
| 11. | POST | CreatePromotionList | promotionservice/promotionlist/create | response_promotionListResponse.collectionId |
| 12. | DELETE | DeletePromoCodeList | promotionservice/promotioncodelist/delete | response_promoCodeListResponse.collectionId |
| 13. | DELETE | DeletePromotionGroup | promotionservice/promotiongroup/delete | request_id |
| 14. | DELETE | DeletePromotionList | promotionservice/promotionlist/delete | response_promotionListResponse.collectionId |
| 15. | PATCH | PatchUpdateProject | promotionservice/project/patch | request_id |
| 16. | PATCH | PatchUpdatePromoCodeList | promotionservice/promocodelist/patch | response_promoCodeListResponse.collectionId |
| 17. | PATCH | PatchUpdatePromotionList | promotionservice/promotionlist/patch | response_promotionListResponse.collectionId |
| 18. | PUT | UpdateProject | promotionservice/project/update | request_id |
| 19. | PUT | UpdatePromoCodeList | promotionservice/promocodelist/update | response_promoCodeListResponse.collectionId |
| 20. | PUT | UpdatePromotionGroup | promotionservice/promotiongroup/update | response_promotionGroupResponse.promotionGroup.id |
Payload
CreatePromotion
Event Type: promotionservice/promotion/create
{
"version": "0",
"id": "184bd5bb-3d5f-b23f-64bf-6803744864ab",
"detail-type": "promotionservice/promotion/create",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:13:16Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "mEMIyd",
"timestamp": 1715245996915,
"payload": {
"responseCode": "PRPRCRE0000",
"responseMessage": "Promotion created successfully",
"promotionResponse": {
"collectionId": 2058,
"promotion": {
"name": "EQPLAT-16492",
"startDate": "2025-05-01T03:30:59.59",
"endDate": "2084-04-16T03:30:59.59",
"notes": "string",
"priority": 2,
"status": "INACTIVE",
"createdOn": "2024-05-09T09:13:16.905",
"createdBy": 1,
"updatedOn": "2024-05-09T09:13:16.905",
"updatedBy": 1,
"archive": "UNARCHIVED",
"id": "mEMIyd",
"projectId": "0zJnUT",
"promoCodeType": "DEFAULT_TYPE",
"promoCodeUsageCount": 0,
"promoCodeUsageDays": 0,
"offerOn": 1,
"promotionGroupId": "1XJcuO",
"changeLog": "Promotion has been created for projectId 0zJnUT",
"offerType": 1,
"stopFurtherProcessing": "NEVER",
"promotionInformation": {
"message": [
{
"locale": "en_US",
"text": "string"
}
]
},
"startHour": 0,
"endHour": 0
}
}
},
"collectionId": "2058",
"eventType": "promotionservice/promotion/create",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
UpdatePromotion
Event Type: promotionservice/promotion/update
{
"version": "0",
"id": "54e753ed-9a07-0762-baf0-3c465c4f34a8",
"detail-type": "promotionservice/promotion/update",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:13:25Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "n0pvqo",
"timestamp": 1715246005931,
"payload": {
"responseCode": "PRPRUPD0000",
"responseMessage": "Promotion updated successfully",
"promotionResponse": {
"collectionId": 2058,
"promotion": {
"name": "EQPLAT-16492",
"startDate": "2025-05-01T03:30:59.59",
"endDate": "2084-04-16T03:30:59.59",
"notes": "string",
"priority": 0,
"status": "INACTIVE",
"createdOn": "2024-05-09T09:13:22.41",
"createdBy": 1,
"updatedOn": "2024-05-09T09:13:25.92",
"updatedBy": 1,
"archive": "UNARCHIVED",
"id": "n0pvqo",
"projectId": "0zJnUT",
"promoCodeType": "DEFAULT_TYPE",
"promoCodeUsageCount": 0,
"promoCodeUsageDays": 0,
"offerOn": 1,
"promotionGroupId": "1XJcuO",
"changeLog": "Promotion has been updated for projectId 0zJnUT",
"offerType": 1,
"stopFurtherProcessing": "NEVER",
"promotionInformation": {
"message": [
{
"locale": "en_US",
"text": "string"
}
]
},
"startHour": 0,
"endHour": 0
}
}
},
"collectionId": "2058",
"eventType": "promotionservice/promotion/update",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
DeletePromotion
Event Type: promotionservice/promotion/delete
{
"version": "0",
"id": "7773ecd3-18b3-cda7-b6e6-d305d4254d9f",
"detail-type": "promotionservice/promotion/delete",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:13:47Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"timestamp": 1715246027474,
"payload": {
"responseCode": "PRPRDEL2114",
"responseMessage": "Promotion deleted successfully",
"promotionResponse": {
"collectionId": 2058
}
},
"collectionId": "2058",
"eventType": "promotionservice/promotion/delete",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
AssignOffer
Event Type: promotionservice/offer/assign
{
"version": "0",
"id": "fcf93275-bd84-1528-8156-95143d9996dc",
"detail-type": "promotionservice/offer/assign",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:13:40Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "0",
"timestamp": 1715246020346,
"payload": {
"responseCode": "PRPOASN1000",
"responseMessage": "Assign offer success",
"status": 0,
"promoCodeState": {
"userId": 0,
"collectionId": 2058,
"promoCodesInfo": [
{
"responseCode": "PRPOASN1005",
"responseMessage": "The codes provided are invalid",
"promoCode": "BOGO20"
}
]
}
},
"collectionId": "2058",
"eventType": "promotionservice/offer/assign",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
BlockOffer
Event Type: promotionservice/offer/block
{
"version": "0",
"id": "8496a7b0-7f68-ff85-6b69-7c1bc8784561",
"detail-type": "promotionservice/offer/block",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:13:43Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "0",
"timestamp": 1715246023919,
"payload": {
"responseCode": "PRPOBLK1000",
"responseMessage": "Block offer success",
"status": 0,
"promoCodeState": {
"userId": 0,
"collectionId": 2058,
"promoCodesInfo": [
{
"responseCode": "PRPOBLK1005",
"responseMessage": "The codes provided are invalid",
"promoCode": "MUNTIME1OFF-10"
}
]
}
},
"collectionId": "2058",
"eventType": "promotionservice/offer/block",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
ClonePromotionGroup
Event Type: promotionservice/promotiongroup/clone
{
"version": "0",
"id": "0575b37f-c1ff-6733-fb8b-e6b4cfe003a9",
"detail-type": "promotionservice/promotiongroup/clone",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:12:58Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "h3EtKl",
"timestamp": 1715245978663,
"payload": {
"responseCode": "PRPGCLO3039",
"responseMessage": "PromotionGroup cloned successfully",
"promotionGroupResponse": {
"collectionId": 2058,
"promotionGroup": {
"name": "EQPLAT-16501",
"startDate": "2037-09-03T12:42:15",
"endDate": "2038-08-13T15:40:32",
"notes": "notes21",
"priority": 0,
"status": "ACTIVE",
"createdOn": "2024-05-09T09:12:58.65",
"createdBy": 1,
"updatedOn": "2024-05-09T09:12:58.652",
"updatedBy": 1,
"archive": "UNARCHIVED",
"stopFurtherProcessing": "NEVER",
"id": "h3EtKl",
"projectId": "0zJnUT",
"changeLog": "Promotion Group has been created for projectId 0zJnUT"
}
}
},
"collectionId": "2058",
"eventType": "promotionservice/promotiongroup/clone",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
ClonePromotion
Event Type: promotionservice/promotion/clone
{
"version": "0",
"id": "e3ca5fda-b365-729c-eae6-eea2455a8445",
"detail-type": "promotionservice/promotion/clone",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:13:22Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "n0pvqo",
"timestamp": 1715246002435,
"payload": {
"responseCode": "PRPRCRE2117",
"responseMessage": "Promotion cloned successfully",
"promotionResponse": {
"collectionId": 2058,
"promotion": {
"name": "EQPLAT-16492",
"startDate": "2025-05-01T03:30:59.59",
"endDate": "2084-04-16T03:30:59.59",
"notes": "string",
"priority": 2,
"status": "INACTIVE",
"createdOn": "2024-05-09T09:13:22.41",
"createdBy": 1,
"updatedOn": "2024-05-09T09:13:22.41",
"updatedBy": 1,
"archive": "UNARCHIVED",
"id": "n0pvqo",
"projectId": "0zJnUT",
"promoCodeType": "DEFAULT_TYPE",
"promoCodeUsageCount": 0,
"promoCodeUsageDays": 0,
"offerOn": 1,
"promotionGroupId": "1XJcuO",
"changeLog": "Promotion has been created for projectId 0zJnUT",
"offerType": 1,
"stopFurtherProcessing": "NEVER",
"promotionInformation": {
"message": [
{
"locale": "en_US",
"text": "string"
}
]
},
"startHour": 0,
"endHour": 0
}
}
},
"collectionId": "2058",
"eventType": "promotionservice/promotion/clone",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
CreateProject
Event Type: promotionservice/project/create
{
"version": "0",
"id": "84def0cb-9b81-3692-fbaa-3ac63da38642",
"detail-type": "promotionservice/project/create",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:12:39Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"timestamp": 1715245959169,
"payload": {
"responseCode": "PRCOCRE0000",
"responseMessage": "Created successfully",
"status": 0,
"project": {
"project": {
"name": "QdbAXkldlHSFHF",
"state": "OPEN",
"id": "W1L7JG",
"projectNotes": [
{
"description": "aqgarddZ2",
"createdOn": "2024-05-09T09:12:39.158",
"createdBy": 1
}
],
"auditData": {
"createdOn": "2024-05-09T09:12:39.149",
"updatedOn": "2024-05-09T09:12:39.149",
"createdBy": 1,
"updatedBy": 1
}
},
"collectionId": 2057
}
},
"collectionId": "2057",
"eventType": "promotionservice/project/create",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
CreatePromoCodeList
Event Type: promotionservice/promocodelist/create
{
"version": "0",
"id": "1b44c31c-9aea-c545-ed0f-1f63192a65e8",
"detail-type": "promotionservice/promocodelist/create",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:13:29Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "2059",
"timestamp": 1715246009450,
"payload": {
"responseCode": "PRPCCRE0000",
"responseMessage": "Promocodes list created successfully",
"promoCodeListResponse": {
"promoCodeList": {
"id": "ZZi4jD",
"collectionId": 0,
"name": "SECOM-16942",
"status": "ACTIVE",
"promoCodes": [
"CARTPROMO10",
"PDPPROMO"
],
"changeLog": "Promotioncodelist has been created",
"createdOn": "2024-05-09T09:13:29.439",
"updatedOn": "2024-05-09T09:13:29.439",
"createdBy": 1,
"updatedBy": 1,
"hiddenList": false
},
"collectionId": 2059
}
},
"collectionId": "2059",
"eventType": "promotionservice/promocodelist/create",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
CreatePromotionGroup
Event Type: promotionservice/promotiongroup/create
{
"version": "0",
"id": "2e3f71f5-be66-9e8f-f16e-fc7653ad22a2",
"detail-type": "promotionservice/promotiongroup/create",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:12:55Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "1XJcuO",
"timestamp": 1715245975430,
"payload": {
"responseCode": "PRPGCRE0000",
"responseMessage": "Promotion group created successfully",
"promotionGroupResponse": {
"collectionId": 2058,
"promotionGroup": {
"name": "EQPLAT-16501",
"startDate": "2025-05-01T03:30:59.59",
"endDate": "2084-04-16T03:30:59.59",
"notes": "notes21",
"priority": 0,
"status": "ACTIVE",
"createdOn": "2024-05-09T09:12:55.417",
"createdBy": 1,
"updatedOn": "2024-05-09T09:12:55.419",
"updatedBy": 1,
"archive": "UNARCHIVED",
"listIds": [
],
"stopFurtherProcessing": "NEVER",
"id": "1XJcuO",
"projectId": "0zJnUT",
"changeLog": "Promotion Group has been created for projectId 0zJnUT"
}
}
},
"collectionId": "2058",
"eventType": "promotionservice/promotiongroup/create",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
CreatePromotionList
Event Type: promotionservice/promotionlist/create
{
"version": "0",
"id": "e71f7e08-b0ae-c8c2-3fa5-995bc16507c8",
"detail-type": "promotionservice/promotionlist/create",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:13:06Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "2059",
"timestamp": 1715245986220,
"payload": {
"responseCode": "PRPLCRE0000",
"responseMessage": "Promotion list created successfully",
"promotionListResponse": {
"promotionList": {
"id": "qWCItt",
"collectionId": 0,
"name": "SECOM-23645",
"status": "INACTIVE",
"items": [
"REEBOK",
"PUMA",
"LEE"
],
"className": "com.skava.promotion.ecomm.model.PromotionSku",
"field": "brand",
"createdOn": "2024-05-09T09:13:06.207",
"updatedOn": "2024-05-09T09:13:06.207",
"createdBy": 1,
"updatedBy": 1
},
"collectionId": 2059
}
},
"collectionId": "2059",
"eventType": "promotionservice/promotionlist/create",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
DeletePromoCodeList
Event Type: promotionservice/promotioncodelist/delete
{
"version": "0",
"id": "7326d7f6-1703-dc35-3dbc-2e865a8b5020",
"detail-type": "promotionservice/promotioncodelist/delete",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:13:50Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "2058",
"timestamp": 1715246030725,
"payload": {
"responseCode": "PRPCDEL0000",
"responseMessage": "Promo code list deleted successfully",
"promoCodeListResponse": {
"collectionId": 2058
}
},
"collectionId": "2058",
"eventType": "promotionservice/promotioncodelist/delete",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
DeletePromotionGroup
Event Type: promotionservice/promotiongroup/delete
{
"version": "0",
"id": "f1b743b6-7954-c4c7-e710-aa074cf392bb",
"detail-type": "promotionservice/promotiongroup/delete",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:13:57Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "cHexiW",
"timestamp": 1715246037569,
"payload": {
"responseCode": "PRPGDEL0000",
"responseMessage": "Promotion groups deleted successfully",
"promotionGroupResponse": {
"collectionId": 2058
}
},
"collectionId": "2058",
"eventType": "promotionservice/promotiongroup/delete",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
DeletePromotionList
Event Type: promotionservice/promotionlist/delete
{
"version": "0",
"id": "422b99d0-0081-0de6-b8b7-bd9ab9321d5a",
"detail-type": "promotionservice/promotionlist/delete",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:13:54Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "2058",
"timestamp": 1715246034277,
"payload": {
"responseCode": "PRPLDEL0000",
"responseMessage": "Promo code list deleted successfully",
"promotionListResponse": {
"collectionId": 2058
}
},
"collectionId": "2058",
"eventType": "promotionservice/promotionlist/delete",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
PatchUpdateProject
Event Type: promotionservice/project/patch
{
"version": "0",
"id": "8871f400-ee76-dfaf-ae14-929defbfb5fb",
"detail-type": "promotionservice/project/patch",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:12:51Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "W1L7JG",
"timestamp": 1715245971161,
"payload": {
"responseCode": "PRCOUPD0000",
"responseMessage": "Updated successfully",
"status": 0,
"project": {
"project": {
"name": "VjCXBG",
"state": "OPEN",
"id": "W1L7JG",
"projectNotes": [
{
"description": "SYSTEM: Project has been UPDATED",
"createdOn": "2024-05-09T09:12:51.141",
"createdBy": 1
}
],
"auditData": {
"createdOn": "2024-05-09T09:12:39.149",
"updatedOn": "2024-05-09T09:12:51.141",
"createdBy": 1,
"updatedBy": 1
}
},
"collectionId": 2057
}
},
"collectionId": "2057",
"eventType": "promotionservice/project/patch",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
PatchUpdatePromoCodeList
Event Type: promotionservice/promocodelist/patch
{
"version": "0",
"id": "787a5c08-b0c4-e784-9a6c-422ed5d01168",
"detail-type": "promotionservice/promocodelist/patch",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:13:36Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "2059",
"timestamp": 1715246016812,
"payload": {
"responseCode": "PRPC0000010",
"responseMessage": "The request contains duplicate promocodes",
"promoCodeListResponse": {
"promoCodeList": {
"id": "1Pjl6u",
"collectionId": 0,
"name": "SECOM-16942",
"status": "ACTIVE",
"promoCodes": [
"CARTPROMO10",
"PDPPROMO",
"PDPPROMO12"
],
"duplicatePromoCodes": [
"CARTPROMO10"
],
"changeLog": "Promotioncodelist has been updated",
"createdOn": "2024-05-09T09:13:36.433",
"updatedOn": "2024-05-09T09:13:36.8",
"createdBy": 1,
"updatedBy": 1,
"hiddenList": false
},
"collectionId": 2059
}
},
"collectionId": "2059",
"eventType": "promotionservice/promocodelist/patch",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
PatchUpdatePromotionList
Event Type: promotionservice/promotionlist/patch
{
"version": "0",
"id": "d09bbe25-5b73-33c1-df02-ff066dcc8bcb",
"detail-type": "promotionservice/promotionlist/patch",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:13:13Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "2059",
"timestamp": 1715245993359,
"payload": {
"responseCode": "PRPL0000010",
"responseMessage": "List details are updated, due to duplicate Items could not update entire items",
"promotionListResponse": {
"promotionList": {
"id": "qWCItt",
"collectionId": 0,
"name": "SECOM-27449-hangename",
"status": "ACTIVE",
"items": [
"LEE1",
"REEBOK",
"PUMA1",
"PUMA",
"LEE",
"REEBOK1",
"REEBOK2"
],
"duplicateItems": [
"LEE1",
"PUMA1",
"REEBOK1"
],
"className": "com.skava.promotion.ecomm.model.PromotionCart",
"field": "shippingCity",
"createdOn": "2024-05-09T09:13:06.207",
"updatedOn": "2024-05-09T09:13:13.348",
"createdBy": 1,
"updatedBy": 1
},
"collectionId": 2059
}
},
"collectionId": "2059",
"eventType": "promotionservice/promotionlist/patch",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
UpdateProject
Event Type: promotionservice/project/update
{
"version": "0",
"id": "af9f19a7-44ad-a140-d93c-a72acaf8a9d8",
"detail-type": "promotionservice/project/update",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:12:47Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "W1L7JG",
"timestamp": 1715245967596,
"payload": {
"responseCode": "PRCOUPD0000",
"responseMessage": "Updated successfully",
"status": 0,
"project": {
"project": {
"name": "NhMn8JGn0A0Ak",
"state": "OPEN",
"id": "W1L7JG",
"projectNotes": [
{
"description": " ::N 2zise4ev5I 81 .i;y .T V ??L, 6 nE.;a zFHo!5n BO .;J9iT c gZ?8!Y 8O!b 8",
"createdOn": "2024-05-09T09:12:47.582",
"createdBy": 1
}
],
"auditData": {
"createdOn": "2024-05-09T09:12:39.149",
"updatedOn": "2024-05-09T09:12:47.574",
"createdBy": 1,
"updatedBy": 1
}
},
"collectionId": 2057
}
},
"collectionId": "2057",
"eventType": "promotionservice/project/update",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
UpdatePromoCodeList
Event Type: promotionservice/promocodelist/update
{
"version": "0",
"id": "9be3fe39-cab7-db42-4df7-1b49b97c0558",
"detail-type": "promotionservice/promocodelist/update",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:13:32Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "2059",
"timestamp": 1715246012946,
"payload": {
"responseCode": "PRPC0000010",
"responseMessage": "The request contains duplicate promocodes",
"promoCodeListResponse": {
"promoCodeList": {
"id": "ZZi4jD",
"collectionId": 0,
"name": "SECOM-17171",
"status": "ACTIVE",
"promoCodes": [
"CARTPROMO10",
"PDPPROMO"
],
"duplicatePromoCodes": [
"CARTPROMO10",
"PDPPROMO"
],
"changeLog": "Promotioncodelist has been updated",
"createdOn": "2024-05-09T09:13:29.439",
"updatedOn": "2024-05-09T09:13:32.935",
"createdBy": 1,
"updatedBy": 1,
"hiddenList": false
},
"collectionId": 2059
}
},
"collectionId": "2059",
"eventType": "promotionservice/promocodelist/update",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
UpdatePromotionGroup
Event Type: promotionservice/promotiongroup/update
{
"version": "0",
"id": "f1b743b6-7954-c4c7-e710-aa074cf392bb",
"detail-type": "promotionservice/promotiongroup/delete",
"source": "promotionservice",
"account": "277827593990",
"time": "2024-05-09T09:13:57Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "cHexiW",
"timestamp": 1715246037569,
"payload": {
"responseCode": "PRPGDEL0000",
"responseMessage": "Promotion groups deleted successfully",
"promotionGroupResponse": {
"collectionId": 2058
}
},
"collectionId": "2058",
"eventType": "promotionservice/promotiongroup/delete",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
Internal Events via RabbitMQ/AWS MQ
The following events communicate with the internal microservices.
List of Events
| SL.# | Name | Description | Publish Location | Routing Key | Durability | Payload Type |
|---|---|---|---|---|---|---|
| 1 | Promocode Blocked or Assigned | This event is triggered when a promocode is blocked or assigned. | Queue: promotion.block/assign | n/a | true | Promotion.Block/Assign |
| 2 | Project Created | This event is triggered when a project is created. | Topic: ecomm | promotion.project.created | false | PromotionPayload |
| 3 | Project Updated | This event is triggered when a project's state is changed. | Topic: ecomm | promotion.project.updated | false | PromotionPayload |
| 4 | Cache Clear | This event is triggered when the publish feed is completed or when cache clear is required. | Topic: ecomm | promotion.listener.# | true | PromotionCacheClear |
Payload Models
Below are the payloads for the Promotions microservice.
Promotion.Block/Assign
| PROPERTY | TYPE | DESCRIPTION | EXAMPLE |
|---|---|---|---|
promoCodesInfo.promoCode | String | Holds the promocode. The maximum length is 64. This field should not be null or empty. | FLAT50 |
promoCodesInfo.confirmationCode | String | Contains the confirmation code of the promocode. | confirm1 |
promoCodesInfo.responseCode | String | Holds the response code. | promotion response code |
promoCodesInfo.responseMessage | String | Holds the response message. | promotion response message |
type | String | Indicates the type of transaction, such as ASSIGN or BLOCK. | BLOCK |
id | String | Contains the ID of the order. | Order1 |
PromotionPayload
| PROPERTY | TYPE | DESCRIPTION | EXAMPLE |
|---|---|---|---|
project.name | String | Contains the name of the project. The minimum and maximum length of this field is 5 and 50, respectively. This field should not contain null or empty. | PromotionName |
project.state | String | Contains the state of the project, such as OPEN, SUBMITTED, APPROVED, DENIED, and REOPENED. | Open |
project.id | String | Indicates the unique identifier of the project. This field is generated automatically. This attribute holds a value in the request for the update and delete operation. | id123 |
project.auditData[].createdOn | Date | Holds the date, when the project was created. | 02-12-1995 |
project.auditData[].updatedOn | Date | Holds the date, when the project was updated. | 02-12-2018 |
project.auditData[].createdBy | String | Holds the ID of the user, who has created the project. | user123 |
project.auditData[].updatedBy | String | Holds the ID of the user, who has updated the project. | user123 |
project.projectNotes[].description | String | Holds the description of the project operation. | Project is created. |
project.projectNotes[].createdOn | Date | Holds the date, when the project note was created. | 02-1-2018 |
project.projectNotes[].createdBy | String | Holds the ID of the user, who has created the project note. | user123 |
project.targetCompletionDate | Date | Holds the target completion date of the project. | 15-11-2019 |
project.actualCompletionDate | Date | Holds the actual completion date of the project. | 12-11-2019 |
project.description | String | Contain the description of the project. This is an optional field. There is no restriction on the minimum and maximum lengths. | Project is up to date. |
project.collectionId | String | Indicates the unique ID of the collection. | 123 |
PromotionCacheClear
| Property | Type | Description | Example | |
|---|---|---|---|---|
requestParameters.versionId | string | Holds the ID of the publish version. | 1567000000 | |
requestParameters.collectionId | long | Indicates the unique ID of the collection. | 1 | |
requestParameters.type | string | Holds the publish type. The publish types are FULL, ROLLBACK, and INCREMENT. | FULL | |
requestParameters.userId | long | Indicates the ID of the user. | 5 | |
requestParameters.authToken | string | Holds a valid authorization token of a user. | eyJhbGciOiJIUzUxMiJ9.eyJjcmVhdGVkIjoxNTYwMjQ3MTkxMzkwLCJleHAiOjE1NjAyNTQzOTEsImhhc2giOiJlZDJmN2E3ZWJkODU5YzE4ZjQzNWYyNzAyOTk5ZDA5NCIsImF1dGhvcml0aWVzIjoiW3tcInJvbGVzXCI6e1wiUk9MRV9TVVBFUl9BRE1JTlwiOntcInR5cGVcIjpcIlNUQU5EQVJEXCJ9fX1dIiwidXNlcm5hbWUiOiIxIn0.tD8VpfqhK2YaxN8doLWOiRizszgW4mT8iWBkjxwiFxQwo71HJMdkYZO7Wy49uTpmwH_D1iSiBaGzDWDbdEQYfA |
Revision History
2019-07-09 | AN – Content updated for July 2019 release.
2019-05-17 | AM – Updated to a new table tool.
2019-05-06 | PLK – Minor copyedit.
2019-04-06 | AN- Content updated for April 2019 release.
2019-01-23 | PLK – Page added and content uploaded.