This page provides the list of events and associated payload for internal events (via RabbitMQ/AWS MQ) and external events (via EventBridge) for the Subscription 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 | CreateSubscription | subscriptionservice/subscription/create | response_SubscriptionResponse.id |
2 | PATCH | PatchUpdateSubscription | subscriptionservice/subscription/patchupdate | response_SubscriptionResponse.id |
3 | DELETE | DeleteSubscription | subscriptionservice/subscription/delete | response_SubscriptionResponse.id |
4 | POST | CreateBulkSubscription | subscriptionservice/bulksubscription/create | response_subscriptions.id |
5 | POST | CreateInstance | subscriptionservice/instance/create | response_InstanceResponse.id |
6 | POST | CreateSubscriptionPreference | subscriptionservice/preference/create | response_SubscriptionPreferenceResponse.userId |
7 | PUT | UpdateSubscriptionPreference | subscriptionservice/preference/update | response_SubscriptionPreferenceResponse.userId |
8 | DELETE | DeleteSubscriptionPreference | subscriptionservice/preference/delete | response_SubscriptionPreferenceResponse.userId |
9 | PATCH | CreateRefreshSubscription | subscriptionservice/refreshsubscription/create | response_InstanceTransactionResponse.id |
10 | PATCH | PatchUpdateBulkInstanceTransaction | subscriptionservice/bulkinstancetransaction/patch | request_instances.id |
11 | PATCH | PatchUpdateSubscriptionInterval | subscriptionservice/subscriptioninterval/patch | request_instances.id |
12 | DELETE | DeleteUserSubscriptions | subscriptionservice/usersubscription/delete | request_id |
13 | PATCH | PatchUpdateInstanceSubscription | subscriptionservice/instance/patchupdate | response_InstanceResponse.id |
Payload
CreateSubscription
Event Type: subscriptionservice/subscription/create
{
"version": "0",
"id": "535b1903-1d6a-e23a-b821-6f0186893a1d",
"detail-type": "subscriptionservice/subscription/create",
"source": "subscriptionservice",
"account": "277827593990",
"time": "2024-05-22T05:54:02Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"timestamp": 1716357242187,
"payload": {
"id": 1421,
"collectionId": 809,
"userId": "1716357242088",
"accountId": "1112",
"storeId": "store001",
"status": "PENDING",
"statusUpdateNote": "Subscription is not yet activated. It's awating for first order to be completed",
"type": "VARIABLE_MULTI_ORDER",
"enableItemLevelProcessing": false,
"frequencyEndType": "NEVER",
"frequencyType": "MONTHS",
"frequencyPeriod": 1,
"frequencyStartDate": 1716357242134,
"frequencyEndDate": 0,
"revisedDeliveryDate": 1716357242133,
"firstDeliveryDate": 1716357242133,
"nextDeliveryEditFreezeDate": 1716357242133,
"nextNotificationDate": 1716357242133,
"nextOrderCreationDate": 1716357242152,
"nextDeliveryDate": 1716357242133,
"revisedOrderProcessingDate": 1716357242152,
"recurrenceOrderProcessingDate": 22,
"lastOrderProcessedDate": 0,
"currentInstance": 1,
"updatedTime": 1716357242153,
"createdTime": 1716357242153,
"updatedBy": "1716357242088",
"createdBy": "1716357242088",
"properties": {
"additionalProp1": "string"
},
"itemInfo": [
{
"id": 2499,
"itemGroupId": 1421,
"price": 0.0,
"quantity": 2,
"preparationPeriod": 1,
"skus": [
{
"id": "110001110",
"productId": "110001",
"skuProperties": {
},
"name": "mens long sleeve micro thermal shirt",
"optionalQuantity": 0,
"type": "DEFAULT"
}
],
"properties": {
"frequencyType": "MONTHS",
"name": "string",
"additionalProp3": "string",
"additionalProp2": "string",
"frequencyPeriod": "1"
}
}
],
"paymentInfo": {
"paymentId": "6022",
"paymentItemId": "3865",
"paymentType": "CREDITCARD"
},
"shippingInfo": {
"id": 1449,
"type": "PHYSICAL",
"method": "Economy",
"deliveryPeriod": 1
},
"addressInfo": {
"id": 1421,
"firstName": "John",
"lastName": "Doe",
"middleName": "",
"addressLine1": "777 Brockton Avenue",
"addressLine2": "",
"city": "Abington",
"state": "MA",
"country": "US",
"zip": "02351",
"email": "test@skava.com",
"phone": "9789787222",
"canReceiveSMS": false,
"addressVersion": 1716357242155
},
"defaultNextOrderCreationDate": 1716357242152
},
"collectionId": "809",
"eventType": "subscriptionservice/subscription/create",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
PatchUpdateSubscription
Event Type: subscriptionservice/subscription/patchupdate
{
"version": "0",
"id": "24b42e06-6415-37bb-323b-e7458f0d2645",
"detail-type": "subscriptionservice/subscription/patchupdate",
"source": "subscriptionservice",
"account": "277827593990",
"time": "2024-05-22T05:54:10Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"timestamp": 1716357250373,
"payload": {
"id": 1423,
"collectionId": 813,
"userId": "1",
"accountId": "1001",
"storeId": "store001",
"status": "PENDING",
"statusUpdateNote": "Status has been updated to PENDING",
"type": "VARIABLE_MULTI_ORDER",
"enableItemLevelProcessing": false,
"frequencyEndType": "NEVER",
"frequencyType": "DAYS",
"frequencyPeriod": 3,
"frequencyStartDate": 1716357243000,
"frequencyEndDate": 0,
"revisedDeliveryDate": 1717221243000,
"firstDeliveryDate": 1717221243000,
"nextDeliveryEditFreezeDate": 1717221243000,
"nextNotificationDate": 1717221243000,
"nextOrderCreationDate": 1716357243000,
"nextDeliveryDate": 1717221243000,
"revisedOrderProcessingDate": 1716357243000,
"recurrenceOrderProcessingDate": 22,
"lastOrderProcessedDate": 0,
"currentInstance": 1,
"updatedTime": 1716357250346,
"createdTime": 1716357243000,
"updatedBy": "1",
"createdBy": "1",
"properties": {
"additionalProp1": "string",
"additionalProp3": "string",
"additionalProp2": "string"
},
"itemInfo": [
{
"id": 2501,
"itemGroupId": 1423,
"price": 0.0,
"quantity": 2,
"preparationPeriod": 1,
"skus": [
{
"id": "110001110",
"productId": "110001",
"skuProperties": {
},
"name": "mens long sleeve micro thermal shirt",
"optionalQuantity": 0,
"type": "DEFAULT"
}
],
"properties": {
"frequencyType": "DAYS",
"name": "string",
"additionalProp3": "string",
"additionalProp2": "string",
"frequencyPeriod": "4"
}
}
],
"paymentInfo": {
"paymentId": "6022",
"paymentItemId": "3865",
"paymentType": "CREDITCARD"
},
"shippingInfo": {
"id": 1452,
"type": "PHYSICAL",
"method": "Economy",
"deliveryPeriod": 2
},
"addressInfo": {
"id": 1423,
"firstName": "Dilipkumar",
"lastName": "Viswanathan",
"middleName": "",
"addressLine1": "2/5 karamadai",
"addressLine2": "",
"city": "Coimbatore",
"state": "AZ",
"country": "US",
"zip": "10001",
"email": "externalevents1710434055709@mailinator.com",
"phone": "9789787222",
"canReceiveSMS": false,
"storeId": "1367",
"addressVersion": 1716357250347
},
"defaultNextOrderCreationDate": 1716357243000
},
"collectionId": "813",
"eventType": "subscriptionservice/subscription/patchupdate",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
DeleteSubscription
Event Type: subscriptionservice/subscription/delete
{
"version": "0",
"id": "9e5c6fa6-4628-0316-3a9e-2352c9f852b5",
"detail-type": "subscriptionservice/subscription/delete",
"source": "subscriptionservice",
"account": "277827593990",
"time": "2024-05-22T05:54:17Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"timestamp": 1716357257783,
"payload": {
"subHardDeleteResponse": {
"responseCode": "SCSCD0000",
"responseMessage": "Subscription Id 1424 Deleted Successfully.",
"timeStamp": "1716357257781"
}
},
"collectionId": "813",
"eventType": "subscriptionservice/subscription/delete",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
CreateBulkSubscription
Event Type: subscriptionservice/bulksubscription/create
{
"version": "0",
"id": "6b359f8d-244a-274e-7997-dc1a6c32cedb",
"detail-type": "subscriptionservice/bulksubscription/create",
"source": "subscriptionservice",
"account": "277827593990",
"time": "2024-05-22T05:54:25Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"timestamp": 1716357265067,
"payload": {
"subscriptions": [
{
"id": 1425,
"collectionId": 813,
"userId": "1",
"accountId": "1001",
"storeId": "store001",
"status": "PENDING",
"statusUpdateNote": "Subscription is not yet activated. It's awating for first order to be completed",
"type": "VARIABLE_MULTI_ORDER",
"enableItemLevelProcessing": false,
"frequencyEndType": "NEVER",
"frequencyType": "MONTHS",
"frequencyPeriod": 2,
"frequencyStartDate": 1649163512000,
"frequencyEndDate": 0,
"revisedDeliveryDate": 1649163512000,
"firstDeliveryDate": 1649163512000,
"nextDeliveryEditFreezeDate": 1649163512000,
"nextNotificationDate": 1649163512000,
"nextOrderCreationDate": 1716357264991,
"nextDeliveryDate": 1649163512000,
"revisedOrderProcessingDate": 1716357264991,
"recurrenceOrderProcessingDate": 22,
"lastOrderProcessedDate": 0,
"currentInstance": 1,
"updatedTime": 1716357264997,
"createdTime": 1716357264997,
"updatedBy": "1",
"createdBy": "1",
"properties": {
"additionalProp1": "string",
"additionalProp3": "string",
"additionalProp2": "string"
},
"itemInfo": [
{
"id": 2503,
"itemGroupId": 1425,
"price": 0.0,
"quantity": 2,
"preparationPeriod": 1,
"skus": [
{
"id": "110001110",
"productId": "110001",
"skuProperties": {
},
"name": "mens long sleeve micro thermal shirt",
"optionalQuantity": 0,
"type": "DEFAULT"
}
],
"properties": {
"frequencyType": "MONTHS",
"name": "string",
"additionalProp3": "string",
"additionalProp2": "string",
"frequencyPeriod": "2"
}
}
],
"paymentInfo": {
"paymentId": "6022",
"paymentItemId": "3865",
"paymentType": "CREDITCARD"
},
"shippingInfo": {
"id": 1454,
"type": "PHYSICAL",
"method": "Economy",
"deliveryPeriod": 2
},
"addressInfo": {
"id": 1425,
"firstName": "Dilipkumar",
"lastName": "Viswanathan",
"middleName": "",
"addressLine1": "2/5 karamadai",
"addressLine2": "",
"city": "Coimbatore",
"state": "AZ",
"country": "US",
"zip": "10001",
"email": "externalevents1710434055709@mailinator.com",
"phone": "9789787222",
"canReceiveSMS": false,
"storeId": "1367",
"addressVersion": 1716357264999
},
"defaultNextOrderCreationDate": 1716357264991
},
{
"id": 1426,
"collectionId": 813,
"userId": "1",
"accountId": "1001",
"storeId": "store001",
"status": "PENDING",
"statusUpdateNote": "Subscription is not yet activated. It's awating for first order to be completed",
"type": "VARIABLE_MULTI_ORDER",
"enableItemLevelProcessing": false,
"frequencyEndType": "NEVER",
"frequencyType": "MONTHS",
"frequencyPeriod": 2,
"frequencyStartDate": 1649163512000,
"frequencyEndDate": 0,
"revisedDeliveryDate": 1649249912000,
"firstDeliveryDate": 1649249912000,
"nextDeliveryEditFreezeDate": 1649249912000,
"nextNotificationDate": 1649249912000,
"nextOrderCreationDate": 1716357264994,
"nextDeliveryDate": 1649249912000,
"revisedOrderProcessingDate": 1716357264994,
"recurrenceOrderProcessingDate": 22,
"lastOrderProcessedDate": 0,
"currentInstance": 1,
"updatedTime": 1716357265024,
"createdTime": 1716357265024,
"updatedBy": "1",
"createdBy": "1",
"properties": {
"additionalProp1": "string",
"additionalProp3": "string",
"additionalProp2": "string"
},
"itemInfo": [
{
"id": 2504,
"itemGroupId": 1426,
"price": 0.0,
"quantity": 2,
"preparationPeriod": 1,
"skus": [
{
"id": "110001110",
"productId": "110001",
"skuProperties": {
},
"name": "mens long sleeve micro thermal shirt",
"optionalQuantity": 0,
"type": "DEFAULT"
}
],
"properties": {
"frequencyType": "MONTHS",
"name": "string",
"additionalProp3": "string",
"additionalProp2": "string",
"frequencyPeriod": "2"
}
}
],
"paymentInfo": {
"paymentId": "6022",
"paymentItemId": "3865",
"paymentType": "CREDITCARD"
},
"shippingInfo": {
"id": 1455,
"type": "PHYSICAL",
"method": "Economy",
"deliveryPeriod": 2
},
"addressInfo": {
"id": 1426,
"firstName": "Dilipkumar",
"lastName": "Viswanathan",
"middleName": "",
"addressLine1": "2/5 karamadai",
"addressLine2": "",
"city": "Coimbatore",
"state": "AZ",
"country": "US",
"zip": "10001",
"email": "dilipkumar@skava.com",
"phone": "9789787222",
"canReceiveSMS": false,
"storeId": "1367",
"addressVersion": 1716357265026
},
"defaultNextOrderCreationDate": 1716357264994
}
]
},
"collectionId": "813",
"eventType": "subscriptionservice/bulksubscription/create",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
CreateInstance
Event Type: subscriptionservice/instance/create
{
"version": "0",
"id": "109201da-7edb-8e83-c0ee-200c2f21b562",
"detail-type": "subscriptionservice/instance/create",
"source": "subscriptionservice",
"account": "277827593990",
"time": "2024-05-22T05:54:39Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"timestamp": 1716357279948,
"payload": {
"id": 611,
"instanceSeq": 1,
"subscriptionId": 1428,
"itemInfo": [
{
"id": 2506,
"itemGroupId": 1428,
"price": 0.0,
"quantity": 2,
"preparationPeriod": 1,
"skus": [
{
"id": "110001110",
"productId": "110001",
"skuProperties": {
},
"name": "mens long sleeve micro thermal shirt",
"optionalQuantity": 0,
"type": "DEFAULT"
}
],
"properties": {
"frequencyType": "DAYS",
"name": "string",
"additionalProp3": "string",
"additionalProp2": "string",
"frequencyPeriod": "4"
}
}
],
"shippingInfo": {
"id": 1457,
"type": "PHYSICAL",
"method": "Economy",
"deliveryPeriod": 2
},
"paymentInfo": {
"paymentId": "6022",
"paymentItemId": "3865",
"paymentType": "CREDITCARD"
},
"addressInfo": {
"id": 1428,
"firstName": "Dilipkumar",
"lastName": "Viswanathan",
"middleName": "",
"addressLine1": "2/5 karamadai",
"addressLine2": "",
"city": "Coimbatore",
"state": "AZ",
"country": "US",
"zip": "10001",
"email": "externalevents1710434055709@mailinator.com",
"phone": "9789787222",
"canReceiveSMS": false,
"storeId": "1367",
"addressVersion": 1716357280000
},
"status": "SCHEDULED",
"notificationDate": 0,
"orderProcessingDate": 0,
"editFreezeDate": 0,
"expectedDeliveryDate": 1717221280000,
"updated": false,
"transacions": [
],
"instanceItems": [
]
},
"collectionId": "813",
"eventType": "subscriptionservice/instance/create",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
CreateSubscriptionPreference
Event Type: subscriptionservice/preference/create
{
"version": "0",
"id": "6205aaf9-5e5c-5839-6bde-1ad5a8aa3ffa",
"detail-type": "subscriptionservice/preference/create",
"source": "subscriptionservice",
"account": "277827593990",
"time": "2024-05-22T05:54:47Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"timestamp": 1716357287219,
"payload": {
"userId": 1716357287186,
"collectionId": 814,
"orderProcessingDate": 15,
"freezeOrderDate": 13,
"notificationOrderDate": 14,
"shippingId": "4",
"shippingType": "Express",
"shippingMethod": "Direct",
"shippingInstruction": "Leave at Door Steps",
"deliveryPeriod": 2,
"paymentId": "string",
"addressId": "4",
"lastOrderProcessingDate": 1716357287197,
"processNow": false,
"createdTime": 1716357287199,
"updatedTime": 1716357287199,
"createdBy": "1",
"updatedBy": "1",
"pvAssistEnabled": false,
"pvAssistGoal": 50,
"lastProcessNowAttempt": 1716357287197
},
"collectionId": "814",
"eventType": "subscriptionservice/preference/create",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
UpdateSubscriptionPreference
Event Type: subscriptionservice/preference/update
{
"version": "0",
"id": "f19fb784-6289-c7ba-f4f1-0f3484bb17f5",
"detail-type": "subscriptionservice/preference/update",
"source": "subscriptionservice",
"account": "277827593990",
"time": "2024-05-22T05:54:54Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"timestamp": 1716357294526,
"payload": {
"userId": 1716357287186,
"collectionId": 814,
"orderProcessingDate": 15,
"freezeOrderDate": 13,
"notificationOrderDate": 14,
"shippingId": "4",
"shippingType": "Express",
"shippingMethod": "Direct",
"shippingInstruction": "Leave at Door Steps",
"deliveryPeriod": 2,
"paymentId": "123",
"addressId": "4",
"lastOrderProcessingDate": 1716357287000,
"processNow": false,
"createdTime": 1716357287000,
"updatedTime": 1716357294508,
"createdBy": "1",
"updatedBy": "1",
"pvAssistEnabled": false,
"pvAssistGoal": 50,
"lastProcessNowAttempt": 1716357287000
},
"collectionId": "814",
"eventType": "subscriptionservice/preference/update",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
DeleteSubscriptionPreference
Event Type: subscriptionservice/preference/delete
{
"version": "0",
"id": "c338e0b5-3a78-5650-6675-ac8c4357b49c",
"detail-type": "subscriptionservice/preference/delete",
"source": "subscriptionservice",
"account": "277827593990",
"time": "2024-05-22T05:55:01Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"timestamp": 1716357301939,
"payload": {
"responseCode": "SCPSCD0000",
"responseMessage": "Subscription preference Id 1716357301822 Deleted Successfully.",
"timeStamp": "1716357301937"
},
"collectionId": "813",
"eventType": "subscriptionservice/preference/delete",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
CreateRefreshSubscription
Event Type: subscriptionservice/refreshsubscription/create
{
"version": "0",
"id": "6952f7b5-6c80-5b6b-b7cc-70abc5aa94ed",
"detail-type": "subscriptionservice/refreshsubscription/create",
"source": "subscriptionservice",
"account": "277827593990",
"time": "2024-05-22T05:55:24Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"timestamp": 1716357324242,
"payload": {
"subscriptions": [
{
"id": 1430,
"collectionId": 813,
"userId": "1716357323895",
"accountId": "1001",
"storeId": "store001",
"status": "ACTIVE",
"statusUpdateNote": "Status has been updated to ACTIVE",
"type": "VARIABLE_MULTI_ORDER",
"enableItemLevelProcessing": false,
"frequencyEndType": "NEVER",
"frequencyType": "DAYS",
"frequencyPeriod": 2,
"frequencyStartDate": 1647948559000,
"frequencyEndDate": 0,
"revisedDeliveryDate": 1648812559000,
"firstDeliveryDate": 1648812559000,
"nextDeliveryEditFreezeDate": 1716357324219,
"nextNotificationDate": 1716357324219,
"nextOrderCreationDate": 1715838924000,
"nextDeliveryDate": 1716357324219,
"revisedOrderProcessingDate": 1716357324000,
"recurrenceOrderProcessingDate": 15,
"lastOrderProcessedDate": 1716357324000,
"currentInstance": 1,
"updatedTime": 1716357324220,
"createdTime": 1716357324000,
"updatedBy": "1",
"createdBy": "1716357323895",
"properties": {
"additionalProp1": "string",
"additionalProp3": "string",
"additionalProp2": "string"
},
"itemInfo": [
{
"id": 2508,
"itemGroupId": 1430,
"price": 0.0,
"quantity": 2,
"preparationPeriod": 1,
"skus": [
{
"id": "110001110",
"productId": "110001",
"skuProperties": {
},
"name": "mens long sleeve micro thermal shirt",
"optionalQuantity": 0,
"type": "DEFAULT"
}
],
"properties": {
"frequencyType": "DAYS",
"name": "string",
"additionalProp3": "string",
"additionalProp2": "string",
"frequencyPeriod": "4"
}
}
],
"paymentInfo": {
"paymentId": "6022",
"paymentItemId": "3865",
"paymentType": "CREDITCARD"
},
"shippingInfo": {
"id": 1459,
"type": "PHYSICAL",
"method": "Economy",
"deliveryPeriod": 2
},
"addressInfo": {
"id": 1430,
"firstName": "Dilipkumar",
"lastName": "Viswanathan",
"middleName": "",
"addressLine1": "2/5 karamadai",
"addressLine2": "",
"city": "Coimbatore",
"state": "AZ",
"country": "US",
"zip": "10001",
"email": "externalevents1710434055709@mailinator.com",
"phone": "9789787222",
"canReceiveSMS": false,
"storeId": "1367",
"addressVersion": 1716357324000
},
"defaultNextOrderCreationDate": 1715838924000
}
]
},
"collectionId": "813",
"eventType": "subscriptionservice/refreshsubscription/create",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
PatchUpdateBulkInstanceTransaction
Event Type: subscriptionservice/bulkinstancetransaction/patch
{
"version": "0",
"id": "4b779d47-ec4a-1cf7-be6c-a9e0e3ecb32f",
"detail-type": "subscriptionservice/bulkinstancetransaction/patch",
"source": "subscriptionservice",
"account": "277827593990",
"time": "2024-05-22T05:55:38Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"timestamp": 1716357338949,
"payload": {
"instances": [
{
"id": 612,
"instanceSeq": 1,
"subscriptionId": 1431,
"itemInfo": [
{
"id": 2509,
"itemGroupId": 1431,
"price": 0.0,
"quantity": 2,
"preparationPeriod": 1,
"skus": [
{
"id": "110001110",
"productId": "110001",
"skuProperties": {
},
"name": "mens long sleeve micro thermal shirt",
"optionalQuantity": 0,
"type": "DEFAULT"
}
],
"properties": {
"frequencyType": "DAYS",
"name": "string",
"additionalProp3": "string",
"additionalProp2": "string",
"frequencyPeriod": "4"
}
}
],
"shippingInfo": {
"id": 1460,
"type": "PHYSICAL",
"method": "Economy",
"deliveryPeriod": 2
},
"paymentInfo": {
"paymentId": "6022",
"paymentItemId": "3865",
"paymentType": "CREDITCARD"
},
"addressInfo": {
"id": 1431,
"firstName": "Dilipkumar",
"lastName": "Viswanathan",
"middleName": "",
"addressLine1": "2/5 karamadai",
"addressLine2": "",
"city": "Coimbatore",
"state": "AZ",
"country": "US",
"zip": "10001",
"email": "externalevents1710434055709@mailinator.com",
"phone": "9789787222",
"canReceiveSMS": false,
"storeId": "1367",
"addressVersion": 1716357338764
},
"orderId": "string",
"status": "NOTIFIED",
"notificationDate": 0,
"orderProcessingDate": 0,
"editFreezeDate": 0,
"expectedDeliveryDate": 1648812559000,
"updated": false,
"transacions": [
{
"id": 1138,
"instanceId": 612,
"currentstatus": "SCHEDULED",
"updatedstatus": "NOTIFIED",
"orderId": "string",
"updatedTime": 1716357338886,
"createdTime": 1716357338886,
"updatedBy": "1",
"createdBy": "1"
}
],
"instanceItems": [
]
}
]
},
"collectionId": "813",
"eventType": "subscriptionservice/bulkinstancetransaction/patch",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
PatchUpdateSubscriptionInterval
Event Type: subscriptionservice/subscriptioninterval/patch
{
"version": "0",
"id": "ce2ce12e-1988-5fbb-b769-1bedfefadaf1",
"detail-type": "subscriptionservice/subscriptioninterval/patch",
"source": "subscriptionservice",
"account": "277827593990",
"time": "2024-05-22T05:55:46Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "116",
"timestamp": 1716357346408,
"payload": {
"id": 116,
"subscriptionId": 1431,
"orderSkipInterval": 1,
"subscriptionIntervalType": "CONTINUOUS"
},
"collectionId": "813",
"eventType": "subscriptionservice/subscriptioninterval/patch",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
DeleteUserSubscriptions
Event Type: subscriptionservice/usersubscription/delete
{
"version": "0",
"id": "b269fcea-833f-aba8-69d2-ef241218ec89",
"detail-type": "subscriptionservice/usersubscription/delete",
"source": "subscriptionservice",
"account": "277827593990",
"time": "2024-05-22T05:56:08Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"id": "0",
"timestamp": 1716357368802,
"payload": {
"responseCode": "SCUSCD0000",
"responseMessage": "User 1716357368405 Subscription Deleted Successfully.",
"timeStamp": "1716357368799"
},
"collectionId": "813",
"eventType": "subscriptionservice/usersubscription/delete",
"userId": "1",
"actOnBehalfOfUser": 0,
"roles": [
"ROLE_SUPER_ADMIN"
],
"channel": "CSR"
}
}
PatchUpdateInstanceSubscription
Event Type: subscriptionservice/instance/patchupdate
{
"version": "0",
"id": "f0d2e8be-ba27-4104-b53a-8a027a35b8ae",
"detail-type": "subscriptionservice/instance/patchupdate",
"source": "subscriptionservice",
"account": "277827593990",
"time": "2024-05-22T05:56:16Z",
"region": "us-east-1",
"resources": [
],
"detail": {
"timestamp": 1716357376256,
"payload": {
"id": 613,
"instanceSeq": 1,
"subscriptionId": 1436,
"itemInfo": [
{
"id": 2514,
"itemGroupId": 1436,
"price": 0.0,
"quantity": 2,
"preparationPeriod": 1,
"skus": [
{
"id": "110001110",
"productId": "110001",
"skuProperties": {
},
"name": "mens long sleeve micro thermal shirt",
"optionalQuantity": 0,
"type": "DEFAULT"
}
],
"properties": {
"frequencyType": "DAYS",
"name": "string",
"additionalProp3": "string",
"additionalProp2": "string",
"frequencyPeriod": "4"
}
}
],
"shippingInfo": {
"id": 1465,
"type": "PHYSICAL",
"method": "Economy",
"deliveryPeriod": 2
},
"paymentInfo": {
"paymentId": "6022",
"paymentItemId": "3865",
"paymentType": "CREDITCARD"
},
"addressInfo": {
"id": 1436,
"firstName": "Dilipkumar",
"lastName": "Viswanathan",
"middleName": "",
"addressLine1": "2/5 karamadai",
"addressLine2": "",
"city": "Coimbatore",
"state": "AZ",
"country": "US",
"zip": "10001",
"email": "externalevents1710434055709@mailinator.com",
"phone": "9789787222",
"canReceiveSMS": false,
"storeId": "1367",
"addressVersion": 1716357376075
},
"orderId": "string",
"status": "NOTIFIED",
"notificationDate": 0,
"orderProcessingDate": 0,
"editFreezeDate": 0,
"expectedDeliveryDate": 1648812559000,
"updated": false,
"transacions": [
{
"id": 1141,
"instanceId": 613,
"currentstatus": "SCHEDULED",
"updatedstatus": "NOTIFIED",
"orderId": "string",
"updatedTime": 1716357376190,
"createdTime": 1716357376190,
"updatedBy": "1",
"createdBy": "1"
}
],
"instanceItems": [
]
},
"collectionId": "813",
"eventType": "subscriptionservice/instance/patchupdate",
"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 | Create Subscription | This event is triggered when a new subscription is created and a customer has successfully subscribed it via storefront. | Topic:ecomm | subscription.create | true | SubscriptionEventPayload |
2 | Update Subscription | This event is triggered when a subscription is modified by the customer via storefront for updating shipping, billing, and/or payment information. | Topic:ecomm | subscription.update | true | SubscriptionEventPayload |
3 | Cancel Subscription | This event is triggered when a subscription is canceled by the customer. | Topic:ecomm | subscription.cancel | true | SubscriptionEventPayload |
4 | Create Instance | This event is triggered when a subscription instance is created successfully. | Topic:ecomm | subscription.instance.create | true | SubscriptionEventPayload |
5 | Scheduled Instance | This event is triggered when a subscription instance is scheduled successfully. | Topic:ecomm | subscription.instance.schedule | true | SubscriptionEventPayload |
6 | Frozen Instance | This event is triggered when a subscription instance is frozen. | Topic:ecomm | subscription.instance.frozen | true | SubscriptionEventPayload |
7 | Completed Instance | This event is triggered when a subscription instance is completed successfully. | Topic:ecomm | subscription.instance.completed | true | SubscriptionEventPayload |
8 | Failed Instance | This event is triggered when a subscription instance is failed; for example, failure while processing the payment. | Topic:ecomm | subscription.instance.failed | true | SubscriptionEventPayload |
9 | Add item Subscription | Add new item in subscription event is fired when a new item is added in existing subscription | Topic:ecomm | subscription.item.create | true | SubscriptionEventPayload |
10 | Update item Subscription | Update item in subscription event is fired when a item is updated in existing subscription | Topic:ecomm | subscription.item.update | true | SubscriptionEventPayload |
11 | Update item Subscription | Update item in subscription event is fired when a item is updated in existing subscription | Topic:ecomm | subscription.item.update | true | SubscriptionEventPayload |
12 | Delete item Subscription | Delete item in subscription event is fired when a item is deleted in existing subscription | Topic:ecomm | subscription.item.delete | true | SubscriptionEventPayload |
Payload Model
Below is the payload for the Subscription microservice events:
SubscriptionEventPayload
Property | Type | Description | Example |
---|---|---|---|
collectionId | long | Indicates the unique ID of the collection. | 1 |
subscriptionId | long | Indicates the identifier of the subscription, which is created, updated, or deleted. | 123 |
accountId | string | Indicates the unique ID of the account. | 1 |
userId | string | Specifies the identifier of the user, who accesses the subscription. | 123 |
subscriptionStatus | string | Specifies the status of the project, such as CREATED, SCHEDULED, ON-HOLD, CANCELED, DELETE, RESUME, or COMPLETED. | CREATED |
instanceId | long | Indicates the unique ID of the instance. | 1 |
instanceStatus | string | Specifies the status of the project, such as DAILY, WEEKLY, MONTHLY, or YEARLY. | WEEKLY |
Revision History
2024-05-24 | SW – Added the external events for Release 8.17.4
2019-09-24 | AN – Page created and the content updated.