
Configuring Varejo Online as a Source
In the Sources tab, click on the “Add source” button located on the top right of your screen. Then, select the Varejo Online option from the list of connectors. Click Next and you’ll be prompted to add your access.1. Add account access
You’ll need your Varejo Online API Token for this connection. This token authenticates your requests to the Varejo Online API.Configuration Fields
The following configurations are available:- Token: The authentication token for the Varejo Online API. Contact your Varejo Online account manager or support team to obtain your API token.
- Start Date: The earliest date from which records will be synced. This is used for incremental sync of orders based on the
dataAlteracao(last modified date) field.
2. Select streams
Choose which data streams you want to sync. Varejo Online provides access to your sales order data.Tip: The stream can be found more easily by typing its name.Select the streams and click Next.
3. Configure data streams
Customize how you want your data to appear in your catalog. Select a name for each table (which will contain the fetched data) and the type of sync.- Table name: we suggest a name, but feel free to customize it. You have the option to add a prefix and make this process faster!
-
Sync Type: you can choose between INCREMENTAL and FULL_TABLE.
- Incremental: every time the extraction happens, we’ll get only the new data - which is good if, for example, you want to keep every record ever fetched.
- Full table: every time the extraction happens, we’ll get the current state of the data - which is good if, for example, you don’t want to have deleted data in your catalog.
4. Configure data source
Describe your data source for easy identification within your organization, not exceeding 140 characters. To define your Trigger, consider how often you want data to be extracted from this source. This decision usually depends on how frequently you need the new table data updated (every day, once a week, or only at specific times). Optionally, you can determine when to execute a full sync. This will complement the incremental data extractions, ensuring that your data is completely synchronized with your source every once in a while. Once you are ready, click Next to finalize the setup.5. Check your new source
You can view your new source on the Sources page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.Streams and Fields
Below you’ll find all available data streams from Varejo Online and their corresponding fields:Orders (Pedidos)
Orders (Pedidos)
Stream containing all sales orders from your Varejo Online account. This stream supports incremental sync based on the
dataAlteracao (last modified date) field.Identifiers:id: Order IDidSaida: Linked output IDnumero: Order number generated by the systemnumeroPedidoCliente: Customer’s reference order numberidEntidade: Entity ID of the orderidTerceiroCliente: Third-party customer IDidRepresentante: Representative/salesperson IDidProvisao: Provision ID generated by the orderidCanalDigital: Digital channel ID
data: Order issue datehorario: Order creation time (format: hh:mm:ss)dataAlteracao: Last modification date (format: dd-mm-yyyy hh:mi:ss)
cancelado: Whether the order is cancelledstatusConferencia: Conference status of the orderstatusVenda: Sales statusstatusPedidoVenda: Order status object containing:id: Status IDnome: Status namedescricao: Status descriptiondataAlteracao: Status modification datedataCriacao: Status creation dateativo: Whether status is activedeletado: Whether status is deleted
valorFrete: Shipping valuevalorSeguro: Insurance valuevalorOutros: Other costsvalorTotal: Total order valuevalorLiquido: Net order valuevalorDesconto: Discount valuevalorAcrescimo: Addition/surcharge valuevaleTrocaGerado: Generated exchange voucher value
entidade: Entity data object containing:id: Entity IDnome: Entity namedocumento: Store’s formatted CNPJ
cliente: Customer data object containing:id: Customer IDnome: Customer namedocumento: Customer’s formatted CNPJ/CPF
documentoTerceiro: Third-party document
representante: Salesperson data object containing:id: Salesperson IDnome: Salesperson namedocumento: Salesperson’s formatted CPF
origem: Order origin (e.g., MARKETPLACE)tipo: Order type (NORMAL, SHIP_FROM_STORE, CLICK_COLLECT)sistemaOrigem: Source systemnomeTerminal: Terminal name where order was placedplanoPagamento: Payment planvendaConsumidorFinal: Whether it’s a sale to final consumerdescontoDetalhes: Discount detailsobservacao: Order observation/notes
itens: Array of order items, each containing:id: Item IDidProduto: Product IDquantidade: Quantityoperacao: Item operationdescricao: Item descriptionunidade: Measurement unitvalorTotal: Total item valuevalorDesconto: Item discountvalorAcrescimo: Item surchargevalorDescontoRateado: Prorated discount valuevalorDescontoItem: Specific item discountvalorFreteRateado: Prorated shipping valuevalorCusto: Cost valuedescontoDetalhes: Discount detailsdataEntrega: Delivery datereservarEstoque: Whether to reserve stocktabelaPrecoId: Price table ID- Tax values:
valorICMS,valorICMSItem,valorICMSFrete,valorICMSST,valorIPI,valorPIS,valorCOFINS,valorFCPST produto: Product object withid,descricao,codigoBarras,codigoInterno,codigoSistemarepresentante: Item salesperson objectepcs: Array of Electronic Product Codeslotes: Array of lotsnumerosValesPresentes: Gift voucher numbers used
composicaoPagamento: Payment composition object containing:saidaId: Output ID related to paymentvalorDinheiro: Cash payment valuevalorChequeVista: Check payment (cash)valorChequePrazo: Check payment (term)valorCrediario: Credit plan valuevalorVoucher: Voucher payment valuevalorValePresente: Gift voucher valuevalorTroca: Exchange valuevalorAdiantamento: Advance payment valueidPlanoCrediario: Credit plan IDvaloresCartao: Array of card payments withvalor,nsu,bandeira,tipoCartao,operadora,numeroParcelas,autorizacaovaloresPix: Array of PIX payments withnsu,autorizacao,valorplano: Payment plan object withid,descricao
plano: Payment plan object containing:id: Plan IDdescricao: Plan description
parcelas: Array of installments, each containing:id: Installment IDvalor: Installment valuedataVencimento: Due date
notasFiscais: Array of linked invoices, each containing:status: Invoice statusidNotaFiscal: Invoice IDtipoNotaFiscal: Invoice type (e.g., MERCADORIA)
enderecoEntrega: Delivery address object containing:logradouro: Street namenumero: Street numbercomplemento: Address complementbairro: Neighborhoodcep: Postal code (CEP)cidade: Cityuf: State (UF)receptorEntrega: Recipient namereceptorEntregaDocumento: Recipient document (CPF/CNPJ)
transporte: Transport data object containing:modalidade: Transport modality (e.g., EMITENTE)transportador: Carrier object withid,documentocodigoANTT: ANTT codeplacaVeiculo: Vehicle plateestadoVeiculo: Vehicle registration statequantidade: Number of volumesespecie: Volume type (e.g., CAIXA)marca: Volume brandnumero: Volume numberpesoBruto: Gross weight (kg)pesoLiquido: Net weight (kg)
intermediador: Intermediary object containing:id: Intermediary IDdocumento: Intermediary’s formatted CNPJ
idsOrcamentos: Array of related quote IDsservicos: Array of servicesvaleTrocasUtilizados: Array of exchange vouchers used withvalorUtilizado
Implementation Notes
Data Sync Considerations
-
Incremental Sync: The
Ordersstream supports incremental sync using thedataAlteracao(last modification date) field. This ensures that only orders that have been created or modified since the last sync are extracted. -
Date Formats: Varejo Online uses Brazilian date formats. The
datafield usesdd-mm-yyyyformat, anddataAlteracaousesdd-mm-yyyy hh:mi:ssformat. - Brazilian Tax Fields: Order items include various Brazilian tax fields such as ICMS, ICMS-ST, IPI, PIS, COFINS, and FCP-ST. These are important for fiscal compliance and financial analysis.
Payment Methods
Varejo Online supports multiple payment methods that are captured in thecomposicaoPagamento object:
- Cash (dinheiro)
- Check - cash and term (cheque)
- Credit cards with detailed transaction data (NSU, authorization, flag, operator)
- PIX payments with transaction identifiers
- Vouchers and gift cards
- Store credit (crediário)
- Exchange vouchers (vale troca)
Order Types
Orders can be classified by type:- NORMAL: Standard orders
- SHIP_FROM_STORE: Orders fulfilled from physical store inventory
- CLICK_COLLECT: Buy online, pick up in store orders