Table 16 - Orders
- This article introduces the order integration layout fields. To better understand the concept behind orders, see our article on Order Concept.
- To carry out this integration, you must send the information along with Table 17 - Order Item
- The items for each order will be sent in this table.
| Order | Field Description | Format and Size | Required | Version | Note |
| 1 | Table Identifier (IDENTIFICADOR) | FIXO=16 (2) | Yes | 1.0 | |
| 2 | Request Identifier (ID) | Integer (10) | No | 1.0 | Unique order identifier in the Demander. |
| 3 | Order Number (code) | Integer (10) | Yes | 1.0 | Same as Order Number Order. |
| 4 | Payment Method Code (codFormaPagamento) | Text (20) | No | 1.0 | |
| 5 | Payment Condition Code (codCondicaoPagamento) | Text (20) | No | 1.0 | |
| 6 | Order Status Code (codStatus) | Integer (10) | No | 1.0 | Send status code. |
| 7 | Branch Code (codFilial) | Text (15) | No | 1.0 | |
| 8 | Client Code (codCliente) | Integer (10) | Yes | 1.0 | New clients come with code “0”. |
| 9 | Customer’s CPF or CNPJ (cpfCNPJCliente) | Text (20) | Yes | 1.0 | With mask. |
| 10 | Price List Code (codListaPreco) | Text (20) | Yes | 1.0 | |
| 11 | Seller Code (codVendedor) | Integer (10) | Yes | 1.0 | |
| 12 | Carrier Code (codPortador) | Integer (10) | No | 1.0 | Reserved for use future. |
| 13 | Order Number (numPedido) | Integer (10) | Yes | 1.0 | |
| 14 | Seller Sequence (sequencialVendedor) | Integer (10) | No | 1.0 | Reserved for future use. |
| 15 | Purchase Order Number (numOrdemCompra) | Text (50) | No | 1.0 | |
| 16 | Date and Time of Issuance (dataEmissao) | DateTime | Yes | 1.0 | |
| 17 | Value Products (with unit increase or discount) (valorProdutosComDescAcres) | Decimal (15.2) | No | 1.0 | Sales Value of Products, already with the value of Increase or Discount Granted (Former field valorTotal). |
| 18 | Value of Products (without increase or unit discount) (valorProdutosSemDescAcres) | Decimal (15.2) | No | 1.0 | Value of Products, without the value of the increase or Discount granted. Former field valorBruto. |
| 19 | Quantity of Order Items (qtdeItens) | Integer (10) | No | 1.1 | |
| 20 | Device Identifier (IMEI) | Text (50) | No | 1.0 | IMEI of the device on which the order was issued. |
| 21 | Tax Operation Used in the Order (operacaoFiscal) | Integer (10) | No | 1.0 | Reserved for future use. |
| 22 | Internal Observation (observation) | Text (1000) | No | 1.0 | Internal Company Observation, which does not appear for the Customer (Order PDF). |
| 23 | Free Field 1 (Free Field 1) | Text (45) | No | 1.0 | Reserved for future use. |
| 24 | Free Field 2 (Free Field Free 2) | Text (45) | No | 1.0 | Reserved for future use. |
| 25 | Free Field 3 (Free Field 3) | Text (45) | No | 1.0 | Reserved for future use. |
| 26 | Order Type Code (codTipoPedido) | Integer (10) | Yes | 1.0 | Code of records registered for the company in the ‘Types of Order’. |
| 27 | Delivery Estimate (previsaoEntrega) | DateTime | No | 1.0 | |
| 28 | Issuing Seller Code (codVendedorEmissor) | Integer (10) | No | 1.0 | Note: This field exports the code of the seller who placed the order. This field will be different from the codVendedor field in the following situation: The Sales Manager issues an order to a customer linked to a seller, codVendedorEmissor will be the manager of sales, and codVendedor will be the code of the seller linked to the customer. It will only be mandatory if the company DOES NOT use the number range for orders per seller, which is located in the Company Settings > Sellers Tab |
| 29 | Latitude (latitude) | Text (50) | No | 2.3 | |
| 30 | Longitude (longitude) | Text (50) | No | 2.3 | |
| 31 | Origin of Order (origemPedido) | Integer (4) | No | 2.8 | 1 - Order Issued on Demander (Android, iOS), 2 - Order Issued on ERP, 3 - B2B Store, 4 - Web Order, 5 - Integrated Store, 6 - Free market, 7 - Tray |
| 32 | Shipping Value (valorFrete) | Decimal (15.2) | Yes | 2.11 | |
| 33 | Total Order Value (valorTotalPedido) | Decimal (15.2) | Yes | 2.11 | Total Order Value (Product Value+Shipping Value+IPI+ICMS ST+Interest/Discount by Payment Method). |
| 34 | Shipping Type (tipoFrete) | Integer (2) | No | 2.12.3 | Shipping Type Code. |
| 35 | Total IPI Value (valorIPI) | Decimal (15.2) | Yes | 2.13 | Total Value of IPI (Sum of IPI of each Item) |
| 36 | Total Value of ICMS ST (valorICMS_ST) | Decimal (15.2) | Yes | 2.13 | Total Value of ICMS ST (Sum of ICMS ST Value) |
| 37 | Canceled (cancelled) | Integer (1) | Yes | 2.17 | 1 - Order Cancelled; 0 - Order Not Canceled; (Cancelled orders are not recorded in the Sales/Goals/Commissions Reports, but continue to appear in Demander) |
| 38 | Note to Customer (observacaoCliente) | Text (1000) | Yes | 2.20 | O What is entered in this field appears in the Order PDF Issue that is sent to the Customer. |
| 39 | Discount Type (tipoDesconto) | Text (2) | Yes | 2.21 | “R$” for Discount entered in Value. “%” for Discount Informed in Percentage. |
| 40 | Percentage Discount at Order Level (percentualDescontoDoPedido) | Decimal (15.2) | Yes | 2.21 | This is the Discount value granted at the order level. Order, which was apportioned between the Items. The Discount stated directly on the Items is not included. NOTE: In case of Addition, this information is negative. EX: -10 means 10% increase. |
| 41 | Discount Value at Order Level (valorDescontoDoPedido) | Decimal (15.2) | Yes | 2.21 | This is the Discount value granted at the Order level, and that was apportioned between the Items. The Discount stated directly on the Items is not included |
| 42 | Percentage of Discount/Interest of the Payment Condition (percJurosCondPag) | Decimal (15.2) | Yes | 2.24 | Percentage of Discount/Interest of the Payment Condition at the time of ordering. NOTE: In case of Addition, this information is negative. EX: -10 means 10% increase. |
| 43 | GPS capture information (provider) | Text (50) | No | 2.28 | Field that informs whether the geographic position was captured by GPS or the Internet, what will be sent or received is (network or gps) |
| 44 | Commission Amount (valorTotalComissao) | Decimal (18.2) | No | 2.35 | Total order commission amount calculated by Demander. |
| 45 | Code Carrier Code (codTransportadora) | Text (15) | No | 2.38 | Carrier Code, records in Table 29 |
| 46 | Re-dispatch Carrier Code (codRedespacho) | Text (15) | No | 2.41 | Re-dispatch carrier code, records in Table 29 |
| 47 | UniqueId enderecoEntrega (uniqueidEnderecoEntrega) | Integer (100) | No | 3.0 | Customer Delivery Address Code, Table Record 115 |
| 48 | Segment (codesegment) | Integer (10) | No | 3.0 | Segment code used in the order. |
| 49 | idERP (idERP Delivery Address) | No | |||
| 50 | Used the discount table (usouTabelaDesconto) | Integer (1) | No | 3.0 | If the order used the discount table upon issuance |
| 51 | Discount type code (codTipoDesconto) | Text (255) | No | 3.3 | Field referring to the discount type code used in the order. Type of discount is sent in Table 130 – Type of Discount |
| 52 | Total value of the Additional fee (totalTaxaAdicional) | Decimal (15.2) | No | 3.3 | Total value of the additional fee that will be charged; This value must be equal to the sum of field 31 of the order items. |
| 53 | Amount to be deducted from the commission calculation basis (valorAbaterBCComissao) | Decimal (15.2) | No | 3.4 | Referring to the sum of field 32 - valorAbaterBCComissao from Table 17 – ItemOrder |
| 54 | Main order number (numPedidoOrigem) | Integer (10) | No | 3.5 | If an order is linked to another, this field serves to identify the main order that gave rise to this. |
| 55 | Deprecated | No | This field is deprecated in version 4.46 | Send EMPTY | ||
| 56 | Unique Customer ID in Demander (CustomerId) | Integer | No | 3.5 | |
| 57 | Gross Weight (pesoBruto) | Decimal | No | 3.10 | Total gross order weight |
| 58 | Net Weight (pesoLiquido) | Decimal | No | 3.10 | Total net weight of order |
| 59 | Cubbing (cubbing) | Decimal | No | 3.10 | Total order cubing |
| 60 | UniqueID billing address (uniqueIdEnderecoFaturamento) | Text (100) | No | 3.22 | |
| 61 | UniqueID billing address (uniqueIdEnderecoCobranca) | Text (100) | No | 3.22 | |
| 62 | Integration observations (observacaoIntegracao) | Text | No | 3.24 | |
| 63 | Contribution margin percentage (percMargemContribuicao) | Decimal (8.2) | No | 3.38 | |
| 64 | Replacement cost of sale (custoReposicaoNaVenda) | Decimal (8,2) | No | 3.38 | |
| 65 | Release status code (codStatusLiberacao) | Integer (6) | No | 3.38 | 0 - Blocked 1 - Released 2 - Rejected |
| 66 | Reason why the request is blocked (motivoBloqueio) | Text (255) | No | 3.38 | |
| 67 | Identifier of the user who released the order (idUsuarioAvaliou) | Integer (10) | No | 3.38 | |
| 68 | Reason for releasing the order (motivoAvaliacao) | Text | No | 3.38 | |
| 69 | Highlighted discount amount (descontoDestacado) | Decimal (15.2) | No | 3.46 | |
| 70 | Highlighted discount percentage (percDescontoDestacado) | Decimal | No | 3.54 | Use fieldzed for export only. Currently the field is not imported from the ERP. The highlighted discount percentage is given by the proportion of the highlighted discount value (field 69) over the total value of the order (field 33). NOTE: In case of Addition, this information is negative. EX: -10 means 10% increase. |
| 71 | Percentage discount on discount (percDescontoSobreDesconto) | Decimal | No | 3.54 | Field used to return the percentage of discount on discount entered by the user. NOTE: In In the case of Addition, this information is negative. EX: -10 means 10% increase. |
| 72 | Json of discount or increase (jsonDescontosAcrescimos) | Text | No | See here the structureof the json sent in this field | |
| 73 | Accessory Expenses Value (valorDespesasAcessorias) | Decimal (15.2) | No | 4.37 | Field used to include values related to expenses extras. |
| 74 | Order Number in the ERP (numPedidoERP) | Varchar (50) | No | 4.45 | This field refers to the identifier (Code) that the Order has in the ERP, so that the order can be identified in the Demander from the code it has in the ERP. |
| 75 | ISO Currency Code (codMoeda) | Varchar(3) | No | 4.47 | ISO Currency Code of this order. Example: BRL - REAL USD - DOLLAR |
| 76 | Total Redispatch Value (valorTotalRedespacho) | Decimal (15.2) | No | 4.49 | |
| 77 | Used for export only (codRota) | Integer (10) | No | 4.53 | This field is only exported to the ERP. Must be sent empty to Demander |
| 78 | Sales Division (codDivisaoVenda) | Varchar(30) | No | 5.15 | |
| Note: Items of each order must be exported immediately after the order is placed. |
Registration Example:
16||00026147|2|28|7|1|127779|01.132.478/0030-72|26|89931||00026147|||2020-07-09 13:31:00|211.86|211.86|2|||EXC||||1||89931|||2|0|227.5|1|15.64|0|0| |R$|0|0|||0|0|124540|||1|0||0|0|0||0||