Sale Model

sale_id

What are common values to use for sale_id?

sale_id, needs to be unique identifier that you can reproduce deterministically.

Below are are few approaches:

If you're sending Sales data on a transaction granularity

  • line_item_id (e.g. on Shopify), which would be unique to every transaction variant combination

  • {order_id}_{variant_id} , i.e. concatenation of order_id and variant_id

If you're sending Sales data on a day level granularity

  • {date}_{location}_{variant_id} , i.e. concatenation of date, location and variant_id. Example could be: 2020-10-01_1234_999999

location

Should location be a human readable name, or an identifier?

It's important that the value for the location attribute doesn't change over time. To that end, identifiers are preferable to human readable names, as the latter tends to change. As needed, Toolio can map the location identifiers to human readable names as needed.

Did this answer your question?