Zoho CRM connector
Create a record in a Zoho CRM module for each drop.
Important
Example to adapt. In this version, the connector sends no manifest data: it creates a record that only contains a description and the request identifier. Use it as a starting point, preferably by moving its logic into a handler.
| Identifier | zoho-crm |
| Address | https://<server>/api/webhook/zoho-crm |
Settings
Connector:zoho-crm section of appsettings.json:
| Key | Default | Effect |
|---|---|---|
Domain |
https://www.zohoapis.com |
Zoho CRM API domain. |
TargetModule |
Leads |
Module in which to create the record. |
AccountsDomain |
https://accounts.zoho.com |
Zoho accounts domain, to obtain the token. |
FieldMappings |
none | ZohoField:Path,... list. In this version, each field receives the text Mapped from: {path}, not the manifest value. |
Use the domains of your Zoho account's data center.
Secrets
Under Connectors.zoho-crm.Secrets: ClientId, ClientSecret and RefreshToken, from a client created in the Zoho API console, with a token that allows creating records in the target module.
What it does
- It obtains an access token from the refresh token, at
{AccountsDomain}/oauth/v2/token. - It sends
POST {Domain}/crm/v3/{TargetModule}, with theAuthorization: Zoho-oauthtoken <token>header and the body{"data": [<record>]}. - The record contains:
Description:Synchronized from SESAR at <date>, in UTC time;SESAR_Request_Id: the request identifier, which must exist as a custom field in the module;- the
FieldMappingsfields.
- On success, the record's Zoho identifier is returned in
ExternalReferenceId.
The target module may require other fields, for example a name for leads: without them, Zoho refuses the creation.
Test
POST /api/connectors/zoho-crm/test only checks that an access token can be obtained, without calling the CRM.
Adapt it
In your handler, use OAuth2RefreshTokenHelper.ForZoho, then build the record from the manifest: subject (GetSubject), recipients (GetRecipientEmails), number of files (GetFileCount). See Authentication to your systems.
On failure, the connector's response contains Zoho's raw response: it is only read by SESAR, but do not log it as is.