Move inventory request events
Move request events are generated as part of the Move Request APIs whenever you create or complete a move request in the Store Inventory Management microservice.
The following examples illustrate the move inventory request events in Sterling Store Engagement.
Move Request Created event
When you create move requests in Store Inventory
Management, Sterling Store Engagement triggers the
Move Request Created event. The code for this event is moveRequestCreated.
The following sample JSON illustrates the published event. The application encodes and adds the
event data to messages[].data JSON path.
{
"messages": [
{
"data": {
"moveRequestId": "400345rt-de1b-47f9-97a6-4486488f3105",
"storeId": "BOSTON-1",
"status": "NOT_STARTED",
"performedByUserId": "John",
"priority": 0,
"expectedCompletionTime": "2019-01-28T16:38:20.477Z",
"createdTimestamp": "2019-01-28T16:38:20.477Z",
"assignedToUserId": "joe",
"type": "REPLENISHMENT",
"sourceLocationId": "",
"targetLocationId": "STORE_FRONT-1",
"requestedBy": "storeManager",
"purpose": "Refill",
"references": {},
"requestedProducts": [
{
"lineReferenceId": "101",
"productId": "SMART-TABLET",
"unitOfMeasure": "EACH",
"quantity": 10,
"inventoryStatus": "GOOD",
"productClass": "NEW",
"segmentType": "CHANNEL",
"segment": "PFS",
"canceledQuantity": 0,
"sourceLocationId": "",
"targetLocationId": "",
"serials": [],
"canceledSerials": [],
"references": {}
}
],
"moveTasks": [
{
"taskId": "500345rt-de1b-47f9-97a6-4486488f3105",
"status": "NOT_STARTED",
"productId": "SMART-TABLET",
"unitOfMeasure": "EACH",
"requestedQuantity": 10,
"shortageQuantity": 0,
"completedQuantity": 0,
"sourceLocationId": "BACKROOM-1",
"targetLocationId": "STORE_FRONT-1",
"lineReferenceId": "101",
"inventoryStatus": "GOOD",
"productClass": "NEW",
"segmentType": "CHANNEL",
"segment": "PFS",
"sourceLocationSequence": 0,
"requestedSerials": [],
"completedSerials": []
}
]
},
"attributes": {
"eventCode": "moveRequestCreated",
"timestamp": "2021-11-18T10:34:49.997304Z",
"messageId": "100345rt-de1b-47f9-97a6-4486488f3204"
}
}
]
}
The following sample illustrates the JSON schema specification that defines the structure of JSON
data published to the moveRequestCreated event.
{
"title": "Move Request Created event message",
"type": "object",
"description": "Indicates the message payload published for Move Request Created event.",
"properties": {
"messages": {
"type": "array",
"description": "",
"items": {
"type": "object",
"description": "Indicates the event data published in the message.",
"properties": {
"data": {
"type": "object",
"description": "",
"properties": {
"moveRequestId": {
"type": "string",
"format": "uuid",
"description": "Indicates the move request identifier."
},
"storeId": {
"type": "string",
"description": "The store identifier"
},
"status": {
"type": "string",
"description": "Status of the move request. Possible Value()s) are NOT_STARTED,PICKED,IN_PROGRESS,COMPLETED,CANCELLED"
},
"performedByUserId": {
"type": "string",
"description": "User Id who has performed the create move request operation."
},
"priority": {
"type": "integer",
"description": "Priority of pick request"
},
"expectedCompletionTime": {
"type": "string",
"format": "date-time",
"description": "Moverequest is expected to be completed before this time. Date format - yyyy-MM-ddTHH:mm:ss.SSSZ"
},
"createdTimestamp": {
"type": "string",
"format": "date-time",
"description": "Move request's created timestamp. Date format - yyyy-MM-ddTHH:mm:ss.SSSZ"
},
"assignedToUserId": {
"type": "string",
"description": "User identifier to whom the move request is assigned to"
},
"type": {
"type": "string",
"description": "The type of move request. Allowed value for a type are: GENERAL, REPLENISHMENT, PUTAWAY, ADHOC"
},
"sourceLocationId": {
"type": "string",
"description": "The source location identifier"
},
"targetLocationId": {
"type": "string",
"description": "The target location identifier"
},
"requestedBy": {
"type": "string",
"description": "User identifier who requested the move"
},
"purpose": {
"type": "string",
"description": "The purpose"
},
"references": {
"type": "object",
"description": "References at the request level. Key value pairs (only text) can be passed to store custom fields.",
"patternProperties": {
"^.*$": {
"type": "string"
}
},
"additionalProperties": {
"type": "string"
}
},
"requestedProducts": {
"type": "array",
"description": "List of Requested products",
"items": {
"type": "object",
"description": "Requested product details.",
"properties": {
"productId": {
"type": "string",
"description": "The product identifier."
},
"unitOfMeasure": {
"type": "string",
"description": "Indicates the unit of measure for the product."
},
"quantity": {
"type": "number",
"format": "double",
"description": "Quantity of the product that is requested."
},
"cancelledQuantity": {
"type": "number",
"format": "double",
"description": "Quantity of the product that is cancelled."
},
"lineReferenceId": {
"type": "string",
"description": " Identifier for a requested product line reference."
},
"inventoryStatus": {
"type": "string",
"description": "Indicates the status of inventory for the product."
},
"productClass": {
"type": "string",
"description": "Indicates the class of product."
},
"segmentType": {
"type": "string",
"description": "Indicates the segment type of product."
},
"segment": {
"type": "string",
"description": "Indicates the segment of product."
},
"sourceLocationId": {
"type": "string",
"description": "Indicates the source location identifier"
},
"targetLocationId": {
"type": "string",
"description": "Indicates the target location identifier"
},
"serials": {
"type": "array",
"description": "Indicates list of serial numbers requested",
"items": {
"type": "string"
}
},
"cancelledSerials": {
"type": "array",
"description": "Indicates list of serial numbers which are cancelled",
"items": {
"type": "string"
}
},
"references": {
"type": "object",
"description": "References at the product level. Key value pairs (only text) can be passed to store custom fields.",
"patternProperties": {
"^.*$": {
"type": "string"
}
},
"additionalProperties": {
"type": "string"
}
}
}
}
},
"moveTasks": {
"type": "array",
"description": "List of Move Tasks",
"items": {
"type": "object",
"description": "List of Move Tasks",
"properties": {
"taskId": {
"type": "string",
"format": "uuid",
"description": "The Move task identifier"
},
"lineReferenceId": {
"type": "string",
"description": " Identifier for a requested product line reference."
},
"productId": {
"type": "string",
"description": "The product identifier"
},
"unitOfMeasure": {
"type": "string",
"description": "The unit of measure for the product"
},
"productClass": {
"type": "string",
"description": "The product class of the product"
},
"inventoryStatus": {
"type": "string",
"description": "Indicates the inventory status"
},
"segmentType": {
"type": "string",
"description": "Indicates the segment type"
},
"segment": {
"type": "string",
"description": "Indicates the segment"
},
"status": {
"type": "string",
"description": "Indicates the status of the Move task"
},
"requestedQuantity": {
"type": "number",
"format": "double",
"description": "Indicates the quantity requested"
},
"shortageQuantity": {
"type": "number",
"format": "double",
"description": "Indicates the shortage quantity"
},
"completedQuantity": {
"type": "number",
"format": "double",
"description": "Indicates the completed quantity"
},
"sourceLocationId": {
"type": "string",
"description": "Indicates the source location identifier"
},
"targetLocationId": {
"type": "string",
"description": "Indicates the target location identifier"
},
"sourceLocationSequence": {
"type": "integer",
"description": "Indicates the sequence of source location."
},
"requestedSerials": {
"type": "array",
"description": "Indicates list of serial numbers requested to receive",
"items": {
"type": "string"
}
},
"completedSerials": {
"type": "array",
"description": "Indicates list of serial numbers receiving completed",
"items": {
"type": "string"
}
}
}
}
}
}
},
"attributes": {
"type": "object",
"description": "",
"properties": {
"eventCode": {
"type": "string",
"description": "Indicates the event code of the message."
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Indicates the time when the message was triggered."
},
"messageId": {
"type": "string",
"format": "uuid",
"description": "Indicates the message identifier."
}
}
}
}
}
}
}
}
Move Request Completed event
When you complete move requests in Store Inventory
Management, Sterling Store Engagement triggers
the Move Request Completed event. The code for this event is
moveRequestCompleted.
The following sample JSON illustrates the published event. Sterling Store Engagement encodes and
adds the event data to messages[].data JSON path.
{
"messages": [
{
"data": {
"moveRequestId": "400345rt-de1b-47f9-97a6-4486488f3105",
"storeId": "BOSTON-1",
"status": "COMPLETED",
"performedByUserId": "John",
"priority": 0,
"expectedCompletionTime": "2019-01-28T16:38:20.477Z",
"createdTimestamp": "2019-01-28T16:38:20.477Z",
"assignedToUserId": "joe",
"type": "REPLENISHMENT",
"sourceLocationId": "",
"targetLocationId": "STORE_FRONT-1",
"requestedBy": "storeManager",
"purpose": "Refill",
"references": {},
"requestedProducts": [
{
"lineReferenceId": "101",
"productId": "SMART-TABLET",
"unitOfMeasure": "EACH",
"quantity": 10,
"inventoryStatus": "GOOD",
"productClass": "NEW",
"segmentType": "CHANNEL",
"segment": "PFS",
"canceledQuantity": 0,
"sourceLocationId": "",
"targetLocationId": "",
"serials": [],
"canceledSerials": [],
"references": {}
}
],
"moveTasks": [
{
"taskId": "500345rt-de1b-47f9-97a6-4486488f3105",
"status": "COMLETED",
"productId": "SMART-TABLET",
"unitOfMeasure": "EACH",
"requestedQuantity": 10,
"shortageQuantity": 0,
"completedQuantity": 10,
"sourceLocationId": "BACKROOM-1",
"targetLocationId": "STORE_FRONT-1",
"lineReferenceId": "101",
"inventoryStatus": "GOOD",
"productClass": "NEW",
"segmentType": "CHANNEL",
"segment": "PFS",
"sourceLocationSequence": 0,
"requestedSerials": [],
"completedSerials": []
}
]
},
"attributes": {
"eventCode": "moveRequestCompleted",
"timestamp": "2021-11-18T10:34:49.997304Z",
"messageId": "890543rt-de1b-47f9-97a6-4486488e9081"
}
}
]
}
The following sample illustrates the JSON schema specification that defines the structure of JSON
data published to the moveRequestCompleted event.
{
"title": "Move Request Completed event message",
"type": "object",
"description": "Indicates the message payload published for Move Request Completed event.",
"properties": {
"messages": {
"type": "array",
"description": "",
"items": {
"type": "object",
"description": "Indicates the event data published in the message.",
"properties": {
"data": {
"type": "object",
"description": "",
"properties": {
"moveRequestId": {
"type": "string",
"format": "uuid",
"description": "Indicates the move request identifier."
},
"storeId": {
"type": "string",
"description": "The store identifier"
},
"status": {
"type": "string",
"description": "Status of the move request. Possible Value()s) are NOT_STARTED,PICKED,IN_PROGRESS,COMPLETED,CANCELLED"
},
"performedByUserId": {
"type": "string",
"description": "User Id who has performed the complete move request operation"
},
"priority": {
"type": "integer",
"description": "Priority of Move request"
},
"expectedCompletionTime": {
"type": "string",
"format": "date-time",
"description": "Move request is expected to be completed before this time. Date format - yyyy-MM-ddTHH:mm:ss.SSSZ"
},
"createdTimestamp": {
"type": "string",
"format": "date-time",
"description": "Move request's created timestamp. Date format - yyyy-MM-ddTHH:mm:ss.SSSZ"
},
"assignedToUserId": {
"type": "string",
"description": "User identifier to whom the move request is assigned to"
},
"type": {
"type": "string",
"description": "The type of move request. Allowed value for a type are: GENERAL, REPLENISHMENT, PUTAWAY, ADHOC"
},
"sourceLocationId": {
"type": "string",
"description": "The source location identifier"
},
"targetLocationId": {
"type": "string",
"description": "The target location identifier"
},
"requestedBy": {
"type": "string",
"description": "User identifier who requested the move"
},
"purpose": {
"type": "string",
"description": "The purpose"
},
"references": {
"type": "object",
"description": "References at the request level. Key value pairs (only text) can be passed to store custom fields.",
"patternProperties": {
"^.*$": {
"type": "string"
}
},
"additionalProperties": {
"type": "string"
}
},
"requestedProducts": {
"type": "array",
"description": "List of Requested products",
"items": {
"type": "object",
"description": "Requested product details.",
"properties": {
"productId": {
"type": "string",
"description": "The product identifier."
},
"unitOfMeasure": {
"type": "string",
"description": "Indicates the unit of measure for the product."
},
"quantity": {
"type": "number",
"format": "double",
"description": "Quantity of the product that is requested."
},
"cancelledQuantity": {
"type": "number",
"format": "double",
"description": "Quantity of the product that is cancelled."
},
"lineReferenceId": {
"type": "string",
"description": " Identifier for a requested product line reference."
},
"inventoryStatus": {
"type": "string",
"description": "Indicates the status of inventory for the product."
},
"productClass": {
"type": "string",
"description": "Indicates the class of product."
},
"segmentType": {
"type": "string",
"description": "Indicates the segment type of product."
},
"segment": {
"type": "string",
"description": "Indicates the segment of product."
},
"sourceLocationId": {
"type": "string",
"description": "Indicates the source location identifier"
},
"targetLocationId": {
"type": "string",
"description": "Indicates the target location identifier"
},
"serials": {
"type": "array",
"description": "Indicates list of serial numbers requested",
"items": {
"type": "string"
}
},
"cancelledSerials": {
"type": "array",
"description": "Indicates list of serial numbers which are cancelled",
"items": {
"type": "string"
}
},
"references": {
"type": "object",
"description": "References at the product level. Key value pairs (only text) can be passed to store custom fields.",
"patternProperties": {
"^.*$": {
"type": "string"
}
},
"additionalProperties": {
"type": "string"
}
}
}
}
},
"moveTasks": {
"type": "array",
"description": "List of Move Tasks",
"items": {
"type": "object",
"description": "List of Move Tasks",
"properties": {
"taskId": {
"type": "string",
"format": "uuid",
"description": "The Move task identifier"
},
"lineReferenceId": {
"type": "string",
"description": " Identifier for a requested product line reference."
},
"productId": {
"type": "string",
"description": "The product identifier"
},
"unitOfMeasure": {
"type": "string",
"description": "The unit of measure for the product"
},
"productClass": {
"type": "string",
"description": "The product class of the product"
},
"inventoryStatus": {
"type": "string",
"description": "Indicates the inventory status"
},
"segmentType": {
"type": "string",
"description": "Indicates the segment type"
},
"segment": {
"type": "string",
"description": "Indicates the segment"
},
"status": {
"type": "string",
"description": "Indicates the status of the move task"
},
"requestedQuantity": {
"type": "number",
"format": "double",
"description": "Indicates the quantity requested"
},
"shortageQuantity": {
"type": "number",
"format": "double",
"description": "Indicates the shortage quantity"
},
"completedQuantity": {
"type": "number",
"format": "double",
"description": "Indicates the completed quantity"
},
"sourceLocationId": {
"type": "string",
"description": "Indicates the source location identifier"
},
"targetLocationId": {
"type": "string",
"description": "Indicates the target location identifier"
},
"sourceLocationSequence": {
"type": "integer",
"description": "Indicates the sequence of source location."
},
"requestedSerials": {
"type": "array",
"description": "Indicates list of serial numbers requested to move",
"items": {
"type": "string"
}
},
"completedSerials": {
"type": "array",
"description": "Indicates list of serial numbers move completed",
"items": {
"type": "string"
}
}
}
}
}
}
},
"attributes": {
"type": "object",
"description": "",
"properties": {
"eventCode": {
"type": "string",
"description": "Indicates the event code of the message."
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Indicates the time when the message was triggered."
},
"messageId": {
"type": "string",
"format": "uuid",
"description": "Indicates the message identifier."
}
}
}
}
}
}
}
}