The Marketing Cloud Customer Data Platform (CDP) has been around for a while. However, you may not yet be familiar with it. In our previous blog post, we discussed the importance of CDP in the context of Salesforce Genie. This blog post will guide you through the cool features that CDP has available for developers.
What is a customer data platform?
A customer data platform connects all of a company’s customer data in a single place. Customer data platforms reconcile identities, such as names, email addresses, and phone numbers. CDP can collect data and unify data across platforms, such as Salesforce CRM, Marketing Cloud, Commerce Cloud, legacy systems, and much more! This enables better targeting for customer segmentation and personalization, so that organizations can leverage all their data to target the right consumers with the hyper-personalized engagement they demand today.
Web integration for CDP
The Salesforce Interactions SDK captures, collects, and tracks data from your web interactions and sends the information to CDP. This information can then be used to compile behavior profiles of your website visitors, segment audiences, and build integrations. For example, the Salesforce Interactions SDK has pre-built interaction types called Cart Interactions, Catalog Interactions, and Order Interactions to use with your eCommerce websites.
Let’s dive deeper into one of these interaction types, a cart interaction. A cart interaction occurs when a customer modifies their online shopping cart on a website. Let’s imagine that you created an eCommerce website built on your own infrastructure and platform outside of a Salesforce product or solution. On this site, you have several products listed that customers can view and buy. What are the types of interactions that your customer might do on the site that you want to be captured and sent to CDP?
Here are a few ideas to start. They may add items to a shopping cart, remove items from a shopping cart, or put through an order. The Interactions SDK already has two interaction types that can be used out of the box for capturing data when a customer is adding and removing items from a cart, and sending that data to CDP. Below is an example of how you can use the “Add to Cart” interaction to capture a single-line item being added to a cart on your website and have that interaction sent to CDP.
Mobile app integration for CDP
The CDP module for the Engagement Mobile Software Development Kit (SDK) enables the collection of data about the customer’s mobile app interactions through event tracking, such as adding and removing from a cart, on the iOS and Android platforms. Events collected by the Engagement Mobile Software Development Kit further create a unified view of a customer and can be leveraged across multiple clouds, like Sales, Commerce, and Service, for personalization and engagement.
There are two event types: structured and unstructured. Structured events have strict requirements for the types of information that can be provided. They also come pre-defined with the suggested Mobile Connector schema for CDP, and they can be extended to capture extra data. An example of a structured event is an order interaction. Let’s imagine that you have customers that are visiting your eCommerce store from a mobile device, and you want to capture that data and have it sent to CDP to further build out that customer’s unified view. On their mobile device, they are able to complete purchases, and you want to capture the information of their orders and purchases. Below is an example of how you can capture a purchase order interaction and send the data back to CDP.
Unstructured events have no requirements for the information that can be provided. This allows more flexibility in capturing data that falls into use cases that are outside of the use cases for structured events. Custom event definitions must be created and added to the Mobile Connector schema to be ingested into CDP.
Imagine that your eCommerce site has many people abandoning carts, or not checking out, and you want to capture that information, so that you can follow up with an email or a text message, or even put those customers into a journey in Marketing Cloud. You can create your own custom event to capture cart abandonments and have that data sent to CDP, so that you can act on it and encourage customers to reconsider finishing their purchase. Below is an example of the creation and usage of a custom cart abandonment event.
Data ingestion using application programming interfaces (APIs)
There are multiple ways that you can ingest data in CDP. You can load data records into your CDP programmatically using the Ingestion API or configure an Amazon S3 connector with a scheduled retrieval in order to pull records from S3. The Ingestion API is a RESTful API that offers two interaction patterns: bulk and streaming. The streaming pattern accepts incremental updates to a data set as those changes are captured. The bulk pattern accepts CSV files in cases where data syncs occur periodically. The use cases for the different APIs are further broken down below.
- This involves moving large amounts of data on a daily, weekly, or monthly schedule.
- Legacy systems, where you can only export data in off-peak hours
- A new Customer Data Platform org that you want to backfill with 30/60/90/X days of data
- This involves small micro-batches of records being updated in near-real time.
- Source system built on modern streaming architectures
- Change data capture events
- Consuming data from webhooks
Access via Apex
The data platform that sits behind CDP can be queried using SQL, which is a structured query language that has become a standard for accessing data from a relational database. If you are a Salesforce developer, you may be more familiar with SOQL, which has many similarities to SQL. You can also write Apex and use automation tools like Flow. Below is an example of how to access CDP data via the Connect API using an Apex class.
Data query using Calculated Insights
The Calculated Insights feature lets you define and calculate metrics on all of your data stored in CDP. Calculated insights are created with SQL. You can create metrics, such as engagement scores based on clicks on email messages from a connected Marketing Cloud system. You can also set up metrics from your connected eCommerce sites, like most viewed product categories, browsing behavior, and product purchase behavior.
You can also extract data from CDP’s Calculated Insights objects to an external third-party system using the Calculated Insights API. Below is an example of using SQL with calculated insights. In this example, email engagement data found within Marketing Cloud is extracted and grouped with unified profile data in CDP.
This concludes our post on some of the cool features of the Marketing Cloud Customer Data Platform for developers. You should now understand some of the APIs, connectors, and SDKs that are available for you to use for custom development. And for those curious to know more, we will dive deeper into Calculated Insights in another blog post soon.
Please check out the resources below to further extend your knowledge on the topics mentioned in this blog post.
About the author
Danielle Larregui is a Senior Developer Advocate at Salesforce focusing on the Marketing Cloud platform. She enjoys digital marketing, user experience design, user interface design, and mobile development. You can follow her on Twitter @DnLarregui.