Purchase event (mandatory)


  • A purchase made by a user. Purchase is a generic term choosen to designate what can also be called order, ticket, basket depending on the source context. It is an event reporting that a user bought a given product. A purchase is reputedly paid.
  • The primary key is purchase_id+ purchase_line_id (one line per buying act and product bought).
  • :information-source: Note that however a purchase can be updated (e.g. to update its status), no line (identified by its purchase_id+ purchase_line_id) can be added or removed to a previously synchronized purchase (identified by its purchase_id). In case purchase updates are imported, every line of the purchase (identified by its purchase_id) is to be imported again.
  • :information-source: In case of returns (or refunds) are managed in this file, you need to have the line_type field implemented to enable Splio to distinguish purchases from refunds. For returns (or refunds) lines, amounts, and quantities are to be signed negatively (opposite sign from the initial purchase line) while the unit price remains positive.
  • :information-source: If you are operating in multiple currencies, please read first our Multi-currency setup section.

Fields list

Field nameTypeKindDefinitionValue example
purchase_idStringMandatoryThe identifier of the purchase (can be an order_id, a ticket_id, ...).312
user_idStringMandatoryThe id of the user who purchased.2356
store_idStringMandatoryThe id of the store in which the purchase was made.23
event_datetimeDatetimeMandatoryThe datetime the puchase occured.2023-07-08T18:34:26+01:00
statusOptionalWhenever status (E.g. Paid / In preparation / In delivery) are managed on purchases in the source, and Marketing Automation campaigns are intended on status updates.Paid
base_currencyStringMandatoryThe reference currency used for operations. Needs to be the same for all purchases. It is the currency that will be used for reporting purposes.EUR
total_paid_amountDecimalMandatoryThe total amount paid by the user for the purchase (including the total discount+shipping+tax_amount).53.00
total_discount_amountDecimalMandatoryThe discount amount for the purchase0.00
total_shipping_amountDecimalMandatoryThe shipping amount for the purchase0.00
total_tax_amountDecimalMandatoryThe tax amount for the purchase10.06
discount_codeStringOptionalA discount code (or list of discount codes separated by a "|") is useful to link the purchase to a coupon, a reward or any promotion (free shipping, gift product, ...) and may be used for analytics purposes. If you are using Splio Loyalty, this should be the reward attribution external_id.BIRTHDAY23
presentment_currencyStringOptionalIn case of operations in more than one currency, the file must also contain currency in which you charged your customer.USD
presentment_total_paid_amountDecimalOptionalThe total amount paid by the user for the purchase (including the total discount +shipping+tax amount), in the presentment currency59.33
presentment_total_discount_amountDecimalOptionalThe total discount amount for the purchase, in the presentment currency0.00
presentment_total_shipping_amountDecimalOptionalThe shipping amount for the purchase, in the presentment currency0.00
presentment_total_tax_amountDecimalOptionalThe tax amount for the purchase, in the presentment currency11.87
card_codeStringOptionalIn the case there is a loyalty program, the card code to which the purchase is attached.
purchase_line_idStringMandatoryThe unique identifier for the purchase line312-812
product_idStringMandatoryThe id of the product purchased.812
quantityDecimalMandatoryThe quantity purchased.1.20
unitStringMandatoryThe unit in which the quantity is expressed. In case the quantity is simply a number of items, the unit can be left empty.meters
unit_priceDecimalMandatoryThe unit price for the product purchased.5.60
line_paid_amountDecimalMandatoryThe amount paid for the line (including discount+shipping+tax)6.72
line_shipping_amountDecimalMandatoryThe shipping cost for the line0.00
line_discount_amountDecimalMandatoryThe discount amount for the line0.00
line_tax_amountDecimalMandatoryThe tax amount for the line0.00
presentment_unit_priceDecimalOptionalThe unit price for the product purchased, in the presentment currency.6.28
presentment_line_paid_amountDecimalOptionalThe amount paid for the line (including the line discount +shipping+tax amount), in the presentment currency.7.54
presentment_line_shipping_amountDecimalOptionalThe shipping cost for the line, in the presentment currency.0.00
presentment_line_discount_amountDecimalOptionalThe discount amount for the line, in the presentment currency.0.00
presentment_lint_tax_amountDecimalOptionalThe tax amount for the line, in the presentment currency0.00
converted_cart_idStringOptionalIf available, the reference of the cart that has been converted into a purchase.
line_typeStringOptionalUsed to differentiate purchases from returns and refunds in case those ones are managed in the same events as purchases.
Possible values purchase or refund.
{custom fields}Any typeOptionalAny other purchase-related field of interest, to make it available in Splio solutions.