
Configuring Mercos as a Source
In the Sources tab, click on the “Add source” button located on the top right of your screen. Then, select the Mercos option from the list of connectors. Click Next and you’ll be prompted to add your access.1. Add account access
You’ll need to provide the following credentials to connect to Mercos:- Company Token: The company token to authenticate against the API service. It can be found on
Minha Conta
->Sistema
->Integração
->Seu Company Token para integração
. - Start Date: The earliest record date to sync (records created or updated after this date will be extracted).
2. Select streams
Choose which data streams you want to sync - you can select all streams or pick specific ones that matter most to you.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.For you to be able to see it on your Catalog, you need at least one successful source run.
Streams and Fields
Below you’ll find all available data streams from Mercos and their corresponding fields:Clients
Clients
Stream for managing customer information.Primary key:
id
Replication key: ultima_alteracao
bairro
- Neighborhoodbloqueado
- Whether the client is blockedbloqueado_b2b
- Whether blocked in B2Bcep
- Postal codecidade
- Citycnpj
- Company registration numbercomplemento
- Address complementcontatos
- Contact information containing:cargo
- Position/roleemails
- List of email addressesexcluido
- Whether deletedid
- Contact IDnome
- Contact nametelefones
- List of phone numbers
emails
- List of email addressesestado
- Stateexcluido
- Whether the client is deletedextras
- Extra information containing:campo_extra_id
- Extra field IDnome
- Field namenome_arquivo
- File nametipo
- Field typevalor
- Field valuevalor_arquivo
- File valuevalor_data
- Date valuevalor_decimal
- Decimal valuevalor_texto
- Text value
id
- The client’s system IDinscricao_estadual
- State registration numbernome_fantasia
- Company trade namenumero
- Street numberobservacao
- Additional observationsrazao_social
- Company legal namerua
- Street addresssuframa
- SUFRAMA registration numbertelefones
- List of phone numberstipo
- Client typeultima_alteracao
- Last modification timestamp
Orders
Orders
Stream for managing sales orders.Primary key:
id
Replication key: ultima_alteracao
cliente_id
- Client IDcondicao_pagamento
- Payment termscondicao_pagamento_id
- Payment terms IDcriador_id
- Creator IDcupom_de_desconto
- Discount coupon codedata_criacao
- Creation datedata_emissao
- Issue dateendereco_entrega
- Delivery address containing:bairro
- Neighborhoodcep
- Postal codecidade
- Citycomplemento
- Address complementendereco
- Street addressestado
- Stateid
- Address IDnumero
- Street number
extras
- Extra fields containing:campo_extra_id
- Extra field IDnome
- Field namenome_arquivo
- File nametipo
- Field typevalor
- Field valuevalor_arquivo
- File valuevalor_data
- Date valuevalor_decimal
- Decimal valuevalor_texto
- Text value
forma_pagamento_id
- Payment method IDid
- Order IDitens
- Order items containing:cotacao_moeda
- Currency quotedesconto_de_cupom
- Coupon discountdescontos_de_politicas
- Policy discounts (regra_id, desconto)descontos_de_promocoes
- Promotional discounts (regra_id, desconto)descontos_do_vendedor
- Seller discountsexcluido
- Whether deletedid
- Item IDipi
- IPI tax valueobservacoes
- Item observationspreco_liquido
- Net pricepreco_tabela
- List priceproduto_id
- Product IDquantidade
- Quantityst
- ST tax valuesubtotal
- Subtotaltabela_preco_id
- Price table IDtipo_ipi
- IPI tax type
nome_contato
- Contact namenumero
- Order numberobservacoes
- Order observationsstatus
- Order statusstatus_b2b
- B2B statusstatus_faturamento
- Billing statustipo_pedido_id
- Order type IDtotal
- Order total amounttransportadora_id
- Shipping company IDtransportadora_nome
- Shipping company nameultima_alteracao
- Last modification date
Products
Products
Stream for managing product catalog.Primary key:
id
Replication key: ultima_alteracao
altura
- Heightativo
- Whether the product is activecodigo
- Product codecomissao
- Commission percentagecomprimento
- Lengthexcluido
- Whether the product is deletedexibir_no_b2b
- Whether to display in B2Bid
- The product’s system IDipi
- IPI tax valuelargura
- Widthmoeda
- Currency codemultiplo
- Multiple quantity for ordersnome
- The product’s nameobservacoes
- Product observations and detailspeso_bruto
- Gross weightpeso_dimensoes_unitario
- Unit weight dimensionspreco_minimo
- Minimum pricepreco_tabela
- List priceprecos_especificos
- Whether has specific pricessaldo_estoque
- Stock balancest
- ST tax valuetipo_ipi
- IPI tax typeultima_alteracao
- Last modification timestampunidade
- Unit of measurement