Skip to main content
The purchase import ingests order and transaction data. Each row represents a single line item. Orders with multiple items have multiple rows that share the same order_id and total_price.
Delivery: place the file in the SFTP inbound directory provisioned for your account. Sotto picks up new files automatically and routes them by their filename prefix — a file must start with purchase (or order) to be processed as a purchase import. Files whose name doesn’t match a known type are not processed.

File requirements

Columns

¹ Customer identification: at least one of customer_phone, customer_third_party_id, or customer_email must be present per row. Phone number is preferred for matching accuracy.

Processing rules

Customer matching

Customers are matched in priority order:
  1. customer_phone (recommended)
  2. customer_third_party_id
  3. customer_email
If a match is found, the existing customer is updated with any new information. If no match is found:
  • With customer_phone — a new customer record is created.
  • Without customer_phone — the purchase is recorded but not attributed to a customer (no record is created).
sms_opt_in reflects whether the customer opted in during this specific purchase.
  • true — the customer is marked as opted in.
  • false or blank — existing consent is unchanged.
Customers cannot opt out through the purchase workflow. A false value does not opt a customer out; it only means they did not opt in during this transaction.

Location

billing_zip is used to determine the customer’s timezone. City and state are optional but improve segmentation.

Example

Validation checklist

1

Required fields present

Every row has order_id, created_at, total_price, product_title, quantity, and price.
2

A customer identifier per row

At least one of customer_phone, customer_third_party_id, or customer_email.
3

Consistent order totals

Rows sharing an order_id have identical total_price values.
4

Correct formats

Timestamps use ISO 8601; phone numbers use E.164; booleans are true/false.