Endpoint Insert [Dynamic Endpoint]
Name
post_[dynamic_endpoint_name]
Description
Related Tables
Parameters
| Parameter | Required | Options |
|---|---|---|
|
Name:
Label: Triggers |
Output Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| id |
DT_WSTR
|
nvarchar(255)
|
255 | |
| code |
DT_WSTR
|
nvarchar(255)
|
255 | |
| message |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| status |
DT_WSTR
|
nvarchar(255)
|
255 | |
| expected_data_type |
DT_WSTR
|
nvarchar(255)
|
255 | |
| api_name |
DT_WSTR
|
nvarchar(255)
|
255 | |
| created_time |
DT_DBTIMESTAMP
|
datetime
|
||
| modified_time |
DT_DBTIMESTAMP
|
datetime
|
||
| modified_by_name |
DT_WSTR
|
nvarchar(255)
|
255 | |
| modified_by_id |
DT_WSTR
|
nvarchar(255)
|
255 | |
| created_by_name |
DT_WSTR
|
nvarchar(255)
|
255 | |
| created_by_id |
DT_WSTR
|
nvarchar(255)
|
255 |
Input Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| -Dynamic- |
DT_WSTR
|
nvarchar(4000)
|
4000 |
Examples
SSIS
Use Zoho CRM Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Destination
This Endpoint belongs to the [Dynamic Table] table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to insert [dynamic endpoint]:
| Optional Parameters | |
|---|---|
| Triggers | "approval","workflow","blueprint" |
ODBC application
Use these SQL queries in your ODBC application data source:
Create a deal with lookup fields
<p>Creates a new Deal record with lookup fields populated. This example demonstrates how to set <code>Account_Name</code>, <code>Contact_Name</code>, and <code>Owner</code> using their respective Names, IDs, or Emails during the INSERT operation.</p>
INSERT INTO Deals(
Deal_name,
Amount,
Lead_Source,
Account_Name,
Contact_Name,
Owner
)
VALUES
(
'My Test Deal Creatyed on <<FUN_NOW>>', --deal name
1000.50, --amount
'Cold Call', --lead source
'{name:"ZappySys"}', --account name or use id '{id:"1558554000030180013"}'
'{id:"1558554000089352998"}', --contact id
'{id:"1558554000089352912"}' --owner id or use email {email: "bob-the-salesman@abc.com"}
)
Create an account
<p>Creates a new Account record. This example demonstrates using the <code>INSERT INTO</code> statement to add a new account with <code>Account_Name</code> and <code>Phone</code>.</p>
INSERT INTO Accounts(Account_Name, Phone) VALUES('Company ABC','111-567-8888')
Create an account (with output)
<p>Creates a new Account record and returns the created record's details. This example uses <code>WITH(Output=1)</code> to display the result of the INSERT operation.</p>
INSERT INTO Accounts(Account_Name, Phone) VALUES('Company ABC','111-567-8888') WITH(Output=1)
Bulk create accounts using SQL Server data
<p>Creates multiple Account records in bulk using data from a SQL Server database. This example demonstrates using the <code>SOURCE</code> clause to read data from an external ODBC/OLEDB source and insert it into Zoho CRM.</p>
INSERT INTO Accounts
SOURCE(
'MSSQL' --ODBC or OLEDB
,'Data Source=localhost;Initial Catalog=Test;Integrated Security=true'
,'select ''Test Account-A'' as Account_Name,''111-111-1111'' as Phone
UNION
select ''Test Account-B'' as Account_Name,''222-222-2222'' as Phone
'
)
post_[dynamic_endpoint_name] endpoint belongs to
[Dynamic Table]
table(s), and can therefore be used via those table(s).
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Create a deal with lookup fields
<p>Creates a new Deal record with lookup fields populated. This example demonstrates how to set <code>Account_Name</code>, <code>Contact_Name</code>, and <code>Owner</code> using their respective Names, IDs, or Emails during the INSERT operation.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO Deals(
Deal_name,
Amount,
Lead_Source,
Account_Name,
Contact_Name,
Owner
)
VALUES
(
''My Test Deal Creatyed on <<FUN_NOW>>'', --deal name
1000.50, --amount
''Cold Call'', --lead source
''{name:"ZappySys"}'', --account name or use id ''{id:"1558554000030180013"}''
''{id:"1558554000089352998"}'', --contact id
''{id:"1558554000089352912"}'' --owner id or use email {email: "bob-the-salesman@abc.com"}
)';
EXEC (@MyQuery) AT [LS_TO_ZOHO_CRM_IN_GATEWAY];
Create an account
<p>Creates a new Account record. This example demonstrates using the <code>INSERT INTO</code> statement to add a new account with <code>Account_Name</code> and <code>Phone</code>.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO Accounts(Account_Name, Phone) VALUES(''Company ABC'',''111-567-8888'')';
EXEC (@MyQuery) AT [LS_TO_ZOHO_CRM_IN_GATEWAY];
Create an account (with output)
<p>Creates a new Account record and returns the created record's details. This example uses <code>WITH(Output=1)</code> to display the result of the INSERT operation.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO Accounts(Account_Name, Phone) VALUES(''Company ABC'',''111-567-8888'') WITH(Output=1)';
EXEC (@MyQuery) AT [LS_TO_ZOHO_CRM_IN_GATEWAY];
Bulk create accounts using SQL Server data
<p>Creates multiple Account records in bulk using data from a SQL Server database. This example demonstrates using the <code>SOURCE</code> clause to read data from an external ODBC/OLEDB source and insert it into Zoho CRM.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO Accounts
SOURCE(
''MSSQL'' --ODBC or OLEDB
,''Data Source=localhost;Initial Catalog=Test;Integrated Security=true''
,''select ''''Test Account-A'''' as Account_Name,''''111-111-1111'''' as Phone
UNION
select ''''Test Account-B'''' as Account_Name,''''222-222-2222'''' as Phone
''
)';
EXEC (@MyQuery) AT [LS_TO_ZOHO_CRM_IN_GATEWAY];
post_[dynamic_endpoint_name] endpoint belongs to
[Dynamic Table]
table(s), and can therefore be used via those table(s).