Ir para o conteúdo

Pedido de Venda

O Pedido de venda será enviado sempre que um item do pedido for criado ou excluído.

Obs: Para que seja possível realizar o envio, é necessário que no Insight o tipo do pedido enviado possua a linha STD vinculada. Ex:

Dados de Pedido de Venda

  • Endpoint: api/focco/v1/salesorders
  • Exemplo de Payload:
<root>
    <Identity DocumentType="SalesOrder" Version="13.0.0"/>
    <SalesOrders>
        <SalesOrder OrderDate="2023-04-04" RequestDate="2023-04-04" OrderTypeCode="Normal" CarrierCode="3" OrderNo="PDV442" CurrencyCode="BRL" ExchangeRate="1.000000" MarketCode="World" NetPrice="1.0000" NetPriceBase="0.0000" PaymentTermsCode="Net 30" PlantCode="PLA1" TaxCode="NOTAX">
            <Organization OrganizationCode="C2">
                <Address Type="FAT" LocationCode="1" LocationName="BIGFER IND COM DE FERR LTDA" Address1="RUA PAPA JOAO XXIII, 675" City="FARROUPILHA" State="RS" Zip="95180280" IsDefault="1" Effective="2008-09-30" CarrierCode="S3" Country="BR" Inactive="2079-06-06" Language="Brazilian" NotificationRequired="0" ShipmentModeCode="FT" TaxCode="US - States"/>
                <Address Type="ENT" LocationCode="1" LocationName="BIGFER IND COM DE FERR LTDA" Address1="RUA PAPA JOAO XXIII, 675" City="FARROUPILHA" State="RS" Zip="95180280" IsDefault="1" Effective="2008-09-30" CarrierCode="S3" Country="BR" Inactive="2079-06-06" Language="Brazilian" NotificationRequired="0" ShipmentModeCode="FT" TaxCode="US - States"/>
            </Organization>
            <SalesOrderLine LineNo="1" Description="CANETA INDUSTRIAL C/ ESTR" OrderIDForeign="11199911" LineNoForeign="123233" SalesOrderLineTypeCode="STD" SystemCode="PromobDesign">
                <Product NetPrice="5" Qty="10" ProductUOMCode="UNIDAD" CatalogCode="FoccoERP" CatalogVersionNo="1" ProductCode="PROD_FOCCOERP" ProductVersionNo="1"/>
            </SalesOrderLine>
        </SalesOrder>
    </SalesOrders>
</root>

Atributos padrão do Pedido de Venda no Cadastro de Respostas Padrão para Integrações via XML (FIST0100)

