Onboarding offline purchase data (e.g. physical store purchases) to Dynamic Yield allows you to serve personalized experiences to your visitors (or email subscribers) based on their offline activity. You can onboard these purchases with a user identifier or it can be anonymous (just the transaction information).
Onboarding offline purchase data allows you to:
- Use recommendation algorithms that consider offline behavior:
- "Popularity" algorithm that recommends the most popular products and is based of both offline and online purchases
- "Purchase Together Offline" that recommends items that were purchased offline, regardless if they are purchased online.
- "Purchased Together Offline & Online" that recommends items that were purchased together based on both offline and online data.
- If offline purchases include identifier: "Affinity" algorithm that recommends products similar to users past behavior.
- Create audiences or target users based on their offline purchases using the conditions "Product purchased offline"
To enable these features, contact to your Customer Success Manager.
Uploading Identified Offline Transactions
You can synchronize a feed containing offline transactions from identified users. This is done by creating a CSV file containing the transactions, and synchronizing it as a Dynamic Yield data feed of type Identified Offline Purchases.
- Prerequisite: In order to match identified offline purchases with online users, a common unique identifier is required. This is accomplished by sending Omni-Channel events such as Login, Signup, and Identify API and including the same identifier when uploading the offline transactions.
- Create a CSV that contains the following columns using commas as the separator. You can download a sample CSV here. No specific naming convention is required. Each file can contain a maximum of 1.5 million rows.
Property Description Type cuidType Defines what type of identifier will be used to identify the customer. The value should be either:
- "he": if you are using a hashed email
- "email": if plain text emails are used
- "dyid": id DYID is the identifier
- Or the same custom type that was synced back to Dynamic Yield on the website.
String
(Up to 64 characters)cuid The customer unique identifier of the user
that made the purchaseString
(Up to 64 characters)transactionId Transaction ID of the purchase. Each line contains at most one SKU. If more than one item was purchased together, there will be more than one line with the same transactionId.
The transactionId Must be unique per transaction, including online purchases.
Transactions with the same ID as another transaction previously ingested in the last 7 days - will be ignored.
String
(Up to 64 characters)transactionSource Optional. The source from which the transaction occurred, usually the physical store ID. String transactionDatetime The date and time of the purchase in ISO 8601 combined date and time format. For example, 2018-09-23T07:29:51+00:00. String value Total cart value in actual payment currency. Required if transactionItemValue is not defined, otherwise it is optional. Float
(dollars.cents, positive values only)currency If the transaction is not in your default currency, specify the currency here. For more information, see Multi-Language Support. String productId SKU exactly as it appears in the product feed. If the SKU is not in the product feed the purchase will not be uploaded. String quantity Number of times the items was purchased within this purchased. Number
(positive, no demimal points)itemPrice List price for each single item (quantity of one). This may be different from the transactionItemValue due to discounts, taxes, etc. Float
(dollars.cents, positive values only)transactionItemValue Value of the line item in actual payment currency.
The value is the product of itemPrice times quantity, after discount & taxes.
Negative values are ignored.
Required if the "value" property is not defined, otherwise it is optional.Float
(dollars.cents, positive values only)size Optional. The size of the item. String
- In Dynamic Yield, go to Assets > Data Feeds.
- Click Add New and select Identified Offline Purchases.
- Select CSV as the sync method.
- Write down the S3 credentials that are displayed.
- Save and Activate the Data Feed.
- Upload a new feed file any time to a folder in your S3 bucket as follows: <s3 bucket URL>/YYYY-MM-DD/
A new folder must be created for every day that you synchronize the file. Whenever a new file is uploaded, Dynamic Yield will ingest it immediately. - You can check the synchronization status and check for errors by looking at the Data Feed list and downloading the log. For more details, see File Error Handing below.
Uploading Anonymous Offline Transactions
To sync offline purchases without any use identifier, follow the following steps:
Step 1: Prepare the File
Download example file (sample)
- File type: CSV
- Maximum number of rows: 1.5M
- Each line should include an SKU that was purchased offline:
- If a purchase included 3 SKUs - it should appear as 3 rows.
- If a purchase include 1 SKU that was purchased 3 times - it should include 1 row
Format:
Property | Description | Type |
---|---|---|
transactionId | Unique transaction ID for the purchase including one or more items. If more than one type of item was purchased, there should one line in the CSV for every unique SKU included in the purchase. For more details, see the example below. | String (Up to 64 characters) |
transactionSource Optional |
The source from which the transaction occurred, usually the physical store ID. | String |
transactionDatetime | The date and time of the purchase in ISO 8601 combined date and time format (Ex: 2018-09-23T07:29:51+00:00). | String |
value | Total value of the purchase (with its entire content). Required if transactionItemValue is not defined. Otherwise, it is optional. |
Float (dollars.cents, positive values only) |
currency | The currency that the value column of that specific purchase is based on. | String See supported currencies |
productId | SKU exactly as it appears in the product feed. If the SKU is not in the product feed the purchase will not be uploaded. | String |
quantity | Number of times the items was purchased within this purchased. | Number (positive, no demimal points) |
itemPrice | List price for every single item (quantity of one). This may be different from the transactionItemValue due discounts, taxes, etc. | Float (dollars.cents, positive values only) |
transactionItemValue |
Value of the line item in actual payment currency. The value is the product of itemPrice times quantity, after discount & taxes. |
Float |
size (Optional) |
The size of the item. For example, L, M, or any way you would like to describe the size of your products. |
String |
The file should not include duplicate rows and should be sorted by transactionId. Each row represents a purchased SKU. A single transaction including 2 identical shirts for $20 dollars each (discounted from $25 list price), and one jacket for $100, there would be two lines in your CSV with the following values:
transactionId | transactionDateTime | value | currency | productId | quantity | itemPrice | transactionItemValue |
---|---|---|---|---|---|---|---|
101 | 2018-09-23T07:29:51+00:00 | 140.00 | USD | 12345 | 2 | 25.00 | 40.00 |
101 | 2018-09-23T07:29:51+00:00 | 140.00 | USD | 12789 | 1 | 100.00 | 100.00 |
- In Dynamic Yield, go to Assets > Data Feeds.
- Click Add New and select Anonymous Offline Purchases.
- Select CSV as the sync method.
- Write down the S3 credentials that are displayed.
- Save and Activate the Data Feed.
- Upload a new feed file any time to a folder in your S3 bucket as follows: <s3 bucket URL>/YYYY-MM-DD/
The feed file can have any name.
A new folder must be created for every day that you sync the file. Whenever a new file is uploaded, Dynamic Yield will ingest it immediately. - You can check the synchronization status and check for errors by looking at the Data Feed list and downloading the log. For more details, see File Error Handling below.
File Error Handling
Several validations are performed when a file is synchronized, and an error file is created with all the rows that had errors and an additional column with the relevant error message. You can download the error log directly in the Data Feeds list. For more details, see Validating Data Feeds. The validations check the following items:
- File isn’t empty.
- Mandatory columns (e.g. transactionId, productId) are missing from the file
- Values are negative for certain fields (value, transactionItemValue, Item Price or quantity)
- The TRANSACTION_DATE is a valid date
The error file is also uploaded to the same folder as the file you are synced. It is named <Feed name>-Feed-Log-MM-DD-YYYY-HH-MM-SS.
If more than 20% of the rows contain errors, the file will not be synchronized and will be marked with the error: “synced with error”. Files with fewer than 20% errors are synced with the status “synced with warning”.
Duplicate transactionId
If 2 files are imported and contain the same transactionId within 24 hours, the related purchases of the 2nd file are ignored. After that, the purchases events are then stored.
How Can You Leverage Offline Purchase Data?
- If you have more than one Dynamic Yield site, we recommend uploading the offline purchase data to the most relevant site and sharing the audience to all of your other sites. Alternatively, you can also upload the offline purchase data to each of your sites individually.
- Create audiences based on offline purchases and target them in relevant campaigns.
- Use the Purchased Together - Offline and Purchased Together - Offline and Online recommendation strategies for use cases such as:
- Excluding products purchased offline.
- Presenting products purchased offline within recommendation widgets
- Presenting products frequently purchased with recent offline purchases within recommendation widgets.
- User offline purchases are stored in each user's Unified Customer Profile and can be accessed via the Unified Customer Profile API so marketing, sales, and service associates can provide a better customer experience based on what the user has purchased before.
Known Limitations
- Audience populations are calculated daily, and by default include anyone who matched the conditions in the past 30 days. This can be extended up to half a year.
- The affinity calculation is only done for users that have bought\viewed more than 5 products or have done a page view in the last 30 days - meaning they are online users and have visited the site in the last 30 days. Affinity score is also calculated for pure offline users. Affinity is updated every 24 hours.
- Each file may include up to 1.5M rows.