Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.
Comentário: Migration of unmigrated content due to installation of a new plugin


Objetivo

Venda realizada através do pedido de venda do Tipo Entrega.

Os Pedidos de Venda serão incluídos no Ecommerce - CIASHOP, do Tipo Entrega e enviada a mensagem de ItemReserve, gerando a reserva dos itens/produtos no sistema Protheus.

Os pedidos serãorealizados no manager do lojista, e enviada a mensagem de Retailsales, gerando uma Venda Assistida com Cupom Fiscal no sistema Protheus através de comunicação de Mensagem Única. 

Após o recebimento desta mensagem, será realizada no sistema Protheus o processo de explosão da venda para geração do  BackOfficce, chamado de GravaBatch, nesse momento, a venda será finalizada e estoque atualizado.


Procedimento para Utilização

Pré-requisitos:

 Importante!

Todas as integrações que utilizam mensagem única como meio de comunicação, será passível de consulta via rotina de monitoramento das mensagens trocas, bem assim como o seu resultado de integração.
     
1.  No Configurador (SIGACFG) acesse  Ambiente / Cadastros / Schedule. 
2. Clique na opção EAI. 
3. Localize o código da função = RETAILSALES 
 4. Clique na lupa  e selecione  a opção : Visualizar mensagem original.



Legendas:

           Status das mensagens no EAI Protheus

           Atualmente, existem 7 status disponíveis para uma mensagem na fila do EAI Protheus:

Aguardando execução - A mensagem está na fila do EAI e ainda não começou a execução (o seu envio ou o seu processamento pelo adapter);

Executando - A mensagem está sendo enviada para o sistema integrado ou a mensagem recebida está sendo processada;

Finalizada - A mensagem foi processada sem erros ou foi enviada sem erros;

Falhou - Houve um erro no envio da mensagem ou no seu recebimento;

Bloqueado - A mensagem foi bloqueada para execução pelo usuário;

Não entregue - A mensagem não foi enviada para o destino (ou ainda, ocorreu um erro por time-out e não foi possível definir se a mensagem foi recebida e processada);

Recusada - A mensagem foi recusada por conter divergências entre a mensagem e o seu XSD.

Realizar Pedido No ECommerce-CIASHOP

     

1.  Informar o Pedido de Venda no Manager Lojista

2. Finalizar o pedido de venda.

3 . Após a finalização da venda é enviado o JSON da mensagem ITEMRESERVE e RETAILSALES.

Verificar a Reserva integrada no Protheus:

Envio da mensagem via EAI:


JSON - ITEMRESERVE

{

"Header": {

"Version": "1.000",

"CompanyId": "T3",

"BranchId": "1",

"BusinessUnit": "MG ",

"GeneratedOn": "2019-01-07T17:11:47Z",

"Enterprise": "D ",

"ProductVersion": "12",

"SourceApplication": "CIASHOP",

"ProductName": "CIASHOP",

"Transaction": "ITEMRESERVE",

"StandardVersion": "1.000",

"UUID": "itemreserve-999999-item-reserve-0030",

"SubType": "event",

"Type": "BusinessMessage",

"DeliveryType": "Async"

},

"Content": {

"CompanyId": "T3",

"BranchId": "1",

"Event": "upsert",

"InternalId": "900030",

"DocumentReserve": "900030",

"ReserveType": "LJ",

"Requester": "ARTUR",

"RequestBranch": "1",

"ReserveItemType": {

"Item": [{

"ItemCode": "LJTEST01",

"WarehouseCode": "",

"WarehouseInternalId": "",

"Quantity": 1,

"ReserveExpiration": "2019-01-27T12:00:00",

"IssueDateReserve": "2019-01-07T12:00:00",

"LotNumber": "",

"SubLotNumber": "",

"SeriesItem": "",

"AddressingItem": "",

"NoteReserveItem": "PEDIDO DE INTEGRACAO ARTUR 900030",

"ReserveBranch": "1",

"ItemDeliveryType": "1",

"IsCanceled": "F"}

]


}


}

}




Controle de Reservas integrada o módulo – Faturamento:



RETAILSALES:


Verificar a mensagem enviada via EAI:


Verificando a mensagem RETAILSALES, Foram alimentadas as TAGs:

 "FinancialDocumentCode" : "8888888888" e "FinancialDocumentCode" : "9999999999", referentes ao número de IDCNAB, para baixa via Comunicação Bancária

"ItemReserveInternalId":"900030" – para usar a reserva gerada.


