Plataforma de última geração

Eventos de solicitação de inventário de movimentação

Os eventos de solicitação de movimentação são gerados como parte das APIs de Solicitação de Movimentação sempre que você criar ou concluir uma solicitação de movimentação no microsserviço Gerenciamento de Inventário da Loja

Os exemplos a seguir ilustram os eventos de solicitação de movimentação de inventário no Sterling Store Engagement

Evento Solicitação de Movimentação Criada

Ao criar solicitações de movimentação no Store Inventory Management, o Sterling Store Engagement aciona o evento Solicitação de Movimentação Criada. O código para esse evento é moveRequestCreated

O JSON de amostra a seguir ilustra o evento publicado O aplicativo codifica e inclui os dados do evento no caminho JSON do messages[].data

{
  "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"
      }
    }
  ]
}

A amostra a seguir ilustra a especificação de esquema JSON que define a estrutura de dados JSON publicados no evento moveRequestCreated .

{
  "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."
              }
            }
          }
        }
      }
    }
  }
}

Evento Solicitação de Movimentação Concluída

Ao concluir solicitações de movimentação no Gerenciamento de Inventário da Loja, o Sterling Store Engagement aciona o evento Solicitação de Movimentação Concluída. O código para esse evento é moveRequestCompleted

O JSON de amostra a seguir ilustra o evento publicado Sterling Store Engagement codifica e inclui os dados do evento no caminho JSON messages[].data .

{
  "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"
      }
    }
  ]
}

A amostra a seguir ilustra a especificação de esquema JSON que define a estrutura de dados JSON publicados no evento moveRequestCompleted .

{
  "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."
              }
            }
          }
        }
      }
    }
  }
}