Tag Atributo Resposta
root/Identity DocumentType SalesOrder
root/Identity Version 13.0.0
root/SalesOrders/SalesOrder CurrencyCode BRL
root/SalesOrders/SalesOrder MarketCode World
root/SalesOrders/SalesOrder NetPrice 1.0000
root/SalesOrders/SalesOrder NetPriceBase 0.0000
root/SalesOrders/SalesOrder PaymentTermsCode Net 30
root/SalesOrders/SalesOrder PlantCode PLA1
root/SalesOrders/SalesOrder TaxCode NOTAX
root/SalesOrders/SalesOrder/Attribute AttributeCode FOCCO_BAIRRO_CONS_FINAL
root/SalesOrders/SalesOrder/Attribute Value SELECT consumidor.bairro FROM tpdv_con_fin consumidor JOIN tpedidos_venda pdv ON (consumidor.pdv_id = pdv.id) WHERE pdv.id = \root/SalesOrders/SalesOrder/@PedidoVendaID
root/SalesOrders/SalesOrder/Attribute AttributeCode FOCCO_CEP_CONS_FINAL
root/SalesOrders/SalesOrder/Attribute Value SELECT consumidor.cep FROM tpdv_con_fin consumidor JOIN tpedidos_venda pdv ON (consumidor.pdv_id = pdv.id) WHERE pdv.id = \root/SalesOrders/SalesOrder/@PedidoVendaID
root/SalesOrders/SalesOrder/Attribute AttributeCode FOCCO_CIDADE_CONS_FINAL
root/SalesOrders/SalesOrder/Attribute Value SELECT consumidor.cidade FROM tpdv_con_fin consumidor JOIN tpedidos_venda pdv ON (consumidor.pdv_id = pdv.id) WHERE pdv.id = \root/SalesOrders/SalesOrder/@PedidoVendaID
root/SalesOrders/SalesOrder/Attribute AttributeCode FOCCO_COMPL_CONS_FINAL
root/SalesOrders/SalesOrder/Attribute Value SELECT consumidor.complemento FROM tpdv_con_fin consumidor JOIN tpedidos_venda pdv ON (consumidor.pdv_id = pdv.id) WHERE pdv.id = \root/SalesOrders/SalesOrder/@PedidoVendaID
root/SalesOrders/SalesOrder/Attribute AttributeCode FOCCO_CPF_CNJP_CONS_FINAL
root/SalesOrders/SalesOrder/Attribute Value SELECT consumidor.cpf_cnpj <FROM tpdv_con_fin consumidor JOIN tpedidos_venda pdv ON (consumidor.pdv_id = pdv.id) WHERE pdv.id = \root/SalesOrders/SalesOrder/@PedidoVendaID
root/SalesOrders/SalesOrder/Attribute AttributeCode FOCCO_INSC_EST_CONS_FINAL
root/SalesOrders/SalesOrder/Attribute Value SELECT consumidor.insc_est FROM tpdv_con_fin consumidor JOIN tpedidos_venda pdv ON (consumidor.pdv_id = pdv.id) WHERE pdv.id = \root/SalesOrders/SalesOrder/@PedidoVendaID
root/SalesOrders/SalesOrder/Attribute AttributeCode FOCCO_LOGRAD_CONS_FINAL
root/SalesOrders/SalesOrder/Attribute Value SELECT consumidor.logradouro FROM tpdv_con_fin consumidor JOIN tpedidos_venda pdv ON (consumidor.pdv_id = pdv.id) WHERE pdv.id = \root/SalesOrders/SalesOrder/@PedidoVendaID
root/SalesOrders/SalesOrder/Attribute AttributeCode FOCCO_NOME_CONS_FINAL
root/SalesOrders/SalesOrder/Attribute Value SELECT consumidor.nome FROM tpdv_con_fin consumidor JOIN tpedidos_venda pdv ON (consumidor.pdv_id = pdv.id) WHERE pdv.id = \root/SalesOrders/SalesOrder/@PedidoVendaID
root/SalesOrders/SalesOrder/Attribute AttributeCode FOCCO_NR_ENDER_CONS_FINAL
root/SalesOrders/SalesOrder/Attribute Value
SELECT consumidor.nr_endereco FROM tpdv_con_fin consumidor JOIN tpedidos_venda pdv ON (consumidor.pdv_id = pdv.id) WHERE pdv.id = \root/SalesOrders/SalesOrder/@PedidoVendaID
root/SalesOrders/SalesOrder/Attribute AttributeCode FOCCO_OBS_CONS_FINAL
root/SalesOrders/SalesOrder/Attribute Value SELECT consumidor.obs FROM tpdv_con_fin consumidor JOIN tpedidos_venda pdv ON (consumidor.pdv_id = pdv.id) WHERE pdv.id = \root/SalesOrders/SalesOrder/@PedidoVendaID
root/SalesOrders/SalesOrder/Attribute AttributeCode FOCCO_PAIS_CONS_FINAL
root/SalesOrders/SalesOrder/Attribute Value SELECT consumidor.pais FROM tpdv_con_fin consumidor JOIN tpedidos_venda pdv ON (consumidor.pdv_id = pdv.id) WHERE pdv.id = \root/SalesOrders/SalesOrder/@PedidoVendaID
root/SalesOrders/SalesOrder/Attribute AttributeCode FOCCO_UF_CONS_FINAL
root/SalesOrders/SalesOrder/Attribute Value SELECT consumidor.uf FROM tpdv_con_fin consumidor JOIN tpedidos_venda pdv ON (consumidor.pdv_id = pdv.id) WHERE pdv.id = \root/SalesOrders/SalesOrder/@PedidoVendaID
root/SalesOrders/SalesOrder/Organization/Address Country BR
root/SalesOrders/SalesOrder/Organization/Address Inactive 2079-06-06
root/SalesOrders/SalesOrder/Orga