Dynamic Customer Profiles (DCP) are a collection of your customers' attributes, including demographic data, behavioral characteristics, or any other information particular to your industry and customers. DCP provides a consolidated, dynamic view of your customers, enabling you to refine this view as you obtain more information, and to take action based on this view.
A single customer profile contains attributes collected by you, or by services that you use, and provided to Optimizely to create a single view of the customer. These attributes are organized and stored in Tables (also known as datasources) and linked across Tables using identity aliases.
Customer profiles can be used to create audiences for targeting, and exported for use in other integrations, or analysis.
To enable DCP for your account, please contact firstname.lastname@example.org
Customer Profiles are a collection of your customers' attributes across several Tables. The following APIs allow you to create, update, and read customer attributes for a single Table.
Using the consolidated customer profile API call, you can retrieve the complete Customer Profile across all Tables.
You can upload a CSV (or TSV) file to the
optimizely-import S3 bucket using the provided Table S3
path. We will parse the given CSV, validate each row of data against the registered
attributes, and store the successfully processed rows. Each row is treated as
an update request.
Using the provided AWS credentials, it's possible to upload CSV files in a variety of ways. The simplest approach is to use an S3 client application, such as Cyberduck.
Once you have downloaded and installed Cyberduck, follow these steps to upload a file:
- Retrieve the datasource's
AWS Access Key,
AWS Secret Keyand
S3 Import Pathfrom the Optimizely interface (Audiences > Attributes > More Actions > Data Upload).
- Launch Cyberduck and create a new Bookmark (Bookmark menu > New Bookmark).
- Enter a descriptive name for the datasource and your
AWS Access Key.
Click "More Options" to enter the
S3 Import Path.
Note: Cyberduck requires the full S3 import path, including both the
optimizely-importbucket and the given
s3_path, for example, when
View your bookmarks and double-click to connect to the S3 bucket. Cyberduck will prompt you to enter the
AWS Secret Keyfrom Step 1.
You are now connected to your Datasource's S3 bucket! You can drag and drop files to be uploaded via the Cyberduck interface.
Please note that this process may change in future versions of Cyberduck. See the official Cyberduck website for current documentation.
To upload the data, you need one of the following clients at minimum:
- AWS CLI version 1.11.108 and later
- AWS SDKs released after May 2016
- Any library makes AWS S3 GET and PUT requests via SSL and using SigV4
You can retrieve the AWS credentials and S3 path from the Table endpoint. This information is also displayed in the Optimizely web application in the Data Upload menu within each Table.
After uploading a file to S3, you can check Upload History to confirm that your file has been processed. If you need to upload an updated version of your file, make sure that any files with the same name have already been processed. Uploading multiple files with the same name to the same S3 path can cause the files to be processed out of order and prevent your updates from being detected.
CSV Formatting Requirements
- You can download a template CSV file for each of your Tables under the Data Upload menu. This file will include a correctly formatted header row with each of the attributes registered for the Table:
- Each column in the header row must be a registered attribute
name. A CSV may contain a subset of the registered attributes
- The header row must include a column named
customerId(case-insensitive). All rows must also contain a valid value for this column. Note that the values of this column should correspond with expected values for the Table's Customer ID Field (defined during Table configuration). For example, if your Table's Customer ID field is a cookie named "logged_in_id", then the value of the
customerIdcolumn for each row should be the user's ID as it would appear in their "logged_in_id" cookie.
- If a column header does not correspond to a registered attribute
name, the upload will fail
- If an attribute value does not respect the attribute's
format, the upload will fail
If you add an attribute of type String or Text, make sure that any double quotation marks that are part of the attribute are escaped with another quotation mark prefixed before it. Except for double quotes, none of the other symbols or characters require to be escaped.
For example: A formatted data row in your input file can look like this:
"CustomerId1", "John Doe", "Height: 6'1"""
As shown for the "Height" attribute in above sample row, the double quotes that are part of the data need to be escaped with another double quote even though the field value is enclosed in separate double quotes, while the single quote, in attribute value, can be used as is.
Here's an example of what your CSV file would look like for a Table containing two attributes,
Aliases are used to link each customer ID in your Tables to an
Optimizely User ID. The Optimizely User ID is a random ID generated by Optimizely (stored in the
As shown in the figure, an alias indicates that the same customer is identified by
ANON_ID_1 in "My Datasource" and
OEU_2 in the "Optimizely Datasource". This allows Optimizely to present a
consolidated customer profile
for that customer and allows you to target customers based on all of your Table Attributes.
Customer Profile Integrations allow you to upload attributes to enrich a customer profile.
This section walks through how to build an integration that uploads customer attributes to Optimizely.
- Your application must store customer IDs (e.g. hashed email addresses or other unique IDs)
- Customer IDs must not be personally identifiable, as per Optimizely's Terms of Service
- You are comfortable using REST APIs
1. Get Access
If you are interested in building an integration with DCP and need DCP enabled for your account, please contact email@example.com
2. Register your application
We highly recommend that you use OAuth 2.0 to authenticate with the Optimizely REST API. This will allow you to provide a seamless experience to users in your application and periodically send data to Optimizely. Learn how to connect to Optimizely using OAuth 2.0.
3. Create a DCP Service
After connecting with Optimizely, you should create a DCP Service, and associate it with your project. This service will contain all your datasources. If you already have a DCP service, you may proceed to the next step.
4. Create a Table
Create a table within your DCP Service. This will be the location for all of your application's customer data. A table allows you to send customer data to Optimizely, organized under a common ID space, without worrying about the relationship of customers across tables.
5. Register Attributes
Register attributes for the table with create attribute. Attributes must be registered prior to customer profile data being uploaded to that table.
6. Upload data
Write customer profile attribute values for the registered
attributes. You can also bulk upload attribute data by dropping a CSV (comma-separated values)
file into the table's S3 Import path:
s3_path is included in the table's metadata.
7. QA integration
To test the integration end-to-end, verify that:
- A table has been created in the the Audiences > Attributes dashboard.
- Table attributes appear in the audience builder under the list of External Attribute conditions and you can create an audience based on these attributes.
- You can run an experiment targeted to this audience based on uploaded data.