Display Customer ID and configure redirect URL in your website

To identify the visitors (customers) on the website you will need to display a Customer ID which generated from S4S Now in your website. Let’s say you decide to display the Customer ID in the website footer as seen below:

S4S Now exposes two static methods to retrieve Customer ID and Redirect URL (which set from the S4SNow tab in Salesforce) in order to display on the website.

  • S4SNowUtility.GetRandomNumberFromSession();
  • S4SNowUtility.GetRedirectUrlFromS4SFacet();

You need to reference the FuseIT.S4SNow dll from your code before you call above methods.

A standard MVC view example that displays a Customer ID as a link to the redirect URL, which set from Salesforce, can be seen below.

@using FuseIT.S4SNow

<a href="@S4SNowUtility.GetRedirectUrlFromS4SFacet()" target="_blank">@S4SNowUtility.GetRandomNumberFromSession()</a>

IMPORTANT: For a smooth personalization experience, you need to include the FuseITLoadPreviousVisit sublayout into your website's main layout. More information about FuseITLoadPreviousVisit can be found here.

If you have MVC based website you can add the following code block into your layout.

@using FuseIT.S4S.WebToSalesforce;

      //Load previous visit from salesforce


Congratulations, you have finished installing this module.