function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Andrew B 1Andrew B 1 

Send contacts to ZohoCRM

I am trying to create an integration in salesforce that will send contacts to Zoho CRM.

I see the trailhead (https://trailhead.salesforce.com/en/modules/apex_integration_services/units/apex_integration_rest_callouts) talks about REST Callouts, but not sure how to send contacts to Zoho CRM. I created an account on the site but the google searches, docs, and vids always seem to point to using a tool like BedrockData. 

Not sure really where to start. Do I use this to connect to zoho? request.setEndpoint('https://crm.zoho.com/crm/private/xml/Contacts/???');
and  request.setMethod('POST'); ?
and then in  request.setBody(  <--- I put the fields for the contact?
I don't see where to put the API key? [also is this where I get it in the first place ? https://crm.zoho.com/crm/ShowSetup.do?tab=webInteg&subTab=api&action=developerapi ]
Carol LoudCarol Loud
Another option to integrate Zoho contacts into Salesforce is to use Skyvia (https://skyvia.com/data-integration/integrate-salesforce-zoho-crm). It is a no code SaaS.
sara deansara dean
To send contacts from Salesforce to Zoho CRM via REST API, you will need to follow these steps:
Obtain the Zoho CRM API key: You can obtain the API key by navigating to the Zoho CRM website and clicking on Setup -> Developer Space -> APIs. From there, you can generate an authentication token that you will use in your REST callout.  https://www.mygeorgiasouthern.org/
Create a REST callout in Apex: You can create a REST callout in Apex by using the HttpRequest and Http classes. In the HttpRequest, you will set the endpoint URL to the Zoho CRM API endpoint for creating contacts. You will also set the HTTP method to POST, and add the authentication token to the request header. In the request body, you will add the details for the contact you want to create.
Test the REST callout: Before you run the REST callout from Salesforce, you can test it using a tool like Postman to ensure that it is working correctly. Once you have confirmed that the REST callout is working, you can integrate it into your Salesforce application.
Here is a sample code snippet that demonstrates how to create a REST callout to Zoho CRM:

HttpRequest req = new HttpRequest();
req.setEndpoint('https://crm.zoho.com/crm/private/json/Contacts/insertRecords');
req.setMethod('POST');
req.setHeader('Content-Type', 'application/json');
req.setHeader('Authorization', 'Zoho-authtoken <your-auth-token>');

String jsonBody = '{"data":[{"First Name":"John","Last Name":"Doe","Email":"john.doe@example.com"}]}';
req.setBody(jsonBody);

Http http = new Http();
HttpResponse res = http.send(req);