Customer data

This article provides information on how you can integrate customer data from your site or app with our platform.

Identity

Blueshift supports several identifiers to uniquely identify customer behavior & attributes. You would need to include one or more of these identifiers while integrating with Blueshift for any customer specific data.

Identifier

Description

customer_id

(string) First party unique customer id for each customer. The customer_id can be at most 64 characters in length.

email

(string) Email address of the customer. The email address can be at most 64 characters in length.

cookie

(string) First-party cookie that our (Blueshift's) Javascript pixel inserts. We automatically generate this cookie and it's 36 characters in length.

device_id

(string) Unique device identifier on iOS or Android devices. Blueshift mobile SDKs can automatically capture the device_id and include it in each event.

Blueshift can track anonymous customer behavior (before login) based on an anonymous first-party cookie on your website, or a device_id on mobile. Once a customer logs in, the anonymous behavior can get merged in with known customer identity to create a unified single customer view. You can read our customer documentation to learn how single customer view and profile is merged.

API overview

Our platform provides API endpoints that you can use to integrate data of your site's customers with our platform. We host a 360 degree customer profile for each of your customers to represent all of their demographic, behavioral activity, and engagement activity. We merge logged-out activity with logged-in activity to create a rich customer profile. In addition to feed uploads, we support REST APIs to create, update, or retrieve customer information. You need a user API key. The API reference documentation specifies how you can get it. Here are the API endpoints that you can use to integrate our platform with your app or site and use its features:

However, before you get to the endpoints, we'd like you to review the attributes and use the recommended format to send data to us.

Attributes

Attribute

Description

Examples

email

Email address of a customer to uniquely identity the customer.

"[email protected]"

customer_id

Customer ID of a customer to uniquely identify the customer.

"12341j234klkhj1234l1kj3"

firstname

First name of a customer (optional).

"John"

lastname

Last name of a customer (optional).

"Doe"

gender

Gender of a customer (optional).

"male"
"female"
"unknown"

joined_at

Date when a customer joined your site in iso8601 format.

"2016-02-02T04:19:42Z"

facebook_id

Facebook ID of a customer (optional).

"john.doe"

unsubscribed

Subscription status of a customer in boolean format (optional). Set it true if a customer has unsubscribed from a mailing list.

true
false

unsubscribed_at

Date when a customer unsubscribes from a mailing list in iso8601 format (optional).

"2016-02-02T04:19:42Z"

email_hard_bounced

Automatically updated boolean value when an email hard bounce occurs.

true
false

email_spam_reported

Automatically updated boolean value when a customer marks your email as spam via the ISP.

true
false

phone_number

Phone number of the customer including the country code to send SMS messages (optional).

Ensure that the phone number that you specify meets the phone number format requirements listed here.

0012345678910

device_ids

Mobile device identifiers of a customer's device (optional).

["1234ABCD-4321DCBA","2345EDCB-5432BCDE"]

device_tokens

Mobile device tokens of a customer's device to push notifications (optional).

["123abcd", "321cdba"]

birth_year

Year of birth of a customer (optional).

2001

birth_month

Month of birth of a customer (optional).

12

birth_dayofmonth

Day of birth of a customer (optional).

10

last_device_token

Token of the most recent device of a customer sent from your mobile app.

"1234abcd"

last_location_geo_longitude

Last known geo longitude of the customer.

51.4934

last_location_geo_latitude

Last known geo latitude of the customer.

0.0098

custom attribute

Described below.

Provided below.

Custom attributes

You can send custom attributes about your site's customers to us. You can use these attributes to filter your customers during segmentation. Ensure that you use the correct JSON data types when you send the custom attributes, since the data types determine how you can filter customers in segments. You can use the following guidelines to send the custom attributes to our platform:

Data type

Description

Examples

Boolean

Boolean values in JSON must either be true or false.

{ "is_premium_member": true }

Strings

String values in JSON must be entered in double quotes.

{"name": ": "John" }

Numbers

Numbers in JSON must be an integer. Use strings if you don't want to perform comparisons on the values that you want to send to our platform.

{ "age": 30 }

Decimal

Numbers in JSON must be a floating point. Use strings if you don't want to perform comparisons on the values that you want to send to our platform.

{ "rating": 4.5 }

Dates

Dates must be in ISO8601 format.

{ "signed_on": "2017-07-13T17:44:46Z" }

Arrays

Values in JSON can be arrays.

{""preferences": [ "fiction", "local" ] }

Nested objects

Values in JSON can be nested objects. Contact Blueshift support to discuss data design before you upload nested JSON objects.

{ "plan":
{ "name":"premium",
"end_at": "2017-07-13T17:44:46Z"
}
}


Did this page help you?