Sitecore CDP – Facing trouble converting guests into customers?

Featured Image For Guests To Customers

In recent times I have been exploring Sitecore CDP and playing around on the Sandbox environment provided by Sitecore. While in there everything looks wonderful and works if you implement by referring to the documentation provided by the Sitecore team.

However, once I had access to the vendor-specific sandbox, things turned upside down as I couldn’t even identify visitors on the website using the same JS code that worked on the initial sandbox environment.

Today I am here to explain my journey in form of this article to troubleshoot the issue of converting guests into customers using IDENTITY events.

Use Case :

With the initial sandbox environment, I triggered the IDENTITY event to Sitecore CDP to convert guest/visitor to the customer using the below code. (documentation).

{
    "channel": "WEB",
    "type": "IDENTITY",
    "language": "EN",
    "currency": "USD",
    "page": _currentPageName,
    "pos": "sitecore.madhav.blog",
    "browser_id": "5b5e9dbf-ef40-4369-bce4-3e8a539bc6be",
    "email": _identifiedEmail,
    "identifiers": [{
        "provider": "Epam",
        "id": "123456"
    }]
}

When I followed the same procedure (same code as above) on the vendor-specific sandbox I did see the trouble in converting guests into customers even after the IDENTITY event is successful. For example, consider the following example.

Visitor guest type
A visitor named iRobot is still of type Visitor after Identifying. (Snap below)
Visitor guest type events
Events triggered on guest shows IDENTITY and still, Visitor is not converted to the customer

Troubleshooting:

After multiple tries with syntaxes and debugging, I need to shout out to Sarah who is a wonderful trainer and helped to provide initial ideas of tweaking syntaxes for the IDENTITY event.

So coming back to our use case, it seemed that whenever sandbox is created for customers, it’s set up with identifiers that are requested by customers and after creation, even the “Administrator” role would not be able to change it. The only way to change identifiers is to contact Sitecore.

In order to verify, I did a quick checkup on my vendor-specific sandbox with identifiers that are set up. We can do that by going to System Settings -> Company Information -> Click on the gear icon on the top right. ( If you do not see the gear icon you must enable the “debug” feature flag which you will find under Your name => Feature Flags )

Once you do that you can see a pop-up like below and then we go to “Identity index Configurations“.

Roled-based Company System Settings.
Roled-based Company System Settings.

As we see above, ‘identifiers.email‘ is clearly specified which meant email when sent part of the identifiers object will be used to identify the Visitor to convert them to Customer. So that explained we need to pass email inside Identifiers property which was not the case with my Sandbox Environment code, So I tweaked my code to look like below with the email as part of identifiers property array object.

{
    "channel": "WEB",
    "type": "IDENTITY",
    "language": "EN",
    "currency": "USD",
    "page": _currentPageName,
    "pos": "sitecore.madhav.blog",
    "browser_id": "5b5e9dbf-ef40-4369-bce4-3e8a539bc6be",
    "identifiers": [{
        "provider": "Epam",
        "id": "123456",
        "email" :_identifiedEmail
    }]
}

At this stage, I was pretty confident it would work because the configuration showed email is identified if we request it as part of identifiers object.

OhNoNotAgain

After modifying the code and being confident that would work, I was back at Square 1. So finally after multiple tries with varying syntaxes on identifiers got it working. Below is the final verdict/ explanation along with a snapshot of the code.

  1. Red Boxed email : As you see in snapshot below , from our initial code , when we provide value of email property to CDP, you would see email property populated on customer identified.
  2. Green Boxed identifiers : By multiple trial and error, final code which worked was by setting provider =”email” there by saying CDP email is identifier property and also by setting id= “_identifiedEmail” . By providing these value I was able to identify customer from visitor in other words Visitor was converted to Customer after this modification on IDENTITY event.
Identity Event Final Code

Let me know your thoughts in the comments.

Things you might also be interested in :
  1. How to achieve User Experience personalization using Sitecore CDP .
  2. What are performance guidelines to follow when we design Decision Model on Sitecore CDP.
  3. Take aways from Sitecore CDP and Personalize Certification.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *