Configuring Tray as a Source
In the Sources tab, click on the “Add source” button located on the top right of your screen. Then, select the Tray option from the list of connectors. Click Next and you’ll be prompted to add your access.1. Add account access
Tray works as a store-authorized application. Before configuring the source, authorize the Tray application on your store: the store owner installs and authorizes the app (itsconsumer_key and consumer_secret are issued by Tray’s partnership team), and the store admin then displays an authorization code. Nekt uses that authorization code to mint and automatically refresh its access tokens, so there is no recurring manual token step.
Keep the
consumer_key, consumer_secret, and code from the same authorized application. The authorization code is consumed to generate the first access token, after which Nekt refreshes tokens automatically.- API Address: The base URL of your store’s Tray Web API, for example
https://yourstore.commercesuite.com.br/web_api. - Consumer Key: The
consumer_keyof the authorized Tray application, issued by Tray’s partnership team. - Consumer Secret: The
consumer_secretof the authorized Tray application, issued by Tray’s partnership team. - Code: The authorization code shown in your store admin after authorizing the Tray application.
- Start Date: (Optional) The earliest date from which records will be synced. Applies to the incremental streams (products, product variants, orders, and customers).
2. Select streams
Choose which data streams you want to sync. For faster extractions, select only the streams that are relevant to your analysis. You can select entire groups of streams or pick specific ones.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 the desired layer where the data will be placed, a folder to organize it inside the layer, a name for each table (which will effectively contain the fetched data) and the type of sync.- Layer: choose between the existing layers on your catalog. This is where you will find your new extracted tables as the extraction runs successfully.
- Folder: a folder can be created inside the selected layer to group all tables being created from this new data source.
- Table name: we suggest a name, but feel free to customize it. You have the option to add a prefix to all tables at once 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 define some additional settings:- Configure Delta Log Retention and determine for how long we should store old states of this table as it gets updated. Read more about this resource here.
- Determine when to execute an Additional Full Sync. This will complement the incremental data extractions, ensuring that your data is completely synchronized with your source every once in a while.
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.Available streams
The table below lists every stream, its slug (the exact identifier to pass when creating the source via API) and a short description.Streams and Fields
Below you’ll find all available data streams from Tray and their corresponding fields.The Tray Web API returns all field values as strings, including numeric, boolean, and date values. Cast them to the appropriate types in your queries when needed. Nested objects and arrays are delivered as JSON-encoded strings.
modified timestamp as the replication key: Products, Product Variants, Orders, and Customers. All other streams are full-table.
Products
Products
Product catalog stream containing every product in your store. Incremental sync using
modified as the replication key.Identifiers:id- Unique product code (primary key)reference- Internal product reference/SKUean- EAN barcode of the productncm- NCM fiscal classification codemodel- Product modelslug- Final segment of the product’s URL
name- Product nametitle- SEO/product titledescription- Full product descriptiondescription_small- Short product descriptionbrand- Brand namebrand_id- Brand codecategory_id- Main category codecategory_name- Main category name (detail only)
price- Sale pricecost_price- Cost pricedollar_cost_price- Cost price in US dollarspromotional_price- Promotional pricecurrent_price- Effective current pricepercentage_discount- Discount percentagestart_promotion- Promotion start dateend_promotion- Promotion end dateipi- IPI tax rateipi_value- IPI tax amountpayment_option- Payment option textpayment_option_html- Payment option HTMLpayment_option_details- Installment/payment detail objects (JSON-encoded)
weight- Weight in gramslength- Length dimensionwidth- Width dimensionheight- Height dimensioncubic_weight- Cubic (dimensional) weightstock- Available stock quantityminimum_stock- Minimum stock levelminimum_stock_alert- Minimum-stock alert flag
available- Availability flag (0/1)available_in_store- Store visibility (inverted enum: 0=available, 1=unavailable)availability- Availability textavailability_days- Days until availabilityavailable_for_purchase- Purchasable flaghot- Featured product flag (0/1)release- New-release flag (0/1)release_date- Launch dateadditional_button- Additional-button flaghas_variation- Whether the product has variants (0/1)has_acceptance_terms- Whether acceptance terms apply (0/1)has_buy_together- Whether buy-together applies (0/1)is_kit- Whether the product is a kit (0/1)virtual_product- Whether the product is virtual (0/1)upon_request- Sold-on-request flagfree_shipping- Free-shipping flag (0/1)promotion_id- Promotion code applied
additional_message- Additional message shown on the productwarranty- Warranty textwarranty_days- Warranty duration in daysrating- Average ratingcount_rating- Number of ratingsquantity_sold- Total units soldincluded_items- Items included with the productacceptance_term_option- Acceptance-term optionacceptance_term- Acceptance termshortcut- URL shortcutvideo- Product video URLmetatag- SEO meta tags (type, content), JSON-encodedurl- Product URLs (http, https), JSON-encoded
related_products- Related product IDsrelated_categories- Additional category IDsall_categories- All associated category IDsProperties- Product characteristics (name: [values])ProductImage- Inline product images (http, https, thumbs)Variant- Inline variant ID stubs ([{id}]); full data in the product_variants streamProductSettings- Product settings (stock-out behavior, lead times)AdditionalInfos- Additional product info fields and their options
activation_date- Activation datedeactivation_date- Deactivation datecreated- Creation timestampmodified- Last-modification timestamp, used as the incremental replication key
Product Variants
Product Variants
Variants (SKUs) of products, including per-variant pricing, stock, and attribute axes. Incremental sync using
modified as the replication key.Key Fields:id- Unique variant code (primary key)product_id- Parent product codereference- Variant internal reference/SKUean- EAN barcode of the variantorder- Display order of the variantavailable- Variant availability flag (0/1)quantity_sold- Units sold of this variant
price- Variant sale pricecost_price- Variant cost pricepromotional_price- Variant promotional pricestart_promotion- Variant promotion start dateend_promotion- Variant promotion end datepayment_option- Variant payment option textpayment_option_details- Installment/payment detail objects (JSON-encoded)
weight- Variant weight in gramscubic_weight- Variant cubic weightlength- Variant length dimensionwidth- Variant width dimensionheight- Variant height dimensionstock- Variant stock quantityminimum_stock- Variant minimum stock level
color_id_1- First color attribute IDcolor_id_2- Second color attribute IDSku- Attribute axes of the variant (type, value, image), JSON-encodedVariationSettings- Variant settings (stock-out behavior, lead times), JSON-encoded
illustrative_image- Variant illustrative image (http, https), JSON-encodedVariantImage- Variant images (http, https, thumbs), JSON-encoded
modified- Last-modification timestamp, used as the incremental replication key
Brands
Brands
Brands registered in your store. Full-table sync.Key Fields:
id- Unique brand code (primary key)brand- Brand nameslug- Final segment of the brand’s URL
Categories
Categories
Category tree used to organize the product catalog. Full-table sync.Key Fields:
id- Unique category code (primary key)parent_id- Parent category code (0 for root)name- Category nameslug- Final segment of the category’s URLorder- Display order of the categorytitle- SEO/category titlesmall_description- Short category descriptionhas_acceptance_term- Whether an acceptance term applies (0/1)acceptance_term- Acceptance term text
link- Category URLs (http, https)Images- Category images (http, https)metatag- SEO meta tags (type, content)
Orders
Orders
Orders placed in your store, including status, financial totals, payment, and shipping information. Incremental sync using
modified as the replication key.Key Fields:id- Unique order code (primary key)status- Current order status labelstatus_id- Current order status codedate- Order date (YYYY-MM-DD)hour- Order time of daycustomer_id- Customer code that placed the ordertotal- Order grand totalpartial_total- Subtotal before shipping/discountstaxes- Total taxes applieddiscount- Total discount appliedinterest- Interest amount chargedcost- Order cost
delivery_date- Delivery datedelivery_time- Estimated delivery timeestimated_delivery_date- Estimated delivery dateshipment- Freight/shipping method nameshipment_value- Shipping costshipment_date- Shipment datedelivered- Delivered flagdelivered_status- Delivery statusshipping_cancelled- Shipping-cancelled flagsending_code- Shipping tracking codesending_date- Date the order was sentis_traceable- Whether the shipment is traceabletracking_url- Shipment tracking URLshipment_integrator- Shipping integrator namehas_shipment- Whether the order has a shipment
payment_method_id- Payment method codepayment_method- Payment method namepayment_method_type- Payment method typepayment_method_rate- Payment method rate/feepayment_form- Payment form labelinstallment- Number of installmentsvalue_1- Auxiliary payment valuepayment_date- Payment confirmation datehas_payment- Whether the order has a paymenthas_invoice- Whether the order has an invoice
point_sale- Point-of-sale channelpartner_id- Partner/marketplace codepartner_name- Partner/marketplace nameexternal_code- External/marketplace order codeapp_id- Originating application codestore_segment- Store segmentclient_ip- Customer IP addresssession_id- Checkout session identifieraccess_code- Order access codedc_id- Distribution center codedc_order_origin- Distribution-center order origin
discount_coupon- Discount coupon code usedcoupon- Coupon detail (code, discount), JSON-encodedprogressive_discount- Progressive discount detail, JSON-encodedshipping_progressive_discount- Progressive shipping discount detail, JSON-encodedcart_additional_values_discount- Cart-level additional discount valuecart_additional_values_increase- Cart-level additional increase valuetotal_comission- Total commissiontotal_comission_user- Total commission for the user
store_note- Internal store notecustomer_note- Note left by the customerprinted- Whether the order was printedid_quotation- Related quotation codebilling_address- Billing address text
OrderStatus- Inline order-status objectProductsSold- Order items; stub[{id}]in the list, full detail via /completePayment- Order payment objectsOrderInvoice- Order invoice objectsCustomer- Embedded customer object (in /complete)CustomerAddress- Customer address stubOrderTransactions- Payment transaction URLsMlOrder- Mercado Livre order metadataMarketplaceOrder- Marketplace order metadataPickupLocation- Pickup-location detailsDistributionCenter- Distribution-center package detailShippingLabel- Shipping label (application, url)payments_notification- Payment notification object
modified- Last-modification timestamp, used as the incremental replication key
Order Statuses
Order Statuses
Order status definitions available in your store. Full-table sync.Key Fields:
id- Unique status code (primary key)status- Status nameshow_backoffice- Whether the status shows in the backoffice (0/1)default- Whether it is a platform default status (0=default, 1=additional)
Sold Products
Sold Products
Line items sold across orders, linking orders to the products and variants purchased. Full-table sync.Key Fields:
id- Unique sold-item code (primary key)product_id- Product code soldorder_id- Order code the item belongs tovariant_id- Variant code sold, if anyname- Product name at time of saleprice- Sold unit priceoriginal_price- Original unit price before discountsquantity- Quantity soldmodel- Product modelreference- Product reference/SKUadditional_information- Additional item information
Customers
Customers
Customers registered in your store, with contact, document, address, and commercial information. Incremental sync using
modified as the replication key.Key Fields:id- Unique customer code (primary key)name- Customer full nameemail- Email addressnickname- Customer nickname/usernametoken- Unique customer tokentype- Customer type (0=individual, 1=company)gender- Gender (0=male, 1=female)birth_date- Date of birth
rg- Customer RG (Brazilian ID) numbercpf- Customer CPF (individual taxpayer ID)cnpj- Company CNPJ (business taxpayer ID)company_name- Company (legal) namestate_inscription- State inscription number
phone- Landline phone numbercellphone- Mobile phone number
address- Primary street addressnumber- Primary address numbercomplement- Primary address complementneighborhood- Primary address neighborhoodcity- Primary address citystate- Primary address state (UF)zip_code- Primary postal code (CEP)country- Primary address country
total_orders- Total number of orders placedreseller- Whether the customer is a resellerdiscount- Default discount for the customerblocked- Whether the customer is blocked (0/1)credit_limit- Customer credit limitindicator_id- Referrer/indicator codeprofile_customer_id- Customer profile (price list) codeobservation- Internal observation about the customernewsletter- Newsletter subscription flag (0/1)
last_sending_newsletter- Last newsletter-send datelast_purchase- Last purchase datelast_visit- Last visit datelast_modification- Last modification datecreated- Creation timestampregistration_date- Registration datemodified- Last-modification timestamp, used as the incremental replication key
CustomerAddress- Customer address ID stubs ([{id}]); full data in the customer_addresses stream
Customer Addresses
Customer Addresses
Addresses associated with your customers. Full-table sync.Key Fields:
id- Unique address code (primary key)customer_id- Customer code the address belongs toaddress- Street address (logradouro)number- Address numbercomplement- Address complementneighborhood- Neighborhoodcity- Citystate- State (UF)zip_code- Postal code (CEP)country- Countrytype- Address type (0=billing, 1=delivery)active- Whether the address is active (0/1)description- Address description/labelrecipient- Recipient nametype_delivery- Delivery typenot_list- Whether the address is excluded from listings