In this blog, let us understand how to integrate Salesforce CRM data into Sitecore CMS using Sitecore Connector Module.
All the steps described for MS Dynamics CRM integration with Sitecore [here] also applies to Salesforce integration except few steps mentioned below.
1. Create Salesforce developer account:
https://developer.salesforce.com/signup?d=70130000000td6N
2. Create test contacts on the Salesforce developer portal
3. Create a connected app and generate Token, Client ID and Secretkey as explained in the installation guide at: https://dev.sitecore.net/Downloads/Salesforce_Connect/3x/Sitecore_Connect_for_Salesforce_CRM_300.aspx
4. Download and install Salesforce connector as explained at https://dev.sitecore.net/Downloads/Salesforce_Connect/3x/Sitecore_Connect_for_Salesforce_CRM_300.aspx
5. Generate and update the Salesforce connector connectionstring as shown below.
<!-- Salesforce CRM Connect-->
<add name="mysalesforce" connectionString="user id=lakshman@xxxx.com;passwordXXXXX;client id=xxxxxxxxxx;secret key=xxxxxxxx;security token=xxxxxxxx" />
6.Create a Salesforce Tenant in Sitecore and configure the endpoints as explained in the MS dynamics page.
7. Generate and deploy the xConnect model into xConnect instance as explained in the MSDynamics integration.
8. Run the Pipeline batch “Salesforce Contacts to xConnect Sync”, once the execution is completed, verify the data imported in the xDB and experience profile as explained in MS Dynamics integration.
Accessing Salesforce data using REST API’s
Salesforce exposes numerous REST API’s to connect with external systems, The API’s list can be found here https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_list.htm
In order to access any Salesforce REST API, AccesToken must be passed along with the request. Accestoken should be generated by calling the salesforce authentication API https://login.salesforce.com/services/oauth2/token by passing username, password, ClientID and Secretkey as shown below.
The access_token generated by the above step should be used for accessing any other Salesforce REST API.
Contact API: https://ap15.salesforce.com/services/data/v36.0/sobjects/contact
Lead API: https://ap15.salesforce.com/services/data/v36.0/sobjects/Lead/
Headers:
https://ap15.salesforce.com/services/data/v36.0/sobjects/Lead/
Content-Type: application/x-www-form-urlencoded
Authorization: OAuth 00D2v000002Hdtr!ARcAQOPlNrWWxbPc0ZhaeXezU_LDOuV3mdp6k7raJp2oiZ0FWzoKhZBv8UabyR_feX9sExHqUkTLI0nyUf_V8r28XCj44VXV
Note: Salesforce CRM integration has been done as part of the StarterKit Project, In order to verify it, login to StarterKit CM instance [https://{Instance}/sitecore/login ] and navigate to the pipeline " /sitecore/system/Data Exchange/Salesforce Tenant/Pipeline Batches/Salesforce Contacts to xConnect Sync " and execute it. once the execution completed, you can verify the results in xDB or experience profile as explained above.
Happy Learning 😀
All the steps described for MS Dynamics CRM integration with Sitecore [here] also applies to Salesforce integration except few steps mentioned below.
1. Create Salesforce developer account:
https://developer.salesforce.com/signup?d=70130000000td6N
2. Create test contacts on the Salesforce developer portal
3. Create a connected app and generate Token, Client ID and Secretkey as explained in the installation guide at: https://dev.sitecore.net/Downloads/Salesforce_Connect/3x/Sitecore_Connect_for_Salesforce_CRM_300.aspx
4. Download and install Salesforce connector as explained at https://dev.sitecore.net/Downloads/Salesforce_Connect/3x/Sitecore_Connect_for_Salesforce_CRM_300.aspx
5. Generate and update the Salesforce connector connectionstring as shown below.
<!-- Salesforce CRM Connect-->
<add name="mysalesforce" connectionString="user id=lakshman@xxxx.com;passwordXXXXX;client id=xxxxxxxxxx;secret key=xxxxxxxx;security token=xxxxxxxx" />
6.Create a Salesforce Tenant in Sitecore and configure the endpoints as explained in the MS dynamics page.
7. Generate and deploy the xConnect model into xConnect instance as explained in the MSDynamics integration.
8. Run the Pipeline batch “Salesforce Contacts to xConnect Sync”, once the execution is completed, verify the data imported in the xDB and experience profile as explained in MS Dynamics integration.
Accessing Salesforce data using REST API’s
Salesforce exposes numerous REST API’s to connect with external systems, The API’s list can be found here https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_list.htm
In order to access any Salesforce REST API, AccesToken must be passed along with the request. Accestoken should be generated by calling the salesforce authentication API https://login.salesforce.com/services/oauth2/token by passing username, password, ClientID and Secretkey as shown below.
The access_token generated by the above step should be used for accessing any other Salesforce REST API.
Contact API: https://ap15.salesforce.com/services/data/v36.0/sobjects/contact
Lead API: https://ap15.salesforce.com/services/data/v36.0/sobjects/Lead/
Headers:
https://ap15.salesforce.com/services/data/v36.0/sobjects/Lead/
Content-Type: application/x-www-form-urlencoded
Authorization: OAuth 00D2v000002Hdtr!ARcAQOPlNrWWxbPc0ZhaeXezU_LDOuV3mdp6k7raJp2oiZ0FWzoKhZBv8UabyR_feX9sExHqUkTLI0nyUf_V8r28XCj44VXV
Note: Salesforce CRM integration has been done as part of the StarterKit Project, In order to verify it, login to StarterKit CM instance [https://{Instance}/sitecore/login ] and navigate to the pipeline " /sitecore/system/Data Exchange/Salesforce Tenant/Pipeline Batches/Salesforce Contacts to xConnect Sync " and execute it. once the execution completed, you can verify the results in xDB or experience profile as explained above.
Happy Learning 😀
No comments:
Post a Comment
Please share your thoughts......