Eventos de contagem
Os eventos de contagem são gerados como parte das APIs de Contagem sempre que uma tarefa de contagem é criada, designada ou concluída e uma solicitação de contagem é criada ou concluída e uma variação é aprovada no microsserviço Gerenciamento de Inventário de Armazenamento .
Os exemplos a seguir ilustram os eventos de contagem no Sterling Store Engagement..
Evento Solicitação de Contagem Criada
O evento Count Request Created é aplicável para contagem de ciclos, contagem física e contagem manual. Ao criar solicitações de contagem no Store Inventory Management, o Sterling Store Engagement aciona o evento Solicitação de Contagem Criada. O código para esse evento é countRequestCreated
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": {
"countRequestId": "23dd9d76-e059-4d95-910d-d517f1437d9e",
"storeId": "S1",
"type": "CYCLE",
"status": "NOT_STARTED",
"startDate": "2019-05-07T00:00:00Z",
"expectedCompletionTime": "2019-05-18T23:59:59Z",
"countProgramId": "20951fbe-bced-40a9-b6d6-5a87b7f19249",
"exclusionDaysWeek": [
"SUN"
],
"varianceThreshold": 0,
"requestedItems": [
{
"productId": "P1",
"unitOfMeasure": "EACH"
}
],
"locationIds": [
"L1"
],
"itemLocations": [],
"recounting": "RECOUNT_ON_VARIANCE",
"serialScanning": "MANDATORY_RECOUNT",
"countingType": "ITEM_LOCATION",
"createdByUserId": "System",
"performedByUserId": "System",
"createdTimestamp": "2019-05-07T10:28:51.698Z"
},
"attributes": {
"eventCode": "countRequestCreated",
"timestamp": "2019-05-07T02:00:00+00:00",
"messageId": "3cacb233-de1b-47f9-97a6-4486488f3201"
}
}
]
}
A amostra a seguir ilustra a especificação de esquema JSON que define a estrutura de dados JSON publicados no evento countRequestCreated .
{
"title": "Count Request Created event message",
"type": "object",
"description": "Indicates the message payload published for Count Request Created event.",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"description": "Indicates the event data published in the message.",
"properties": {
"data": {
"type": "object",
"description": "Count request details.",
"properties": {
"countRequestId": {
"type": "string",
"format": "uuid",
"description": "The count request identifier."
},
"storeId": {
"type": "string",
"description": "The store identifier."
},
"type": {
"type": "string",
"description": "Indicates the type of count request."
},
"status": {
"type": "string",
"description": "Indicates the count request status."
},
"startDate": {
"type": "string",
"format": "date-time",
"description": "Indicates the start date of the count request."
},
"expectedCompletionTime": {
"type": "string",
"format": "date-time",
"description": "Indicates the expected completion time of the count request."
},
"countProgramId": {
"type": "string",
"format": "uuid",
"description": "The count program identifier."
},
"exclusionDaysWeek": {
"type": "array",
"description": "Indicates the days on which count task is not created.",
"items": {
"type": "string"
}
},
"varianceThreshold": {
"type": "integer",
"description": " Variance percentage, which recounting will be done."
},
"recounting": {
"type": "string",
"description": "Possible value is RECOUNT_ON_VARIANCE'"
},
"serialScanning": {
"type": "string",
"description": "Possible value is MANDATORY_RECOUNT"
},
"countingType": {
"type": "string",
"description": "Indicates the couting type. Possible value is ITEM_LOCATION."
},
"createdByUserId": {
"type": "string",
"description": "The user who created the count request."
},
"performedByUserId": {
"type": "string",
"description": "The user who performs the create count request operation."
},
"createdTimestamp": {
"type": "string",
"format": "date-time",
"description": "Indicates the time when the count request was created."
},
"locationIds": {
"type": "array",
"description": "Indicates the list of location identifiers.",
"items": {
"type": "string"
}
},
"requestedItems": {
"type": "array",
"description": "List of requested items.",
"items": {
"type": "object",
"properties": {
"productId": {
"type": "string",
"description": "The product identifier."
},
"unitOfMeasure": {
"type": "string",
"description": "Indicates the unit of measure for the product."
}
}
}
},
"itemLocations": {
"type": "array",
"description": "List of item locations.",
"items": {
"type": "object",
"properties": {
"requestedItem": {
"type": "object",
"description": "Requested item details.",
"properties": {
"productId": {
"type": "string",
"description": "The product identifier."
},
"unitOfMeasure": {
"type": "string",
"description": "Indicates the unit of measure for the product."
}
}
},
"locationIds": {
"type": "array",
"description": "Indicates the list of location identifiers.",
"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 Tarefa de Contagem Criada
O evento Count Task Created é aplicável para contagem de ciclos, contagem física e contagem manual. Quando você cria tarefas de contagem no Gerenciamento de Inventário de Armazenamento, o Sterling Store Engagement aciona o evento Tarefas de Contagem Criadas.. O código para esse evento é countTasksCreated
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": {
"countRequestId": "23dd9d76-e059-4d95-910d-d517f1437d9e",
"status": "NOT_STARTED",
"performedByUsedId": "System",
"countTasks": [
{
"countTaskId": "2220d7a2-8669-41a6-a27e-a86874c982ba",
"type": "CYCLE",
"locationId": "L1",
"productId": "P1",
"unitOfMeasure": "EACH",
"expectedCompletionTime": "2019-05-07T23:59:59Z",
"serialScanningRequired": false,
"createdByUserId": "System",
"createdTimestamp": "2019-05-07T10:28:51.701Z"
}
]
},
"attributes": {
"eventCode": "countTasksCreated",
"timestamp": "2019-05-07T02:00:00+00:00",
"messageId": "3cacb233-de1b-47f9-97a6-4486488f3201"
}
}
]
}
A amostra a seguir ilustra a especificação de esquema JSON que define a estrutura de dados JSON publicados no evento countTasksCreated .
{
"title": "Count Task Created event message",
"type": "object",
"description": "Indicates the message payload published for Count Task Created event.",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"description": "Indicates the event data published in the message.",
"properties": {
"data": {
"type": "object",
"description": "Count request details.",
"properties": {
"countRequestId": {
"type": "string",
"format": "uuid",
"description": "The count request identifier."
},
"status": {
"type": "string",
"description": "The status of count request,"
},
"performedByUserId": {
"type": "string",
"description": "User Id who performed the create count task operation"
},
"countTasks": {
"type": "array",
"description": "List of count tasks.",
"items": {
"type": "object",
"description": "Count task details",
"properties": {
"countTaskId": {
"type": "string",
"format": "uuid",
"description": "The count task identifier."
},
"type": {
"type": "string",
"description": "The type of the count request."
},
"locationId": {
"type": "string",
"description": "The location identifier."
},
"productId": {
"type": "string",
"description": "The product identifier."
},
"unitOfMeasure": {
"type": "string",
"description": "Indicates the unit of measure for the product."
},
"expectedCompletionTime": {
"type": "string",
"format": "date-time",
"description": "Indicates the expected completion time of the count task."
},
"serialScanningRequired": {
"type": "boolean",
"description": "Indicates whether serial scanning is required during count."
},
"createdByUserId": {
"type": "string",
"description": "The user who created the count request."
},
"createdTimestamp": {
"type": "string",
"format": "date-time",
"description": "Indicates the time when the count task was created."
}
}
}
}
}
},
"attributes": {
"type": "object",
"description": "Event details.",
"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 Contagem Concluída
O evento Count Request Completed é aplicável para contagem de ciclos, contagem física e contagem manual. Ao concluir solicitações de contagem no Gerenciamento de Inventário da Loja, o Sterling Store Engagement aciona o evento Solicitação de Contagem Concluída. O código para esse evento é countRequestCompleted
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": {
"countRequestId": "23dd9d76-e059-4d95-910d-d517f1437d9e",
"status": "COMPLETED",
"performedByUserId": "System",
"countTasks": [
{
"countTaskId": "2220d7a2-8669-41a6-a27e-a86874c982ba",
"locationId": "L1",
"productId": "P1",
"unitOfMeasure": "EACH",
"status": "COMPLETED_WITH_VARIANCE",
"originalTaskId": "",
"hasDiscrepancy": true,
"actualExecutionDate": "2019-05-07T13:59:59Z",
"serialScanningRequired": false,
"recordedAttributes": [
{
"productClass": "NEW",
"inventoryStatus": "GOOD",
"segment": "PURPOSE",
"segmentType": "VENDOR_FULFILLMENT",
"tagNo": "Tag01",
"batchNo": "Batch01",
"lotNo": "Lot01",
"manufacturedDate": "2019-05-07T09:12:31.465Z",
"count": 7,
"serials": []
}
],
"varianceAttributes": [
{
"productClass": "NEW",
"inventoryStatus": "GOOD",
"segment": "PURPOSE",
"segmentType": "VENDOR_FULFILLMENT",
"tagNo": "Tag01",
"batchNo": "Batch01",
"lotNo": "Lot01",
"manufacturedDate": "2019-05-07T09:12:31.465Z",
"variance": -3,
"newSerialsFound": [],
"serialsMissing": []
}
]
}
]
},
"attributes": {
"eventCode": "countRequestCompleted",
"timestamp": "2019-05-07T02:00:00+00:00",
"messageId": "3cacb233-de1b-47f9-97a6-4486488f3201"
}
}
]
}
A amostra a seguir ilustra a especificação de esquema JSON que define a estrutura de dados JSON publicados no evento countRequestCompleted .
{
"title": "Count Request Completed event message",
"type": "object",
"description": "Indicates the message payload published for Count Request Completed event.",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"description": "Indicates the event data published in the message.",
"properties": {
"data": {
"type": "object",
"description": "Count request details",
"properties": {
"countRequestId": {
"type": "string",
"format": "uuid",
"description": "The count request identifier."
},
"status": {
"type": "string",
"description": "The status of count request."
},
"performedByUserId": {
"type": "string",
"description": "User Id who has performed the complete count request operation."
},
"countTasks": {
"type": "array",
"description": "List of count tasks",
"items": {
"type": "object",
"description": "Count task details.",
"properties": {
"countTaskId": {
"type": "string",
"format": "uuid",
"description": "The count task identifier."
},
"locationId": {
"type": "string",
"description": "The location identifier."
},
"productId": {
"type": "string",
"description": "The product identifier."
},
"unitOfMeasure": {
"type": "string",
"description": "The unit of measure for the product."
},
"status": {
"type": "string",
"description": "Indicates the status of count task."
},
"originalTaskId": {
"type": "string",
"format": "uuid",
"description": "Indicates the original count task identifier."
},
"hasDiscrepancy": {
"type": "boolean",
"description": "Indicates whether any discrepancy was found during count execution."
},
"actualExecutionDate": {
"type": "string",
"format": "date-time",
"description": "Indicates the execution time of the count task."
},
"serialScanningRequired": {
"type": "boolean",
"description": "Indicates whether serial number scan is required."
},
"recordedAttributes": {
"type": "array",
"description": "",
"items": {
"type": "object",
"description": "Indicates the event data published in the message.",
"properties": {
"productClass": {
"type": "string",
"description": "Indicates the product class."
},
"inventoryStatus": {
"type": "string",
"description": "Indicates the inventory status of the product."
},
"segment": {
"type": "string",
"description": "Indicates the segment of the product."
},
"segmentType": {
"type": "string",
"description": "Indicates the segment type of the product."
},
"tagNo": {
"type": "string",
"description": "Indicates the tag number of the product."
},
"batchNo": {
"type": "string",
"description": "Indicates the batch number of the product."
},
"lotNo": {
"type": "string",
"description": "Indicates the lot number of the product."
},
"manufacturedDate": {
"type": "string",
"format": "date-time",
"description": "Indicates the manufacturing date of the product. Date format - yyyy-MM-ddTHH:mm:ss.SSSZ"
},
"count": {
"type": "integer",
"description": ""
},
"serials": {
"type": "array",
"description": "List of serial numbers. ",
"items": {
"type": "string"
}
}
}
}
},
"varianceAttributes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"productClass": {
"type": "string",
"description": "Indicates the product class."
},
"inventoryStatus": {
"type": "string",
"description": "Indicates the inventory status of the product."
},
"segment": {
"type": "string",
"description": "Indicates the segment of the product."
},
"segmentType": {
"type": "string",
"description": "Indicates the segment type of the product."
},
"tagNo": {
"type": "string",
"description": "Indicates the tag number of the product."
},
"batchNo": {
"type": "string",
"description": "Indicates the batch number of the product."
},
"lotNo": {
"type": "string",
"description": "Indicates the lot number of the product."
},
"manufacturedDate": {
"type": "string",
"format": "date-time",
"description": "Indicates the manufacturing date of the product. Date format - yyyy-MM-ddTHH:mm:ss.SSSZ"
},
"variance": {
"type": "integer",
"description": "."
},
"newSerialsFound": {
"type": "array",
"description": "List of new serial numbers found during count execution.",
"items": {
"type": "string"
}
},
"serialsMissing": {
"type": "array",
"description": "List of serial numbers missing during count execution.",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
},
"attributes": {
"type": "object",
"description": "Event details",
"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 Tarefa de Contagem Designada
O evento Count Task Assigned é aplicável para contagem de ciclos, contagem física e contagem manual. Ao designar tarefas de contagem no Store Inventory Management, o Sterling Store Engagement aciona o evento Count Task Assigned. O código para esse evento é countTasksAssigned
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": {
"assignedToUserId": "Jim",
"performedByUserId": "John",
"countTasks": [
{
"countTaskId": "2220d7a2-8669-41a6-a27e-a86874c982ba",
"countRequestId": "23dd9d76-e059-4d95-910d-d517f1437d9e",
"originalTaskId": "",
"locationId": "L1",
"productId": "P1",
"unitOfMeasure": "EACH"
}
]
},
"attributes": {
"eventCode": "countTasksAssigned",
"timestamp": "2019-05-07T02:00:00+00:00",
"messageId": "3cacb233-de1b-47f9-97a6-4486488f3201"
}
}
]
}
A amostra a seguir ilustra a especificação de esquema JSON que define a estrutura de dados JSON publicados no evento countTasksAssigned .
{
"title": "Count Task Assigned event message",
"type": "object",
"description": "Indicates the message payload published for Count Task Assigned event.",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"description": "Indicates the event data published in the message.",
"properties": {
"data": {
"type": "object",
"properties": {
"assignedToUserId": {
"type": "string",
"description": "User to whom the tasks are to be assigned."
},
"performedByUserId": {
"type": "string",
"decription": "User Id who has performed assign to user Id operation"
},
"countTasks": {
"type": "array",
"description": "List of count tasks.",
"items": {
"type": "object",
"description": "Count task details.",
"properties": {
"countTaskId": {
"type": "string",
"format": "uuid",
"description": "The count task identifier."
},
"countRequestId": {
"type": "string",
"format": "uuid",
"description": "The count request identifier."
},
"originalTaskId": {
"type": "string",
"format": "uuid",
"description": ""
},
"locationId": {
"type": "string",
"description": "The location identifier"
},
"productId": {
"type": "string",
"description": "The product identifier."
},
"unitOfMeasure": {
"type": "string",
"description": "Indicates the unit of measure for the product."
}
}
}
}
}
},
"attributes": {
"type": "object",
"description": "Event details.",
"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 Variação Aprovada
Quando você aprova a variação no Store Inventory Management, o Sterling Store Engagement aciona o evento Variance Approved . O código para esse evento é varianceApproved
O JSON de amostra a seguir ilustra o evento publicado para contagem de ciclos, contagem manual e contagem física quando o cálculo de variância é definido no nível da tarefa Sterling Store Engagement codifica e inclui os dados do evento no caminho JSON messages[].data .
{
"messages": [
{
"data": {
"countTaskId": "2220d7a2-8669-41a6-a27e-a86874c982bb",
"locationId": "L1",
"productId": "P1",
"unitOfMeasure": "EACH",
"status": "COMPLETED",
"performedByUserId": "Jim",
"countRequestId": "23dd9d76-e059-4d95-910d-d517f1437d9e",
"originalTaskId": "2220d7a2-8669-41a6-a27e-a86874c982ba",
"hasDiscrepancy": true,
"actualExecutionDate": "2019-05-07T13:59:59Z",
"serialScanningRequired": false,
"varianceStatus": "APPROVED",
"varianceReason": "Extra_Items_Found",
"varianceAttributes": [
{
"productClass": "NEW",
"inventoryStatus": "GOOD",
"segment": "PURPOSE",
"segmentType": "VENDOR_FULFILLMENT",
"tagNo": "Tag01",
"batchNo": "Batch01",
"lotNo": "Lot01",
"manufacturedDate": "2019-05-07T09:12:31.465Z",
"variance": 2,
"newSerialsFound": [
"Serial1"
],
"serialsMissing": []
}
]
},
"attributes": {
"eventCode": "varianceApproved",
"timestamp": "2019-05-07T02:00:00+00:00",
"messageId": "3cacb233-de1b-47f9-97a6-4486488f3201"
}
}
]
}
A amostra a seguir ilustra a especificação de esquema JSON para contagem de ciclo, contagem manual e contagem física quando o cálculo de variância é configurado no nível de tarefa, que define a estrutura de dados JSON publicados para o evento varianceApproved
{
"title": "Variance Approved event message",
"type": "object",
"description": "Indicates the message payload published for Variance Approved event.",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"description": "Indicates the event data published in the message.",
"properties": {
"data": {
"type": "object",
"description": "Count task details.",
"properties": {
"countTaskId": {
"type": "string",
"format": "uuid",
"description": "The count task identifier."
},
"locationId": {
"type": "string",
"description": "The location identifier."
},
"productId": {
"type": "string",
"description": "The product identifier."
},
"unitOfMeasure": {
"type": "string",
"description": "Indicates the unit of measure for the product."
},
"status": {
"type": "string",
"description": "Status of the count task."
},
"performedByUserId": {
"type": "string",
"description": "User Id who has performed approve-variance operation."
},
"countRequestId": {
"type": "string",
"format": "uuid",
"description": "The count request identifier."
},
"originalTaskId": {
"type": "string",
"format": "uuid",
"description": "The count task identifier."
},
"hasDiscrepancy": {
"type": "boolean",
"description": "Indicates whether any discrepancy was found during count execution."
},
"actualExecutionDate": {
"type": "string",
"format": "date-time",
"description": "Indicates the execution time of the count task."
},
"serialScanningRequired": {
"type": "boolean",
"description": "Indicates whether serial scanning is required during count."
},
"varianceStatus": {
"type": "string",
"description": ""
},
"varianceReason": {
"type": "string",
"description": ""
},
"varianceAttributes": {
"type": "array",
"items": {
"type": "object",
"description": "Variance attribute details.",
"properties": {
"productClass": {
"type": "string",
"description": "Indicates the class of product."
},
"inventoryStatus": {
"type": "string",
"description": "Indicates the status of inventory for the product."
},
"segment": {
"type": "string",
"description": "Indicates the segment of the product."
},
"segmentType": {
"type": "string",
"description": "Indicates the segment type of the product."
},
"tagNo": {
"type": "string",
"description": "Indicates the tag number of the product."
},
"batchNo": {
"type": "string",
"description": "Indicates the batch number of the product."
},
"lotNo": {
"type": "string",
"description": "Indicates the lot number of the product."
},
"manufacturedDate": {
"type": "string",
"format": "date-time",
"description": "Indicates the manufacturing date of the product. Date format - yyyy-MM-ddTHH:mm:ss.SSSZ"
},
"variance": {
"type": "integer",
"description": ""
},
"newSerialsFound": {
"type": "array",
"description": "List of new serial numbers found during count execution.",
"items": {
"type": "string"
}
},
"serialsMissing": {
"type": "array",
"description": "List of serial numbers found missing during count execution.",
"items": {
"type": "string"
}
}
}
}
}
}
},
"attributes": {
"type": "object",
"description": "Event details.",
"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."
}
}
}
}
}
}
}
}
O JSON de amostra a seguir ilustra o evento publicado para contagem física quando o cálculo de variação é configurado no nível do produto. Sterling Store Engagement codifica e inclui os dados do evento no caminho JSON messages[].data .
{
"messages": [
{
"data": {
"locationId": "L1",
"productId": "P1",
"unitOfMeasure": "EACH",
"status": "COMPLETED",
"performedByUserId": "John",
"countRequestId": "23dd9d76-e059-4d95-910d-d517f1437d9e",
"hasDiscrepancy": true,
"varianceStatus": "APPROVED",
"varianceReason": "Extra_Items_Found",
"varianceAttributes": [
{
"productClass": "NEW",
"inventoryStatus": "GOOD",
"segment": "PURPOSE",
"segmentType": "VENDOR_FULFILLMENT",
"tagNo": "Tag01",
"batchNo": "Batch01",
"lotNo": "Lot01",
"manufacturedDate": "2019-05-07T09:12:31.465Z",
"variance": 2,
"newSerialsFound": [
"Serial1"
],
"serialsMissing": []
}
]
},
"attributes": {
"eventCode": "varianceApproved",
"timestamp": "2019-05-07T02:00:00+00:00",
"messageId": "3cacb233-de1b-47f9-97a6-4486488f3201"
}
}
]
}
A amostra a seguir ilustra a especificação de esquema JSON para contagem física quando o cálculo de variação é configurado no nível do produto, que define a estrutura de dados JSON publicados no evento varianceApproved .
{
"title": "Variance Approved event message",
"type": "object",
"description": "Indicates the message payload published for Variance Approved event.",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"description": "Indicates the event data published in the message.",
"properties": {
"data": {
"type": "object",
"description": "Count task details.",
"properties": {
"locationId": {
"type": "string",
"description": "The location identifier."
},
"productId": {
"type": "string",
"description": "The product identifier."
},
"unitOfMeasure": {
"type": "string",
"description": "Indicates the unit of measure for the product."
},
"status": {
"type": "string",
"description": "Status of the count task."
},
"performedByUserId": {
"type": "string",
"description": "User Id who has performed approve-variance operation."
},
"countRequestId": {
"type": "string",
"format": "uuid",
"description": "The count request identifier."
},
"hasDiscrepancy": {
"type": "boolean",
"description": "Indicates whether any discrepancy was found during count execution."
},
"varianceStatus": {
"type": "string",
"description": ""
},
"varianceReason": {
"type": "string",
"description": ""
},
"varianceAttributes": {
"type": "array",
"items": {
"type": "object",
"description": "Variance attribute details.",
"properties": {
"productClass": {
"type": "string",
"description": "Indicates the class of product."
},
"inventoryStatus": {
"type": "string",
"description": "Indicates the status of inventory for the product."
},
"segment": {
"type": "string",
"description": "Indicates the segment of the product."
},
"segmentType": {
"type": "string",
"description": "Indicates the segment type of the product."
},
"tagNo": {
"type": "string",
"description": "Indicates the tag number of the product."
},
"batchNo": {
"type": "string",
"description": "Indicates the batch number of the product."
},
"lotNo": {
"type": "string",
"description": "Indicates the lot number of the product."
},
"manufacturedDate": {
"type": "string",
"format": "date-time",
"description": "Indicates the manufacturing date of the product. Date format - yyyy-MM-ddTHH:mm:ss.SSSZ"
},
"variance": {
"type": "integer",
"description": ""
},
"newSerialsFound": {
"type": "array",
"description": "List of new serial numbers found during count execution.",
"items": {
"type": "string"
}
},
"serialsMissing": {
"type": "array",
"description": "List of serial numbers found missing during count execution.",
"items": {
"type": "string"
}
}
}
}
}
}
},
"attributes": {
"type": "object",
"description": "Event details.",
"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 Variação Rejeitada
Quando você aprova a variação no Store Inventory Management, o Sterling Store Engagement aciona o evento Variance Rejected . O código para esse evento é varianceRejected
O JSON de amostra a seguir ilustra o evento publicado para contagem de ciclos, contagem manual e contagem física quando o cálculo de variância é definido no nível da tarefa Sterling Store Engagement codifica e inclui os dados do evento no caminho JSON messages[].data .
{
"messages": [
{
"data": {
"countTaskId": "2220d7a2-8669-41a6-a27e-a86874c982bb",
"locationId": "L1",
"productId": "P1",
"unitOfMeasure": "EACH",
"status": "COMPLETED",
"performedByUserId": "John",
"countRequestId": "23dd9d76-e059-4d95-910d-d517f1437d9e",
"originalTaskId": "2220d7a2-8669-41a6-a27e-a86874c982ba",
"hasDiscrepancy": true,
"actualExecutionDate": "2019-05-07T13:59:59Z",
"serialScanningRequired": false,
"varianceStatus": "REJECTED",
"varianceReason": "Extra_Items_Found",
"varianceAttributes": [
{
"productClass": "NEW",
"inventoryStatus": "GOOD",
"segment": "PURPOSE",
"segmentType": "VENDOR_FULFILLMENT",
"tagNo": "Tag01",
"batchNo": "Batch01",
"lotNo": "Lot01",
"manufacturedDate": "2019-05-07T09:12:31.465Z",
"variance": 2,
"newSerialsFound": [
"Serial1"
],
"serialsMissing": []
}
]
},
"attributes": {
"eventCode": "varianceRejected",
"timestamp": "2019-05-07T02:00:00+00:00",
"messageId": "3cacb233-de1b-47f9-97a6-4486488f3201"
}
}
]
}
A amostra a seguir ilustra a especificação de esquema JSON para contagem de ciclo, contagem manual e contagem física quando o cálculo de variância é configurado no nível de tarefa, que define a estrutura de dados JSON publicados para o evento varianceRejected
{
"title": "Variance Rejected event message",
"type": "object",
"description": "Indicates the message payload published for Variance Rejected event.",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"description": "Indicates the event data published in the message.",
"properties": {
"data": {
"type": "object",
"description": "Count task details.",
"properties": {
"countTaskId": {
"type": "string",
"format": "uuid",
"description": "The count task identifier."
},
"locationId": {
"type": "string",
"description": "The location identifier."
},
"productId": {
"type": "string",
"description": "The product identifier."
},
"unitOfMeasure": {
"type": "string",
"description": "Indicates the unit of measure for the product."
},
"status": {
"type": "string",
"description": "Status of the count task."
},
"performedByUserId": {
"type": "string",
"description": "User Id who has performed reject-variance operation."
},
"countRequestId": {
"type": "string",
"format": "uuid",
"description": "The count request identifier."
},
"originalTaskId": {
"type": "string",
"format": "uuid",
"description": "The count task identifier."
},
"hasDiscrepancy": {
"type": "boolean",
"description": "Indicates whether any discrepancy was found during count execution."
},
"actualExecutionDate": {
"type": "string",
"format": "date-time",
"description": "Indicates the execution time of the count task."
},
"varianceStatus": {
"type": "string",
"description": ""
},
"varianceReason": {
"type": "string",
"description": ""
},
"varianceAttributes": {
"type": "array",
"items": {
"type": "object",
"description": "Variance attribute details.",
"properties": {
"productClass": {
"type": "string",
"description": "Indicates the class of product."
},
"inventoryStatus": {
"type": "string",
"description": "Indicates the status of inventory for the product."
},
"segment": {
"type": "string",
"description": "Indicates the segment of the product."
},
"segmentType": {
"type": "string",
"description": "Indicates the segment type of the product."
},
"tagNo": {
"type": "string",
"description": "Indicates the tag number of the product."
},
"batchNo": {
"type": "string",
"description": "Indicates the batch number of the product."
},
"lotNo": {
"type": "string",
"description": "Indicates the lot number of the product."
},
"manufacturedDate": {
"type": "string",
"format": "date-time",
"description": "Indicates the manufacturing date of the product. Date format - yyyy-MM-ddTHH:mm:ss.SSSZ"
},
"variance": {
"type": "integer",
"description": ""
},
"newSerialsFound": {
"type": "array",
"description": "List of new serial numbers found during count execution.",
"items": {
"type": "string"
}
},
"serialsMissing": {
"type": "array",
"description": "List of serial numbers found missing during count execution.",
"items": {
"type": "string"
}
}
}
}
}
}
},
"attributes": {
"type": "object",
"description": "Event details.",
"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."
}
}
}
}
}
}
}
}
O JSON de amostra a seguir ilustra o evento publicado para contagem física quando o cálculo de variação é configurado no nível do produto. Sterling Store Engagement codifica e inclui os dados do evento no caminho JSON messages[].data .
{
"messages": [
{
"data": {
"locationId": "L1",
"productId": "P1",
"unitOfMeasure": "EACH",
"status": "COMPLETED",
"performedByUserId": "John",
"countRequestId": "23dd9d76-e059-4d95-910d-d517f1437d9e",
"hasDiscrepancy": true,
"varianceStatus": "REJECTED",
"varianceReason": "Extra_Items_Found",
"varianceAttributes": [
{
"productClass": "NEW",
"inventoryStatus": "GOOD",
"segment": "PURPOSE",
"segmentType": "VENDOR_FULFILLMENT",
"tagNo": "Tag01",
"batchNo": "Batch01",
"lotNo": "Lot01",
"manufacturedDate": "2019-05-07T09:12:31.465Z",
"variance": 2,
"newSerialsFound": [
"Serial1"
],
"serialsMissing": []
}
]
},
"attributes": {
"eventCode": "varianceRejected",
"timestamp": "2019-05-07T02:00:00+00:00",
"messageId": "3cacb233-de1b-47f9-97a6-4486488f3201"
}
}
]
}
A amostra a seguir ilustra a especificação de esquema JSON para contagem física quando o cálculo de variação é configurado no nível do produto, que define a estrutura de dados JSON publicados no evento varianceRejected .
{
"title": "Variance Rejected event message",
"type": "object",
"description": "Indicates the message payload published for Variance Rejected event.",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"description": "Indicates the event data published in the message.",
"properties": {
"data": {
"type": "object",
"description": "Count task details.",
"properties": {
"locationId": {
"type": "string",
"description": "The location identifier."
},
"productId": {
"type": "string",
"description": "The product identifier."
},
"unitOfMeasure": {
"type": "string",
"description": "Indicates the unit of measure for the product."
},
"status": {
"type": "string",
"description": "Status of the count task."
},
"performedByUserId": {
"type": "string",
"description": "User Id who has performed reject-variance operation."
},
"countRequestId": {
"type": "string",
"format": "uuid",
"description": "The count request identifier."
},
"hasDiscrepancy": {
"type": "boolean",
"description": "Indicates whether any discrepancy was found during count execution."
},
"varianceStatus": {
"type": "string",
"description": ""
},
"varianceReason": {
"type": "string",
"description": ""
},
"varianceAttributes": {
"type": "array",
"items": {
"type": "object",
"description": "Variance attribute details.",
"properties": {
"productClass": {
"type": "string",
"description": "Indicates the class of product."
},
"inventoryStatus": {
"type": "string",
"description": "Indicates the status of inventory for the product."
},
"segment": {
"type": "string",
"description": "Indicates the segment of the product."
},
"segmentType": {
"type": "string",
"description": "Indicates the segment type of the product."
},
"tagNo": {
"type": "string",
"description": "Indicates the tag number of the product."
},
"batchNo": {
"type": "string",
"description": "Indicates the batch number of the product."
},
"lotNo": {
"type": "string",
"description": "Indicates the lot number of the product."
},
"manufacturedDate": {
"type": "string",
"format": "date-time",
"description": "Indicates the manufacturing date of the product. Date format - yyyy-MM-ddTHH:mm:ss.SSSZ"
},
"variance": {
"type": "integer",
"description": ""
},
"newSerialsFound": {
"type": "array",
"description": "List of new serial numbers found during count execution.",
"items": {
"type": "string"
}
},
"serialsMissing": {
"type": "array",
"description": "List of serial numbers found missing during count execution.",
"items": {
"type": "string"
}
}
}
}
}
}
},
"attributes": {
"type": "object",
"description": "Event details.",
"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."
}
}
}
}
}
}
}
}