Skip to main content
Custom data is the order, customer, product variant and refund data you deliver to Eyk from your own backend. You use it when your shop does not run on a platform Eyk connects to directly. It reaches Eyk through one of two transports: the Data API or BigQuery hook tables. Both carry the same objects and follow the same rules. One example runs through these pages. Noor & Vos, a fictional home goods shop, sends order NV-10432. It holds two vases at EUR 20.00 and one tray at EUR 50.00, a EUR 10.00 coupon and EUR 5.00 shipping, all excluding 21% VAT. The customer is CUST-8842, the variants are VASE-BLU and TRAY-OAK.

Which transport

Rules that apply to both

Amounts exclude tax

Every amount excludes tax, and taxes is the tax on top. When your system stores prices including tax, divide by 1 plus the rate before you send. Noor & Vos stores the vase at EUR 24.20 and sends unit_price 20.00. The order fields subtotal, discounts and taxes are the truth for the order. When the lines do not add up to them, Eyk keeps the lines and books the difference on an adjustment line, an extra order line without a product. Send discounts as positive numbers. Refund amount is the goods refunded and excludes shipping.

Ids must match exactly

Eyk links records only through the ids you send, compared as strings, including case. An order line’s variant_id must equal a product variant’s id. An order’s customer_id must equal a customer’s id, and that customer needs an email for new versus returning customers. A refund’s order_id must equal an order’s id. The purchase event of the Eyk tracking pixel links to the order when its transaction_id equals the order’s id or order_number. A link that does not match fails silently: the order still counts, but without the product, the customer or the attribution.

Only products are items

An order item is a line for a product variant in your catalog. Shipping goes in shipping, coupons and other discounts in discounts. A fee, a service, insurance or a gift is an item with a variant row of its own. An extra parcel is the same order, never a second one. An item whose variant_id matches no variant keeps its revenue in every total but has no product in product reports.

Send a record again to update it

Both transports are append-only. Per id, the version with the latest updated_at wins, so a re-sent record must carry a later updated_at to replace the old one. There is no delete. To reverse an order, send a refund. Eyk does not filter on payment_status, so leave out orders that never became a sale. Eyk processes everything once a night, and data shows up in reports the next morning.

Costs make profit

Profit is net sales minus cost of goods, shipping cost and payment cost. Cost of goods comes from unit_cost on the line, or from fallback_unit_cost on the variant. Shipping and payment cost come from shipping_cost and payment_cost on the order. Without those, Eyk uses a rate card per method in the hook tables, or the fallback in your Eyk settings. A second system that knows the real costs, such as an ERP, corrects them through order updates in the Data API.