Hi All, Hope you are well. So in today's blog, I am gonna talk about Salesforce Integration with InfusionSoft.
For those who are thinking what is InfusionSoft? Infusionsoft is a one-stop solution for advanced marketing and sales automation, fully customizable campaigns and powerful integration.
So recently I have got a chance to integrate Infusion Soft With Salesforce. In this project, we have integrated Salesforce with third-party Infusion soft using REST APIs and gives salesforce users a seamless experience with which they can manage/create/update tables of infusion soft directly from salesforce. Also, we have automated the process with which all updates from salesforce auto-sync to Infusionsoft on a regular interval. today I am gonna share with you guys. Let's start!
Infusion soft REST API gives third party access to tables using OAuth2 Authorization. The API Endpoints documented in InfusionSoft are Restful in nature. They use common HTTP methods to call like Get, Put , Post etc. Each table has its own unique API endpoint with which it could be accessed based on OAuth tokens authorization.
Also, It provides Webhooks through which third party systems can get notifications on any changes on the infusion soft table.
Steps For Establishing Authorized Connection With InfusionSoft
STEP 1: Create an account and register a connect application
In this process user need to signup to keap developer account and through simple steps
STEP 2: Copy your keys
After registration user need to copy its clientid and client secret which would be used later while authentication of thirdparty application with salesforce
STEP 3: Develop An Application
Since we have client id , client secret now user can make a callout to third-party for getting access token. Once you get an access token , user can make callout for connecting with Infusion Soft tables.
Step 4: Refresh Access Token
If access token is expired then user can request a new access token using code received while fetch access token from system. With this you will get new access token and new code which need to be stored in Custom Settings of Salesforce to use in future.
So one of our project requirements was to sync all contact updates from Salesforce to Infusion Soft automatically. We took the following steps to achieve this integration
Infusion Soft Field Mapping - Custom Metadata
We have created custom metadata in Salesforce which will store field names of Salesforce Vs Field Name of Infusion Soft on a record.
Why we have created this because we would like to deliver this application scalable so if a new field is being added at Salesforce end or Infusionsoft end or If the user needs to update the existing mapping then that can be easily handled without changing code.
Infusion Soft Security Credentials - Protected Custom Setting
Next we have created a custom setting to store all security credentials like username, password, access token, refresh tokens etc.
It keeps on updating automatically if anytime access token expires, also it updates a date field which will show last synced date.
Contact Trigger To Register Any Change Real TIme
Since we need to sync all updates realtime so we have written a trigger on contact object which will register any change on contact. It will call an async method which will call Infusion soft API endpoint to update the contact using security tokens stored in the custom setting.
I would love to hear from you 🙂
With this project, we have developed an application that would connect Salesforce with InfusionSoft Bi-Directionally. Let me know if you got any query on this...