{

                                                                     "Header": {

                                                                              "Version": "2.000",

                                                                              "CompanyId": "T3",

                                                                              "BranchId": "1",

                                                                              "BusinessUnit": "MG ",

                                                                              "GeneratedOn": "2019-01-08T10:11:47Z",

                                                                              "Enterprise": "D ",

                                                                              "ProductVersion": "12",

                                                                              "SourceApplication": "CIASHOP_QA",

                                                                              "ProductName": "CIASHOP",

                                                                              "Transaction": "RETAILSALES",

                                                                              "StandardVersion": "1.000",

                                                                              "UUID": "retailsales-0000-teste-IDCNAB-90030",

                                                                              "SubType": "event",

                                                                              "Type": "BusinessMessage",

                                                                              "DeliveryType": "Async"

                                                                     },

                                                                     "Content": {

                                                                              "Event": "upsert",

                                                                              "CompanyId": "T3",

                                                                              "BranchId": "1",

                                                                              "InternalId": "990030",

                                                                              "DocumentCode": "990030",

                                                                              "CustomerVendorInternalId": "T3|1|13941464|999|C",

                                                                              "TotalPrice": 160.00,

                                                                              "DiscountValue": "0,00",

                                                                              "IncreaseValue": "0",

                                                                              "NetPrice": "160,00",

                                                                              "IssueDateDocument": "2019-01-08T10:00:00",

                                                                              "SerieCode": "U15",

                                                                              "GrossPrice": 160.00,

                                                                              "CommodityPrice": "160,00",

                                                                              "OperatorCode": "",

                                                                              "OperatorInternalId": "AUTOMATICO",

                                                                              "StationCode": "",

                                                                              "StationSalePointCode": "",

                                                                              "StationSalePointInternalId": "AUTOMATICO",

                                                                              "Change": "0",

                                                                              "KindOfDocument": "CF",

                                                                              "IsCanceled": false,

                                                                              "KeyAcessNFe": "",

                                                                              "ListOfSaleItem": {

                                                                                              "SaleItem": [{

                                                                                                              "ItemCode": "LJTEST01",

                                                                                                              "ItemOrder": "1",

                                                                                                              "Quantity": "1",

                                                                                                              "UnitPrice": "16,0000",

                                                                                                              "ItemPrice": "160,00",

                                                                                                              "DiscountAmount": "0,00000",

                                                                                                              "OperationCode": "501",

                                                                                                              "IsCanceled": false,

                                                                                                              "ItemDeliveryType":"3",

                                                                                                              "ItemDeliveryTDate":"2019-01-08T10:00:00",

                                                                                                              "ItemReserveInternalId":"900030" ,

                                                                                                              "ListOfTaxes": {

                                                                                                                             "Tax": [{

                                                                                                                                             "Taxe": "ICM",

                                                                                                                                             "CalculationBasis": "160,00",

                                                                                                                                             "Percentage": "18,00",

                                                                                                                                             "Value": "28,80"

                                                                                                                             },

                                                                                                                             {

                                                                                                                                             "Taxe": "ICMS_ST",

                                                                                                                                             "CalculationBasis": "",

                                                                                                                                             "Percentage": "0,0000",

                                                                                                                                             "Value": ""

                                                                                                                             },

                                                                                                                             {

                                                                                                                                             "Taxe": "PIS",

                                                                                                                                             "CalculationBasis": "160,00",

                                                                                                                                             "Percentage": "4,00",

                                                                                                                                             "Value": "3,0000"

                                                                                                                             },

                                                                                                                             {

                                                                                                                                             "Taxe": "COFINS",

                                                                                                                                             "CalculationBasis": "160,00",

                                                                                                                                             "Percentage": "4,00",

                                                                                                                                             "Value": "3,0000"

                                                                                                                             },

                                                                                                                             {

                                                                                                                                             "Taxe": "PIS/COFINS/CSLL",

                                                                                                                                             "CalculationBasis": "160,00",

                                                                                                                                             "Percentage": "",

                                                                                                                                             "Value": ""

                                                                                                                             },

                                                                                                                             {

                                                                                                                                             "Taxe": "ISS",

                                                                                                                                             "CalculationBasis": "",

                                                                                                                                             "Percentage": "0,0000",

                                                                                                                                             "Value": "0,0000"

                                                                                                                             },

                                                                                                                             {

                                                                                                                                             "Taxe": "IPI",

                                                                                                                                             "CalculationBasis": "160,00",

                                                                                                                                             "Percentage": "0,000000",

                                                                                                                                             "Value": "0,00"

                                                                                                                             }]

                                                                                                              }

                                                                                              }]

                                                                              },

                                                                              "ListOfSaleCondition": {

                                                                                              "SaleCondition": [{

                                                                                                              "DateOfPayment": "2019-01-08T10:00:00",

                                                                                                              "PaymentValue": "80,00",

                                                                                                              "PaymentMethodCode": "BOL",

                                                                                                              "FinancialManagerCode": "XVS",

                                                                                                              "EftDate": "2019-01-07T00:00:00",

                                                                                                              "EftAutorization": "123456",

                                                                                                              "EftInstitute": "111111",

                                                                                                              "UniqueSerialNumber": "123456",

                                                                                                              "EftDocument": "003116",

                                                                                                              "FinancialDocumentCode" : "8888888888"

                                                                                              },

                                                                                              {

                                                                                                              "DateOfPayment": "2019-01-08T10:00:00",

                                                                                                              "PaymentValue": "80,00",

                                                                                                              "PaymentMethodCode": "BOL",

                                                                                                              "FinancialManagerCode": "XVS",

                                                                                                              "EftDate": "2019-01-07T00:00:00",

                                                                                                              "EftAutorization": "123456",

                                                                                                              "EftInstitute": "111111",

                                                                                                              "UniqueSerialNumber": "123456",

                                                                                                              "EftDocument": "003116",

                                                                                                              "FinancialDocumentCode" : "9999999999"

                                                                                              }]

                                                                              }

                                                                     }

}


A reserva realizada anteriormente, é deletada:

São realizados os movimentos no Venda Assistida:


É gerado Pedido de Vendas, com o STATUS bloqueado por Crédito:

 


São geradas as parcelas no Contas a Receber - Financeiro

 


Realizada a Baixa manual, ou por Conciliação bancária:



O Pedido é liberado por Crédito: