Skip to main content

Importing customer data

When you first integrate with Talon.One, ensure you import information about your existing customers to maximize the use of targeted campaigns immediately.

Customer data consists of two entities:

Overview
Importing customer data to Talon.One.

Prerequisites

  1. You have created an Application in Talon.One.
  2. You have created an Integration API key.

Step 1: Importing customer profiles

In Talon.One, customer profile entities represent the data related to your customers.

This example shows how to import customer profile data using the Update customer profile endpoint both directly and via an SDK.

curl --request PUT 'https://example.talon.one/v2/customer_profiles/mysessionid' \
--header 'Authorization: ApiKey-v1 my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"attributes": {
"Name": "John doe",
"Email": "john.doe@example.com",
"SignupDate": "2012-07-09T19:22:09.1440844Z",
"Phone": "202-555-0113"
},
"responseContent": [
"customerProfile"
]
}'
note
  • Mapping your customer data to profile attributes depends on your Application.
  • You can define your own profile attributes for any data you need for your targeted campaigns.

Step 2: Importing past customer orders

You can import the historical sales data of your customers to use it in your campaigns. In Talon.One, past customer orders are considered closed sessions.

Similar to importing customer profiles, you can loop through these past orders and create a closed session for each order using the Update customer session endpoint.

Values between angle brackets mean they come from your order management system.

curl --request PUT 'https://example.talon.one/v2/customer_sessions/mysessionid' \
--header 'Authorization: ApiKey-v1 my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"customerSession": {
"profileId": "<somecustomerid>",
"state": "closed",
"total": "<ordertotal>",
"attributes": {
"BillingName": "<billinginfo>",
"ShippingCost": "<shippingcost>"
}
},
"responseContent": [
"customerSession",
"customerProfile"
]
}'
note
  • Mapping your order history to session attributes depends on your Application.
  • See Attributes for more information on custom attributes and how to use them.
  • The profileId of a session should match the ID you assigned to the customer profile when you used the Update customer profile endpoint.
  • The state of a session must be set to closed for Talon.One to include that order in the total sales calculation for the associated profile.