Thursday 9 February 2017

Salesforce Web2Lead Endpoint Change and TLS 1.0

One of my client has issue with utilizing the Salesforce Web2Lead service whether the code no longer creates lead in Salesforce. After looking into it further, there are actually couple of issues.

Firstly I guess most Salesforce solution provider should have already been notified by Salesforce that to provide better service, Salesforce is planning to change the service endpoints for Web-to-Case and Web-to-Lead, as mentioned in the following knowledge base article:

https://help.salesforce.com/articleView?eid=ss-tc&id=Updating-the-Web-to-Case-and-Web-to-Lead-Endpoint-URL&language=en_US&type=1

So all the code/configuration that refers to the old endpoints such as:

  • https://www.salesforce.com/servlet/servlet.WebToLead, or
  • https://www.salesforce.com/servlet/servlet.WebToCase
Will need to change to:
  • https://webto.salesforce.com/servlet/servlet.WebToLead, or
  • https://webto.salesforce.com/servlet/servlet.WebToCase
The old endpoints will no longer work after planned time from Jun 2017.

The second issue is that Salesforce has disabled support for TLS 1.0 (https://help.salesforce.com/articleView?id=000221207&type=1) therefore depending on how the integration is done, you will need to update the code or configurations accordingly.

As we are using backend .NET code (4.5.x) I have added the code to select the highest version when possible right before we call the Salesforce service using HttpClient:

    using (var client = new HttpClient())
    {
        System.Net.ServicePointManager.SecurityProtocol = 
            System.Net.SecurityProtocolType.Tls12 | 
            System.Net.SecurityProtocolType.Tls11 | 
            System.Net.SecurityProtocolType.Tls;
        // ...
    }
 
If the integration is done by using a static form on a web page (with form action) then the user's browser needs to have TLS 1.0+ support. Refer to the link above to know how to enable TLS 1.1+ on supported browsers.

No comments:

Post a Comment