In this week’s Tech Tuesday we will go over the steps to resolve issues with a SalesForce real-time integration.

Common Problems

  • The real time map does not run after creating or updating a record in SalesForce.
    • Have you registered the map?
  • Map registration fails.
    • Check the SalesForce Credentials entered on the SalesForce Connector.
    • The user assigned for Administration Security must have the ‘Modify All Data’ permission in SalesForce security.
  • Record is being Filtered.
    • Open the real time data source and check the ‘Restrict Columns’ button includes the field changed.
  • Apex Trigger Failed.
  • The SmartConnect WCF Service is not accessible to SalesForce.
    • Check the Web Service Settings section below.
  • The SmartConnect WCF Service was not added as a Remote Site.
    • Add the full WCF URL to SalesForce > Setup > Security > Remote Site Settings.
  • Blank error message when registering a SalesForce real-time map.
    • This means when SmartConnect attempted to create the Triggers and Classes it failed to pass Code Coverage. There are two approaches to resolve Code Coverage issues. 
      1. Find the error in the Developer Logs and resolve the issue.
      2. Point SmartConnect to a SalesForce sandbox instance, register all the maps so the Apex Triggers and Apex Class are created, and Deploy them to production manually. 

Understanding the Procedure for SalesForce Real Time Data Sources

Here is a breakdown of the events that occur after a record is Created/Updated in SalesForce

  1. A record is Created/Updated on the SalesForce Object that is setup as a real-time data source.
  2. An Apex Trigger is executed on Save. The trigger name will be like: eOne_SC_RTDS_Account_C
  3. The Apex Trigger executes an Apex Class and provides the Id of the record that was Created/Updated.
  4. The Apex Class ‘eOne_SC_RTDS’ will create a new WCF web request to send to SmartConnect.
  5. The SmartConnect Web Server receives the information from SalesForce, and executes all maps registered to the real-time data source.

Web Service Settings

SalesForce will need access to the SmartConnect WCF service, so it can make a web call to inform SmartConnect that a real-time event has occurred.

Developer Console Log of Event

Developer Console Log of Event

The web call from SalesForce will look as follows:

http://<ServerAddress>:5557/smartconnect.svc/sf/d2839035-5084-4b26-99d5-a943004e3267/update

The communication between SalesForce and SmartConnect is dependent on this connection succeeding.

  1. Make sure the WCF service is available outside the local network. For development purposes we recommend making the service available to all IP addresses, to verify it is available when pinged from an external machine.
  2. Once the service has been verified, the server can be set to only allow SalesForce IP addresses.
  3. Next the URL needs to be marked as a safe Remote Site in SalesForce, by adding it to SalesForce > Setup > Security > Remote Site Settings.

Event Viewer

If the event is succeeding in SalesForce, but the map isn’t running/succeeding. Check the Event Viewer on the IIS machine.

Event Viewer > Applications and Services Logs > SmartConnect