Purchase event (mandatory)
Overview:
- 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). - ℹ️ Note that however a purchase can be updated (e.g. to update its
status
), no line (identified by itspurchase_id
+purchase_line_id
) can be added or removed to a previously synchronized purchase (identified by itspurchase_id
). In case purchase updates are imported, every line of the purchase (identified by itspurchase_id
) is to be imported again. - ℹ️ 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. - ℹ️ If you are operating in multiple currencies, please read first our Multi-currency setup section.
Fields list
Field name | Type | Kind | Definition | Value example |
---|---|---|---|---|
purchase_id | String | Mandatory | The identifier of the purchase (can be an order_id, a ticket_id, ...). | 312 |
user_id | String | Mandatory | The id of the user who purchased. | 2356 |
store_id | String | Mandatory | The id of the store in which the purchase was made. | 23 |
event_datetime | Datetime | Mandatory | The datetime the puchase occured. | 2023-07-08T18:34:26+01:00 |
status | Optional | Whenever 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_currency | String | Mandatory | The 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_amount | Decimal | Mandatory | The total amount paid by the user for the purchase (including the total discount+shipping+tax_amount). | 53.00 |
total_discount_amount | Decimal | Mandatory | The discount amount for the purchase | 0.00 |
total_shipping_amount | Decimal | Mandatory | The shipping amount for the purchase | 0.00 |
total_tax_amount | Decimal | Mandatory | The tax amount for the purchase | 10.06 |
discount_code | String | Optional | A 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_currency | String | Optional | In case of operations in more than one currency, the file must also contain currency in which you charged your customer. | USD |
presentment_total_paid_amount | Decimal | Optional | The total amount paid by the user for the purchase (including the total discount +shipping+tax amount), in the presentment currency | 59.33 |
presentment_total_discount_amount | Decimal | Optional | The total discount amount for the purchase, in the presentment currency | 0.00 |
presentment_total_shipping_amount | Decimal | Optional | The shipping amount for the purchase, in the presentment currency | 0.00 |
presentment_total_tax_amount | Decimal | Optional | The tax amount for the purchase, in the presentment currency | 11.87 |
card_code | String | Optional | In the case there is a loyalty program, the card code to which the purchase is attached. | |
purchase_line_id | String | Mandatory | The unique identifier for the purchase line | 312-812 |
product_id | String | Mandatory | The id of the product purchased. | 812 |
quantity | Decimal | Mandatory | The quantity purchased. | 1.20 |
unit | String | Mandatory | The 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_price | Decimal | Mandatory | The unit price for the product purchased. | 5.60 |
line_paid_amount | Decimal | Mandatory | The amount paid for the line (including discount+shipping+tax) | 6.72 |
line_shipping_amount | Decimal | Mandatory | The shipping cost for the line | 0.00 |
line_discount_amount | Decimal | Mandatory | The discount amount for the line | 0.00 |
line_tax_amount | Decimal | Mandatory | The tax amount for the line | 0.00 |
presentment_unit_price | Decimal | Optional | The unit price for the product purchased, in the presentment currency. | 6.28 |
presentment_line_paid_amount | Decimal | Optional | The amount paid for the line (including the line discount +shipping+tax amount), in the presentment currency. | 7.54 |
presentment_line_shipping_amount | Decimal | Optional | The shipping cost for the line, in the presentment currency. | 0.00 |
presentment_line_discount_amount | Decimal | Optional | The discount amount for the line, in the presentment currency. | 0.00 |
presentment_lint_tax_amount | Decimal | Optional | The tax amount for the line, in the presentment currency | 0.00 |
converted_cart_id | String | Optional | If available, the reference of the cart that has been converted into a purchase. | |
line_type | String | Optional | Used to differentiate purchases from returns and refunds in case those ones are managed in the same events as purchases. Possible values purchase or refund . | purchase |
{custom fields} | Any type | Optional | Any other purchase-related field of interest, to make it available in Splio solutions. |
Updated 3 months ago
What’s Next