It's essential that order data is complete and timely. This data is used for historical analysis, building recommendation models, and triggering or stopping campaigns. The import of order data is typically broken into two parts - uploading historical data and syncing ongoing data.
- Order field reference: This will direct you to the Objects & Fields section of your account, where you can review your existing default and custom order fields.
- Create custom fields: An article outlining the creation and review of custom order fields.
Orders in Zaius
Orders in Zaius are represented both as events and as order objects. The event stores the order line items—the products that are present in the transaction. The order objects store top-level order data, like the total, taxes, discounts, customer information, etc, but no understanding of the goods that were purchased.
If there are non-standard fields that you would like to capture on an order, custom fields can be added to your Zaius schema.
- To add top-level fields, view your account Objects & Fields and add custom field directly to the Orders object. More information on adding custom fields can be found here.
- To add item-level fields, view your account Objects & Fields and add a custom field directly to the Events object. Item level fields must start with item_ to pull the data out of the object and place it properly on the event.
For details on standard fields and how order data (including refunds, returns, and cancels) behaves in Zaius, review our developer documentation.
Upload historical order data
Your historical order information can be imported via CSV. When you provide order data, Zaius will automatically create an event for the orders and associate them with the customer you include in the import file. If an order is associated with a customer that does not exist in your account, then a new customer profile will be created.
You can get a sample file to help you with order formatting here.
To upload a CSV file and add order data in bulk:
- In your Zaius account, click the Account Settings icon in the main navigation bar.
- In the sidebar, select Integrations under the Data Management section.
- At the top of the integrations page, click the Upload CSV button.
- Drag and drop a CSV file onto the Drag & Drop area or select the browse option to locate the file elsewhere. To ensure the information is imported correctly, please follow the file formatting guidelines outlined below.
Format your data correctly
The file's name should begin with zaius_orders and use the CSV UTF-8 format, with a header row of field names. An identifier field, such as order ID, is required to import the information. The file may be formatted one of two ways:
- Repeat the top-level order data for each row which contains a new line item in that purchase, such as with purchase 12345 below. The top-level data must be identical on each row. (Recommended)
- Leave the top level order blank for each row after the first one for the order, and only provide an action and item-level fields.
Sync ongoing order data
Instead, we recommend that the data be sent via the Zaius HTTP API. You can use the API in conjunction with webhooks to ensure all orders and revenue are accurate.