This page provides the list of events and associated payloads for the Promotions microservice.
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 | Ananthi – Content updated for July 2019 release.
2019-05-17 | Mary – Updated to a new table tool.
2019-05-06 | PLK – Minor copyedit.
2019-04-06 | Ananthi – Content updated for April 2019 release.
2019-01-23 | PLK – Page added and content uploaded.