Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Current »

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 the Customer ID and redirect URL (which are set in the S4SNow tab in Salesforce) in order to display 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
      LoadPreviousVisitSalesforce.LoadPreviousVisit();
}

Next

Congratulations, you have finished installing this module.

  • No labels