1

I have the browser id of the guest in Sitecore CDP and Personalize, but I want to update the guest using the REST APIs. To update the guest using the REST APIs I require the guest ref. Is there a way to get the guess ref using the browser id?

1 Answer 1

2

To get the guest ref using the id you can:

Use the JavaScript Library

Boxever.browserShow(Boxever.browser_id,Boxever.client_key,function(data){
    console.log(data.customer.ref);
  }, 'json');

or

Use the REST Locate endpoint

You can use the Guest REST API to perform the locate guests function to return guests using their email address or other identifying information. After you perform the locate guests function, you can use the guestRef included in the response to retrieve the full guest record.

$ curl -H "Accept: application/json" \
        "https://{apiEndpoint}/v2/guests?email=jack.smith@boxever.com"

REST Locate Endpoint : https://doc.sitecore.com/cdp/en/developers/sitecore-customer-data-platform--data-model-2-1/use-the-locate-guests-function-in-sitecore-cdp-rest-api.html or

Use a Full Stack Interactive Experience

Create a Full Stack Interactive Experience that given the Browser Id returns the guest ref.

Full Stack Interactive experiences are available as part of Sitecore Personalize. Therefore for organizations with Sitecore CDP only, this solution is not available.

Full Stack Interactive Experiences Endpoint : https://doc.sitecore.com/cdp/en/developers/sitecore-customer-data-platform--data-model-2-1/sitecore-cdp-flow-execution-data-model-rest-api.html

Full Stack Interactive Experiences Overview: https://doc.sitecore.com/cdp/en/users/sitecore-personalize/composing-the-api-response-for-an-interactive-experiment.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.