Integrate PWA Kit with Data Cloud

To unify your customer data on Salesforce, connect your Progressive Web App (PWA) Kit storefront to Data Cloud. After you set your store as a data source, Data Cloud receives engagement events, which are triggered by shopper activities in your storefront. These engagement events are supported.

  • ViewPage — A shopper views a page.
  • ViewProduct — A shopper views a product detail page.
  • ViewCategory — A shopper views a category or listing page.
  • ViewSearchResults — A shopper performs a product search.
  • ViewRecommendations — A shopper views personalized recommendations.

To use Data Cloud with PWA Kit, you must first set up your own production instance of Data Cloud. See Get Started Using Data Cloud in Salesforce Help.

  1. To connect your storefront to Data Cloud, complete the instructions from Connect a Website or Mobile App to Data Cloud in the Data Cloud Integration Guide. When the New Connection window asks what you’re connecting to, select A Custom Website.
  2. To start sending data from your storefront to Data Cloud, complete the instructions from Create a Web or Mobile App Data Stream in the Data Cloud Integration Guide.
  3. Get the Data Cloud tenant ID.
    1. In Data Cloud, click Setup at the top of the page, and then select Data Cloud Setup.
    2. In the Your Home Org Details section, copy and save the tenant ID from the tenant endpoint. The tenant ID is the string preceding the first period. For example, <tenantId>.c360a.salesforce.com.
  4. Get the Data Cloud app source ID.
    1. Go back to Data Cloud Setup.
    2. In the Set Up Data Cloud section, click Connect Other Data Sources | Website and Mobile App.
    3. Select the connection for your PWA Kit storefront.
    4. In the Integration Guide section, copy and save the app source ID from the script. The app source ID is the string preceding /scripts. For example, https://cdn.pc-rnd.c360a.salesforce.com/beacon/c360a/<appSourceId>scripts/c360a.min.js.
  5. Update your PWA Kit project’s configuration file with the Data Cloud tenant and app source IDs from steps 3 and 4. Here’s an example configuration file with the IDs populated:
  1. In Data Cloud, click Data Explorer.
  2. Select a data space.
  3. From the Object dropdown list, select Data Model Object.
  4. In the object field, search for and select Website Engagement.
  5. To personalize your data view, click Edit Columns and select the columns corresponding to the data points you want to view.
  6. In your store‘s test environment, try out shopper activities: search for a product, view a product detail page, and so on.
  7. Refresh your Data Explorer tab and verify that engagement event data appears.

For more information about how B2C Commerce storefronts can integrate with Data Cloud, see Sending B2C Commerce Engagement Events to Data Cloud in Salesforce Help.