.NET Connection String for Zoho CRM
Connection strings are the foundation for establishing reliable and efficient communication between the application and the data source. They define the necessary connection parameters and enable smooth data exchange. This guideline is dedicated to Zoho CRM connection strings that will be used for establishing a connection with .NET or C# applications.
Zoho CRM connection strings
Use the below code snippet to create a connection to an existing Zoho CRM account dynamically (make sure to replace placeholders with your actual Zoho CRM credentials).
using Devart.Data.ZohoCRM;
…
string domain = "crm.zoho.com";
string clientId = "**********";
string clientSecret = "**********";
string refreshToken = "**********";
string LicenseKey = "**********";
string connectionString = $"APIVersion=V2;ClientId={clientId};ClientSecret={clientSecret};RefreshToken={refreshToken};LicenseKey={LicenseKey};";
Main connection properties
The following table lists the valid names for values within the Zoho CRM connection strings.
| Name | Description |
|---|---|
| API Version | The version of Zoho CRM API to use. Note that API v1 has already reached End-of-Life. |
| Domain | Zoho CRM domain to connect to: crm.zoho.com or crm.zoho.eu or crm.zoho.com.cn or crm.zoho.in or crm.zoho.com.au. |
| Client Id | The string that uniquely identifies a Zoho CRM company. |
| Client Secret | A secret code, mapped to a Zoho CRM client application. This parameter is used for connecting via API v2, and is filled automatically when you perform Web Login. |
| Refresh Token | Zoho CRM OAuth refresh token, used for connecting via API v2. |
| License Key | The license key of dotConnect for Zoho CRM. |
Advanced connection properties
The table below provides additional valid names for values used in Zoho CRM connection strings.
| Name | Description |
|---|---|
| Enable Non Approved Records | Defines whether an app can obtain the records, which are not approved. |
| NormalizeDbNames | Performs the normalization of database names. |
| Query API | Allows for querying Zoho CRM data using COQL (CRM Object Query Language) with increased speed. |
| SuppressExtendedRequests | Reduces the number of API calls. Enabling this option prevents incremental updates for objects that include the CreatedDate and UpdatedDate fields. |
| Use Display Name For Custom Tables | Determines whether display names are used to access custom Zoho CRM modules and returned by the provider instead of the module names. |
| Use Display Name For Tables | Defines what names are used to access Zoho CRM modules for API v4 and custom Zoho CRM modules for API v2. |
| Connection Timeout | Time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error. The default value is 15. |
| Default Command Timeout | Time (in seconds) to wait for the execution of a command before terminating the attempt and generating an error. A value of 0 indicates no limit. |
| Connection Lifetime | Compares the connection creation time with the current time when a connection is returned to the pool. The connection is destroyed if that time span (in seconds) exceeds the value specified by Connection Lifetime. The default value is 0 (connection always returns to the pool). |
| Max Pool Size | The maximum number of connections allowed in the pool. The default value is 100. Note that setting the Max Pool Size value of the ConnectionString can affect performance. |
| Min Pool Size | The minimum number of connections allowed in the pool. The default value is 0. |
| Pooling | If true, by default, the ZohoConnection object is drawn from the appropriate pool or is created and added to the appropriate pool. |
| Provider Behavior | Specifies the provider behavior. |
| Initialization Command | Specifies the data source-specific command that should be executed immediately after establishing the connection. |
| Run Once Command | Specifies the command to execute when the connection is first opened. This command is not executed when the connection is retrieved from the pool. |
| Proxy Host | The host name or IP address of the proxy server. |
| Proxy User | The proxy server account name. |
| Proxy Password | The password for the proxy server account. |
| Proxy Port | The port number of the proxy server. The default value is 3128. |
| Persist Security Info | Indicates whether security-sensitive information, such as passwords, is excluded from the connection if it is currently open or has been opened previously. |
Conclusion
Configuring the correct connection strings is essential for efficient integration between your application and the data source. This article provides the connection code and guidelines for creating complex connection strings for .NET or C# applications that use Zoho CRM as the data source.
Data connectivity challenges can be easily addressed with dotConnect for Zoho CRM, an ADO.NET-based data provider that enables developers to connect to and manipulate data from Zoho CRM using standard ADO.NET technologies. You can try dotConnect for Zoho CRM with a fully functional 30-day free trial, giving you the opportunity to see it in action under real-world conditions.