SF Callouts in Azure PaaS

One of the commonly used features of the S4S Analytics integration, is to make available a Contact or Lead’s Page Visits

We do not store all the page visits in Salesforce!

A Salesforce Lead or Contact is linked to Sitecore xDB, and the visits can be retrieved in real-time using a Salesforce callout:

This is one visit in the Contact's history. You can see Goal and Profile scoring has already been uploaded to Salesforce. But there are 6 Page Views associated…. do you want to see them? Click the View Page History button.

So how do we enable this Salesforce callout into Azure PaaS?

Two methods: 1. your site is already open to the world, in which case the SF callout will be able to reach its destination. Be sure to configure api key on both ends to tighten security around access, or

2. your site is not open to the world, but you want to allow in the SF callout:

The easiest way is to determine the IP address of the callout. You can do this in Azure by enabling logging:

and then viewing the logs while triggering the View Page History button. (use your favorite tool, but in VS you can right click the site and “View Streaming Logs”

Make sure the setting includes or is set to Web Server logs.

After triggering the Salesforce Callout, just like looking in your IIS logs on a local or cloud VM instance, you will see the callout come in such as the following:

Web server:2020-10-14 21:51:02 SITECORE-559205-SINGLE POST /UpdateEntityAnalytics.asmx X-ARR-LOG-ID=f0fc651e-a6e3-4ead-9403-4c51795662d0 443 - 101.53.164.8 SFDC-Callout/49.0

You can then proceed to lock down the SF callout to this IP address. For example to allow this Salesforce IP

Next Step

https://fuseit.atlassian.net/wiki/spaces/S4S/pages/316473419

Steps