Reference

Endpoint Upsert [Dynamic Endpoint] (Update or Insert)


Name

upsert_[dynamic_endpoint_name]

Description

No description available

Related Tables

[Dynamic Table]

Parameters

Parameter Required Options
Name: Triggers

Label: Triggers

Name: Duplicate_Check_Fields

Label: Duplicate_Check_Fields

Option Value
By Email Email
By Phone Phone
By Mobile Mobile

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
duplicate_field DT_WSTR nvarchar(255) 255
expected_data_type DT_WSTR nvarchar(255) 255
api_name DT_WSTR nvarchar(255) 255
modified_time DT_DBTIMESTAMP datetime
modified_by_name DT_WSTR nvarchar(255) 255
modified_by_id DT_WSTR nvarchar(255) 255
created_time DT_DBTIMESTAMP datetime
created_by_name DT_WSTR nvarchar(255) 255
created_by_id DT_WSTR nvarchar(255) 255
If the column you are looking for is missing, consider customizing Zoho CRM Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
-Dynamic- DT_WSTR nvarchar(4000) 4000
Required columns that you need to supply are bolded.

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 upsert [dynamic endpoint]:

API Destination - Zoho CRM
Zoho CRM Connector can be used to integrate Zoho CRM API in your App / BI Tools. You can exchange data on Accounts, Leads, Contacts and many other modules.
Zoho CRM
[Dynamic Table]
Upsert
Optional Parameters
Triggers "approval","workflow","blueprint"
Duplicate_Check_Fields Email
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Upsert account record (Update or Insert - based on unique field(s) for module)

UPSERT INTO Accounts(Account_Name, Phone) VALUES('Company ABC','111-567-8888') WITH(Output=1)

Upsert lead record (Update or Insert - based on unique field(s) for module)

UPSERT INTO Leads(Last_Name, Email) VALUES('Patel','zpatel@abc.com') WITH(Output=1)

UPSERT (Update or insert) account(s) in BULK (read / write from external source)

This examples shows how to use SOURCE clause to read data from MS SQL Server (or other external system) and send data to Zoho using Bulk API. Record uniqueness is checked based on Unique field setup for module (i.e. email, account name, phone etc)

UPSERT 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
   '
)

upsert_[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:

Upsert account record (Update or Insert - based on unique field(s) for module)

DECLARE @MyQuery NVARCHAR(MAX) = 'UPSERT INTO Accounts(Account_Name, Phone) VALUES(''Company ABC'',''111-567-8888'') WITH(Output=1)';

EXEC (@MyQuery) AT [LS_TO_ZOHO_CRM_IN_GATEWAY];

Upsert lead record (Update or Insert - based on unique field(s) for module)

DECLARE @MyQuery NVARCHAR(MAX) = 'UPSERT INTO Leads(Last_Name, Email) VALUES(''Patel'',''zpatel@abc.com'') WITH(Output=1)';

EXEC (@MyQuery) AT [LS_TO_ZOHO_CRM_IN_GATEWAY];

UPSERT (Update or insert) account(s) in BULK (read / write from external source)

This examples shows how to use SOURCE clause to read data from MS SQL Server (or other external system) and send data to Zoho using Bulk API. Record uniqueness is checked based on Unique field setup for module (i.e. email, account name, phone etc)

DECLARE @MyQuery NVARCHAR(MAX) = 'UPSERT 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];

upsert_[dynamic_endpoint_name] endpoint belongs to [Dynamic Table] table(s), and can therefore be used via those table(s).