Join us in the Zoho Extensions Development Bootcamp scheduled across cities in India Register Now

Skip to product menu
close
  • Recent Launches
    Press Space or Enter to display list of options
EXPLORE ALL PRODUCTS

Recent Launches

New

Easy domain registration, transfer, and secured DNS management.

Try now
New

Payroll software with automated tax payments and filing.

Try now
New

Low-code IoT platform and solutions for connected businesses.

Try now
New

Business formation service to launch and grow your businesses.

Try now
New

Unified payment solution built for all businesses.

Try now
New

Comprehensive email security and archiving for every business.

Try now
Suites

Cloud-based qualitative data analysis tool.

Try now
New

Online community platform for individuals and businesses to grow their network and brand.

Try now
New

Modern retail POS to sell better, manage your entire business, and join the digital revolution.

Try now
SuitesNew

Unified project management platform for intelligent, data-driven work.

Try now
Suites

Unified platform for customer service and support teams.

Try now

Sales

CRM

Comprehensive CRM platform for customer-facing teams.

CRM
Voice

Cloud Contact Center Software for businesses.

Voice
Sign

Digital signature app for businesses.

Sign
Forms

Build online forms for every business need.

Forms
Bigin

Simple CRM for small businesses moving from spreadsheets.

Bigin
SalesIQ

Live chat app to engage and convert website visitors.

SalesIQ
Bookings

Appointment scheduling app for consultations with customers.

Bookings
RouteIQ

AI-powered ETL tool for effective data integration and movement.

RouteIQ
Thrive

Complete loyalty and affiliate management platform.

Thrive
Suites
CRM Plus

Unified platform to deliver top-notch customer experience.

CRM Plus

Marketing

Campaigns

Create, send, and track targeted email campaigns that drive sales.

Campaigns
Voice

Cloud Contact Center Software for businesses.

Voice
Sign

Digital signature app for businesses.

Sign
Forms

Build online forms for every business need.

Forms
Social

All-in-one social media management software.

Social
Survey

Design surveys to reach and interact with your audience.

Survey
SalesIQ

Live chat app to engage and convert website visitors.

SalesIQ
Sites

Online website builder with extensive customisation options.

Sites
Backstage

End-to-end event management software.

Backstage
PageSense

Website conversion optimization and personalisation platform.

PageSense
Marketing Automation

All-in-one marketing automation software.

Marketing Automation
LandingPage

Smart landing page builder to increase conversion rates

LandingPage
Webinar

Webinar platform for webcasting online webinars.

Webinar
NEW
LeadChain

Sync, manage, and convert leads across channels seamlessly.

LeadChain
NEW
Domains

Easy domain registration, transfer, and secured DNS management.

Domains
NEW
CommunitySpaces

Online community platform for individuals and businesses to grow their network and brand.

CommunitySpaces
Thrive

Complete loyalty and affiliate management platform.

Thrive
Publish

Manage all your local business listings on a single platform.

Publish
Suites
Marketing Plus

Unified marketing platform for marketing teams.

Marketing Plus

Commerce and POS

Commerce

eCommerce platform to manage and market your online store.

Commerce

Service

Desk

Helpdesk software to deliver great customer support.

Desk
Assist

Remote support and unattended remote access software.

Assist
Voice

Cloud Contact Center Software for businesses.

Voice
SalesIQ

Live chat app to engage and convert website visitors.

SalesIQ
Bookings

Appointment scheduling app for consultations with customers.

Bookings
FSM

End-to-end field service management platform for service businesses.

FSM
Lens

Interactive remote assistance software with augmented reality.

Lens
Solo

The all-in-one toolkit for solopreneurs.

Solo
Suites
Service Plus

Unified platform for customer service and support teams.

Service Plus

Finance

Books

Powerful accounting platform for growing businesses.

Books
Expense

Effortless expense reporting platform.

Expense
Sign

Digital signature app for businesses.

Sign
Inventory

Powerful stock management and inventory control software.

Inventory
FREE
Invoice

100% Free invoicing solution.

Invoice
Billing

End-to-end billing solution for your business.

Billing
NEW
Payroll

Payroll software with automated tax payments and filing.

Payroll
Commerce

eCommerce platform to manage and market your online store.

Commerce
Checkout

Collect payments online with custom branded pages.

Checkout
Practice

Practice management software for accounting firms.

Practice
Solo

The all-in-one toolkit for solopreneurs.

Solo
NEW
Payments

Unified payment solution built for all businesses.

Payments
Suites
Finance Plus

All-in-one suite to manage your operations and finances.

Finance Plus

Email, Storage, and Collaboration

Mail

Secure email service for teams of all sizes.

Mail
Voice

Cloud Contact Center Software for businesses.

Voice
Sign

Digital signature app for businesses.

Sign
WorkDrive

Online file management for teams.

WorkDrive
Bookings

Appointment scheduling app for consultations with customers.

Bookings
Cliq

Stay in touch with teams no matter where you are.

Cliq
Notebook

Beautiful home for all your notes.

Notebook
Meeting

Online meeting software for all your video conferencing & webinar needs.

Meeting
Connect

Employee experience platform to communicate, engage, and build positive employee relations.

Connect
Learn

Knowledge and learning management platform.

Learn
Office Integrator

Built in document editors for web apps.

Office Integrator
Writer

Word processor for focused writing and discussions.

Writer
TeamInbox

Shared inboxes for teams.

TeamInbox
ZeptoMail

Secure and reliable transactional email sending service.

ZeptoMail
Show

Create, edit, and share slides with a sleek presentation app.

Show
Tables

Work management tool to connect people, processes, and information.

Tables
Sheet

Spreadsheet software for collaborative teams.

Sheet
Office Suite

Powerful collaborative work platform for teams.

Office Suite
Calendar

Online business calendar to manage events and schedule appointments.

Calendar
ToDo

Collaborative task management for individuals and teams.

ToDo
FREE
PDF Editor

Collaborative online PDF editing tool.

PDF Editor
Suites
Workplace

Application suite built to improve team productivity and collaboration.

Workplace

Human Resources

Expense

Effortless expense reporting platform.

Expense
Recruit

Intuitive recruiting platform built to provide hiring solutions.

Recruit
People

Organize, automate, and simplify your HR processes.

People
Sign

Digital signature app for businesses.

Sign
NEW
Payroll

Payroll software with automated tax payments and filing.

Payroll
Shifts

Employee scheduling and time tracking app.

Shifts
Workerly

Manage temporary staffing with an employee scheduling solution.

Workerly
Suites
People Plus

Comprehensive HR platform for seamless employee experiences.

People Plus

Security and IT Management

Creator

Build custom apps to simplify business processes.

Creator
Assist

Remote support and unattended remote access software.

Assist
Vault

Online password manager for teams.

Vault
Directory

Workforce identity and access management solution for cloud businesses.

Directory
Lens

Interactive remote assistance software with augmented reality.

Lens
QEngine

Test automation software to build, manage, execute, and report testcases.

QEngine
Catalyst

Pro-code platform to build and deploy your apps.

Catalyst
RPA

Automate manual, tedious, and repetitive tasks easily.

RPA
NEW
eProtect

Comprehensive email security and archiving for every business.

eProtect
FREE
OneAuth

Secure multi-factor authenticator (MFA) for all your online accounts.

OneAuth
Toolkit

Complete resource for any admin-related lookup queries.

Toolkit

BI and Analytics

Analytics

Modern self-service BI and analytics platform.

Analytics
DataPrep

AI-powered data preparation service for your data-driven organization.

DataPrep
NEW
IoT

Harnessing IoT analytics for real-time operational intelligence.

IoT
Embedded BI

Embedded analytics and white label BI solutions, tailored for your needs.

Embedded BI

Project Management

Projects

Manage, track, and collaborate on projects with teams.

Projects
Sprints

Planning and tracking tool for scrum teams.

Sprints
BugTracker

Automatic bug tracking software for managing bugs.

BugTracker
Solo

The all-in-one toolkit for solopreneurs.

Solo
Suites
Projects Plus

Unified project management platform for intelligent, data-driven work.

Projects Plus

Developer Platforms

Creator

Build custom apps to simplify business processes.

Creator
Flow

Automate business workflows by creating smart integrations.

Flow
Office Integrator

Built in document editors for web apps.

Office Integrator
DataPrep

AI-powered data preparation service for your data-driven organization.

DataPrep
ZeptoMail

Secure and reliable transactional email sending service.

ZeptoMail
Tables

Work management tool to connect people, processes, and information.

Tables
QEngine

Test automation software to build, manage, execute, and report testcases.

QEngine
Catalyst

Pro-code platform to build and deploy your apps.

Catalyst
RPA

Automate manual, tedious, and repetitive tasks easily.

RPA
NEW
IoT

Build, deploy, and scale IoT solutions for connected businesses.

IoT
Apptics

Application analytics for all apps.

Apptics
Embedded BI

Embedded analytics and white label BI solutions, tailored for your needs.

Embedded BI

IoT

NEW
IoT

Low-code IoT platform and solutions for connected businesses.

IoT

Search Result

CRM Plus

Unified platform to deliver top-notch customer experience.

Try now
CRM Plus
Service Plus

Unified platform for customer service and support teams.

Try now
Service Plus
Finance Plus

All-in-one suite to manage your operations and finances.

Try now
Finance Plus
People Plus

Comprehensive HR platform for seamless employee experiences.

Try now
People Plus
Workplace

Application suite built to improve team productivity and collaboration.

Try now
Workplace
Marketing Plus

Unified marketing platform for marketing teams.

Try now
Marketing Plus
Projects Plus

Unified project management platform for intelligent, data-driven work.

Try now
Projects Plus
All-in-one suite

Zoho One

The Operating System for Business

Run your entire business on Zoho with our unified cloud software, designed to help you break down silos between departments and increase organizational efficiency.

TRY ZOHO ONE
Zoho Marketplace

With over 2000 ready-to-use extensions across 40+ categories, connect your favorite business tools with the Zoho products you already use.

EXPLORE MARKETPLACE
Skip to main content

insertRecords Method

 Purpose

You can use the insertRecords method to insert records into the required module in the Vertical Solution.

Important: Use the POST method to pass these parameters instead of GET method.

 Request URL

XML Format:

https://<APPDOMAIN>/crm/private/xml/Leads/insertRecords?xmlData=Your XML Data

 Auth Token

Auth Token is an encrypted alphanumeric string that is required to authenticate your CRM account credentials. A valid user's Authentication Token is necessary to access the API. When making an API request, send the authentication token in the Authorization header as shown below:

https://<APPDOMAIN>/crm/private/xml/Leads/insertRecords?xmlData=Your XML Data

Header:

Authorization=1000XXXX65.1000XXXX44.caXXXXXXXXXXXX

(See Using Authentication Token )

 Request Parameters

ParameterData TypeDescription
xmlData*XMLThis is an XML string and the format should be same as of getRecords in XML format of fetched records.
wfTriggerBooleanSet value as true to trigger the workflow rule while inserting record into CRM account. By default, this parameter is false.
duplicateCheckIntegerSet value as "1" to check the duplicate records and throw an error response or "2" to check the duplicate records, if exists, update the same.
isApprovalBooleanBy default, records are inserted directly . To keep the records in approval mode, set value as true. You can use this parameters for Leads, Contacts, and Cases module.
newFormatIntegernewFormat=1: To exclude fields with "null" values while inserting data from your CRM account.
newFormat=2: To include fields with "null" values while inserting data from your CRM account.
versionIntegerversion = 1: (Default Value) This will fetch responses based on the earlier API implementation i.e prior to the enhancements made.
version = 2: This will fetch responses based on the latest API implementation.
version = 4:This will trigger duplicate check functionality for multiple records.

* - Mandatory parameter

Note:

  • Refer the Release Notes  page to learn more about enhancements made in the API implementation.

 Duplicate Check Fields

Module NameDuplicate Check Field
LeadsEmail
ContactsEmail
AccountsAccount Name
PotentialsPotential Name
CampaignsCampaign Name
CasesSubject
ProductsProduct Name
VendorsVendor Name
QuotesSubject
SalesOrdersSubject
PurchaseOrdersSubject
InvoicesSubject

 Additional Notes

  • While inserting data to your Vertical Solution account, role-based security (Roles, Profiles, Field-level security and Data sharing rules) is applied. Hence, use the user ID with highest role(Ex: CEO) and profile (Ex: Administrator). Also make sure all fields are enabled in the Field-level security settings. For role-based security settings, see Security Administration  while generating Auth Token.
  • While inserting data, make sure the date and time are in the MM/dd/yyyy and  yyyy-MM-dd HH:mm:ss formats respectively

 Examples

 Insert records into Vertical Solution from third-party applications

URL Format:
https://<APPDOMAIN>/crm/private/xml/Leads/insertRecords?newFormat=1

XMLDATA sample:

<Leads>
<row no="1">
<FL val="Lead Source">Web Download</FL>
<FL val="Company">Your Company</FL>
<FL val="First Name">Hannah</FL>
<FL val="Last Name">Smith</FL>
<FL val="Email">testing@testing.com</FL>
<FL val="Title">Manager</FL>
<FL val="Phone">1234567890</FL>
<FL val="Home Phone">0987654321</FL>
<FL val="Other Phone">1212211212</FL>
<FL val="Fax">02927272626</FL>
<FL val="Mobile">292827622</FL>
</row>
</Leads>

 Sample Lead XMLDATA

<Leads>
<row no="1">
<FL val="SMOWNERID">2000000016714</FL>
<FL val="Lead Owner">Scott@zohotest.com</FL>
<FL val="Company">Zoho</FL>
<FL val="First Name">Peter</FL>
<FL val="Last Name">John</FL>
<FL val="Designation">CEO</FL>
<FL val="Email">john@test.com</FL>
<FL val="Phone">04422334455</FL>
<FL val="Fax">98889</FL>
<FL val="Mobile">09999999999</FL>
<FL val="Website">www.sample.com</FL>
<FL val="Lead Source">External Referral</FL>
<FL val="Lead Status">Contacted</FL>
<FL val="Industry">Financial Services</FL>
<FL val="No of Employees">100</FL>
<FL val="Annual Revenue">100.0</FL>
<FL val="Email Opt Out">true</FL>
<FL val="Skype ID">peter</FL>
<FL val="Salutation">Mr.</FL>
<FL val="Street">Street One</FL>
<FL val="City">Chennai</FL>
<FL val="State">Tamil Nadu</FL>
<FL val="Zip Code">6000001</FL>
<FL val="Country">India</FL>
<FL val="Description">Sample Description.</FL>
</row>
</Leads>

 Sample Task XMLDATA with lead lookup

<Tasks>
<row no="1">
<FL val="SMOWNERID">2000000016714</FL>
<FL val="Task Owner">Scott@zohotest.com</FL>
<FL val="Subject">Demo Call</FL>
<FL val="Due Date">11/23/2009</FL>
<FL val="SEID">2000000018003</FL>
<FL val="SEMODULE">Leads</FL>
<FL val="Status">In Progress</FL>
<FL val="Priority">Highest</FL>
<FL val="Send Notification Email">false</FL>
<FL val="Description">Sample Desc</FL>
</row>
</Tasks>

 Sample Task XMLDATA with Contact and Account lookup

<Tasks>
<row no="1">
<FL val="SMOWNERID">2000000016714</FL>
<FL val="Task Owner">Scott@zohotest.com</FL>
<FL val="Subject">Demo Call</FL>
<FL val="Due Date">11/23/2009</FL>
<FL val="CONTACTID">2000000018443</FL>
<FL val="SEID">2000022218013</FL>
<FL val="SEMODULE">Accounts</FL>
<FL val="Status">In Progress</FL>
<FL val="Priority">Highest</FL>
<FL val="Send Notification Email">false</FL>
<FL val="Description">Sample Desc</FL>
</row>
</Tasks>

 Insert notes and relate to the primary module

XML Format:
https://<APPDOMAIN>/crm/private/xml/Notes/insertRecords?newFormat=1

XMLDATA  sample:

<Notes>
<row no="1">
<FL val="entityId">2000000078001</FL>
<FL val="Note Title">Vertical Solution Sample Note</FL>
<FL val="Note Content">This is sample content to test Vertical Solution API</FL>
</row>
</Notes>

Here the entityID is unique ID of the primary record (Lead, Account, Contact etc.)

 Assign owner to the record

While inserting a record through API, make sure you are specifying the email address or userID of the record owner. If you use the record owner's name, the record will be assigned to the default login credential used in the Auth Token. If you want to use the userID to specify the record owner, then add <FL val="SMOWNERID">userID</FL> tag to your xmlData.

Note:

  • In the following examples, replace the values for 'authotoken' and 'scope' with those generated by you.

 Cases

<Cases>
<row no="1">
<FL val="Case Origin">Phone</FL>
<FL val="Status">Escalated</FL>
<FL val="Subject">New Case</FL>
<FL val="Account Name">Account for Cases</FL>
<FL val="WHOID">508020014316189251</FL>
</row>
</Cases>

Note:

  • The WHOID field refers to the Related To field in the Cases module. Give the ID of the record that you want to associate to the cases as a Related To field value in the WHOID field.

 Tasks

https://<APPDOMAIN>/crm/private/xml/Tasks/insertRecords?newFormat=1&
xmlData=

<Tasks>
<row no="1">
<FL val="Subject">Call</FL>
<FL val="Due Date">2009-04-20</FL>
<FL val="Status">Deferred</FL>
<FL val="CONTACTID">2000000017017</FL>
</row>
</Tasks>

 Events

https://<APPDOMAIN>/crm/private/xml/Events/insertRecords?newFormat=1
&xmlData=

<Events>
<row no="1">
<FL val="Subject">Conference</FL>
<FL val="Start DateTime">2009-08-04 01:00:00</FL>
<FL val="End DateTime">2009-08-05 01:00:00</FL>
<FL val="Venue">United States</FL>
<FL val="Send Notification Email">True</FL>
</row>
</Events>

 Events with Contacts and Case Mapping

https://<APPDOMAIN>/crm/private/xml/Events/insertRecords?newFormat=1
&xmlData=

<Events>
<row no="1">
<FL val="Subject">Conference</FL>
<FL val="Start DateTime">2009-09-24 01:00:00</FL>
<FL val="End DateTime">2009-09-25 01:00:00</FL>
<FL val="Venue">Chennai</FL>
<FL val="CONTACTID">2000000055003</FL>
<FL val="SEID">2000000055007</FL>
<FL val="SEMODULE">Cases</FL>
</row>
</Events>

 Accounts

https://<APPDOMAIN>/crm/private/xml/Accounts/insertRecords?newFormat=1
&xmlData=

<Accounts>
<row no="1">
<FL val="Account Name">Zillum</FL>
<FL val="Website">www.zillum.com</FL>
<FL val="Employees">200</FL>
<FL val="Ownership">Private</FL>
<FL val="Industry">Real estate</FL>
<FL val="Fax">99999999</FL>
<FL val="Annual Revenue">20000000</FL>
</row>
</Accounts>

 Contacts

https://<APPDOMAIN>/crm/private/xml/Contacts/insertRecords?newFormat=1
&xmlData=

<Contacts>
<row no="1">
<FL val="First Name">Scott</FL>
<FL val="Last Name">James</FL>
<FL val="Email">test@test.com</FL>
<FL val="Department">CG</FL>
<FL val="Phone">999999999</FL>
<FL val="Fax">99999999</FL>
<FL val="Mobile">99989989</FL>
<FL val="Assistant">John</FL>
</row>
</Contacts>

 SalesOrders

Note:

  • A value for "Product Id" is mandatory.

https://<APPDOMAIN>/crm/private/xml/SalesOrders/insertRecords?newFormat=1
&xmlData=<SalesOrders>

<row no="1">
<FL val="Subject">Zillium - SO</FL>
<FL val="Due Date">2009-03-10</FL>
<FL val="Sub Total">48000.0</FL>
<FL val="Tax">0.0</FL>
<FL val="Adjustment">0.0</FL>
<FL val="Grand Total">48000.0</FL>
<FL val="Billing Street">test</FL>
<FL val="Shipping Street">test</FL>
<FL val="Billing City">test</FL>
<FL val="Shipping City">test</FL>
<FL val="Billing State">test</FL>
<FL val="Shipping State">test</FL>
<FL val="Billing Code">223</FL>
<FL val="Shipping Code">223</FL>
<FL val="Billing Country">test</FL>
<FL val="Shipping Country">test</FL>
<FL val="Product Details">
<product no="1">
<FL val="Product Id">2000000017001</FL>
<FL val="Unit Price">10.0</FL>
<FL val="Quantity">1.0</FL>
<FL val="Total">123.0</FL>
<FL val="Discount">1.23</FL>
<FL val="Total After Discount">121.77</FL>
<FL val="List Price">123.0</FL>
<FL val="Net Total">121.77</FL>
</product>
</FL>
<FL val="Terms and Conditions">Test by Zoho</FL>
<FL val="Description">Test By Zoho</FL>
</row>
</SalesOrders>

 Quotes

 

Note:

  • A value for "Product Id" is mandatory.

https://<APPDOMAIN>/crm/private/xml/Quotes/insertRecords?newFormat=1
&xmlData=<Quotes>

<row no="1">
<FL val="Subject">Zillium - Quote</FL>
<FL val="Due Date">2009-03-10</FL>
<FL val="Sub Total">48000.0</FL>
<FL val="Tax">0.0</FL>
<FL val="Adjustment">0.0</FL>
<FL val="Grand Total">48000.0</FL>
<FL val="Billing Street">test</FL>
<FL val="Shipping Street">test</FL>
<FL val="Billing City">test</FL>
<FL val="Shipping City">test</FL>
<FL val="Billing State">test</FL>
<FL val="Shipping State">test</FL>
<FL val="Billing Code">223</FL>
<FL val="Shipping Code">223</FL>
<FL val="Billing Country">test</FL>
<FL val="Shipping Country">test</FL>
<FL val="Product Details">
<product no="1">
<FL val="Product Id">2000000017001</FL>
<FL val="Unit Price">10.0</FL>
<FL val="Quantity">1.0</FL>
<FL val="Total">123.0</FL>
<FL val="Discount">1.23</FL>
<FL val="Total After Discount">121.77</FL>
<FL val="List Price">123.0</FL>
<FL val="Net Total">121.77</FL>
</product>
</FL>
<FL val="Terms and Conditions">Test by Zoho</FL>
<FL val="Description">Test By Zoho</FL>
</row>
</Quotes>

Example of a Quote with Multiple Products:

https://<APPDOMAIN>/crm/private/xml/Quotes/insertRecords?xmlData=<Quotes>

<row no="1">
<FL val="Subject">TEST</FL>
<FL val="Quote Stage">Draft</FL>
<FL val="Carrier">FedEX</FL>
<FL val="ACCOUNTID">269840000000150037</FL>
<FL val="Account Name">phone account11 9pm</FL>
<FL val="SMOWNERID">269840000000034003</FL>
<FL val="Quote Owner">TEST</FL>
<FL val="SMCREATORID">269840000000034003</FL>
<FL val="Created By">TEST</FL>
<FL val="MODIFIEDBY">269840000000034003</FL>
<FL val="Modified By">TEST</FL>
<FL val="Created Time">2010-10-19 16:16:41</FL>
<FL val="Modified Time">2010-10-19 16:16:56</FL>
<FL val="Sub Total">23.0</FL>
<FL val="Tax">0.0</FL>
<FL val="Adjustment">0.0</FL>
<FL val="Grand Total">23.0</FL>
<FL val="Product Details">
<product no="1">
<FL val="Product Id">269840000000136287</FL>
<FL val="Product Name">prd1</FL>
<FL val="Unit Price">0.0</FL>
<FL val="Quantity">1.0</FL>
<FL val="Quantity in Stock">0.0</FL>
<FL val="Total">23.0</FL>
<FL val="Discount">0.0</FL>
<FL val="Total After Discount">23.0</FL>
<FL val="List Price">23.0</FL>
<FL val="Net Total">23.0</FL>
<FL val="Tax">0.0</FL>
</product>
<product no="2">
<FL val="Product Id">269840000000128149</FL>
<FL val="Product Name">prd2</FL>
<FL val="Unit Price">0.0</FL>
<FL val="Quantity">1.0</FL>
<FL val="Quantity in Stock">0.0</FL>
<FL val="Total">23.0</FL>
<FL val="Discount">0.0</FL>
<FL val="Total After Discount">23.0</FL>
<FL val="List Price">23.0</FL>
<FL val="Net Total">23.0</FL>
<FL val="Tax">0.0</FL>
</product>
</FL>
<FL val="Terms and Conditions">Test by Zoho</FL>
<FL val="Discount">0.0</FL>
<FL val="Date Field">07/21/2010</FL>
</row>
</Quotes>

 Insert Calls with Contacts and Accounts Lookup

<Calls>
<row no="1">
<FL val="SMOWNERID">2000000018005</FL>
<FL val="Subject">Product Support</FL>
<FL val="Call Type">Inbound</FL>
<FL val="Call Purpose">Prospecting</FL>
<FL val="CONTACTID">2000000018001</FL>
<FL val="SEID">2000000018003</FL>
<FL val="SEMODULE">Accounts</FL>
<FL val="Call Start Time">2011-06-10 22:10:00</FL>
<FL val="Call Duration">60:00</FL>
<FL val="Description">Required Product Demo</FL>
<FL val="Billable">true</FL>
<FL val="Call Result">Successful</FL>
</row>
</Calls>

 Insert Calls with Leads Lookup

<Calls>
<row no="1">
<FL val="SMOWNERID">2000000018005</FL>
<FL val="Subject">Demo</FL>
<FL val="Call Type">Inbound</FL>
<FL val="Call Purpose">Prospecting</FL>
<FL val="SEID">2000000017201</FL>
<FL val="SEMODULE">Leads</FL>
<FL val="Call Start Time">2011-06-10 22:10:00</FL>
<FL val="Call Duration">60:00</FL>
<FL val="Description">Demo Call</FL>
<FL val="Billable">true</FL>
<FL val="Call Result">Successful</FL>
</row>
</Calls>

 Usage of 'CDATA'

Purpose: To consider Special Characters as plain text and NOT XML Data

URL Format:
https://<APPDOMAIN>/crm/private/xml/Contacts/insertRecords?newFormat=1&scope=crmapi

Sample XML Data:

as POST:

<Contacts>
<row no="1">
<FL val="First Name">Amy</FL>
<FL val="Last Name">Dawson</FL>
<FL val="Email">testing@testing.com</FL>
<FL val="Title">Manager</FL>
<FL val="Phone">1234567890</FL>
<FL val="Mobile">292827622</FL>
<FL val="Account Name"> <![CDATA["A & A"]]> </FL>
</row>
</Contacts>

as GET:

<Contacts>
<row no="1">
<FL val="First Name">Amy</FL>
<FL val="Last Name">Dawson</FL>
<FL val="Email">testing@testing.com</FL>
<FL val="Title">Manager</FL>
<FL val="Phone">1234567890</FL>
<FL val="Mobile">292827622</FL>
<FL val="Account Name"> <![CDATA["A %26 A"]]> </FL>
</row>
</Contacts>

Note:

  • "%26" will be considered as "&"

 Insert Multiple records

URL Format: https://<APPDOMAIN>/crm/private/xml/Leads/insertRecords?newFormat=1&scope=crmapi

XMLDATA sample:

<Leads>
    <row no="1"><FL val="Last Name">testing</FL><FL val="Company">ZOHO</FL></row>
    <row no="2"><FL val="Last Name">testing</FL><FL val="Company">ZOHO</FL></row>
    <row no="3"><FL val="Last Name">testing</FL><FL val="Company">ZOHO</FL></row>
    <row no="4"><FL val="Last Name">testing</FL><FL val="Company">ZOHO</FL></row>
    <row no="5"><FL val="Last Name">testing</FL><FL val="Company">ZOHO</FL></row>
    <row no="6"><FL val="Last Name">testing</FL><FL val="Company">ZOHO</FL></row>
    <row no="7"><FL val="Last Name">testing</FL><FL val="Company">ZOHO</FL></row>
    <row no="8"><FL val="Last Name">testing</FL><FL val="Company">ZOHO</FL></row>
    <row no="9"><FL val="Last Name">testing</FL><FL val="Company">ZOHO</FL></row>
    <row no="10"><FL val="Last Name">testing</FL><FL val="Company">ZOHO</FL></row>
 :
 :
 :
 
    <row no="100"><FL val="Last Name">testing</FL><FL val="Company">ZOHO</FL></row>
</Leads>

Notes:

When inserting multiple records with the insertRecords method:
  • Duplicate Check will not function. However, we support duplicate check for multiple records  in version 4
  • Workflow Rules will not be triggered for records that meet the criteria
  • Multiple Records cannot be inserted for the Quotes, SalesOrders, Invoices and PurchaseOrders modules.
  • Only the first 100 records will be considered when inserting multiple records.

 Duplicate Check for Multiple Records

 Purpose

You can use insertRecords to trigger duplicate check functionality for multiple records. Please note that version=4 is a mandatory parameter.

We have introduced three new codes that will represent the API result status for each record. The codes are as given below:

2000 = Record Added Successfully
2001 = Record Updated Successfully
2002 = Record Already Exists

URL Format :

https://<APPDOMAIN>/crm/private/xml/Leads/insertRecords?duplicateCheck=( 1 OR 2 )&version=4&xmlData=

Sample XML Data

<Leads>
    <row no="1">
<FL val="Company">Company1</FL>
<FL val="Last Name">Last Name1</FL>
<FL val="Email">automation@crm.com 1</FL>
    </row>
    <row no="2">
<FL val="Company">Company2</FL>
<FL val="Last Name">Last Name2</FL>
<FL val="Email">automation@crm.com 2</FL>
    </row>
</Leads> 

Sample Response

If duplicateCheck=1 , version=4, some records exist with the email address and some records don't exist, the functionality and response will be as given below:

<response uri=/crm/private/xml/Leads/insertRecords>
                <result>
                    <row no=1>
                        <success>
                            <code>2000</code>
                            <details>
                                <FL val=Id>2000000120006</FL>
                                <FL val=Created Time>2013-02-11 17:55:04</FL>
                                <FL val=Modified Time>2013-02-11 17:55:04</FL>
                                <FL val=Created By>
                                <![CDATA[ aghil123 ]]>
                                </FL>
                                <FL val=Modified By>
                                <![CDATA[ aghil123 ]]>
                                </FL>
                            </details>
                        </success>
                    </row>
                    <row no=2>
                        <success>
                            <code>2002</code>
                            <details>
                                <FL val=Id>2000000120007</FL>
                                <FL val=Created Time>2013-02-11 17:55:04</FL>
                                <FL val=Modified Time>2013-02-11 17:55:04</FL>
                                <FL val=Created By>
                                <![CDATA[ aghil123 ]]>
                                </FL>
                                <FL val=Modified By>
                                <![CDATA[ aghil123 ]]>
                                </FL>
                            </details>
                        </success>
                    </row>
                </result>
            </response>

If duplicateCheck=1 , version=4 , no records exist with the email address, the functionality and response will be as given below:

<response uri=/crm/private/xml/Leads/insertRecords>
                <result>
                    <row no=1>
                        <success>
                            <code>2000</code>
                            <details>
                                <FL val=Id>2000000120006</FL>
                                <FL val=Created Time>2013-02-11 17:55:04</FL>
                                <FL val=Modified Time>2013-02-11 17:55:04</FL>
                                <FL val=Created By>
                                <![CDATA[ aghil123 ]]>
                                </FL>
                                <FL val=Modified By>
                                <![CDATA[ aghil123 ]]>
                                </FL>
                            </details>
                        </success>
                    </row>
                    <row no=2>
                        <success>
                            <code>2000</code>
                            <details>
                                <FL val=Id>2000000120007</FL>
                                <FL val=Created Time>2013-02-11 17:55:04</FL>
                                <FL val=Modified Time>2013-02-11 17:55:04</FL>
                                <FL val=Created By>
                                <![CDATA[ aghil123 ]]>
                                </FL>
                                <FL val=Modified By>
                                <![CDATA[ aghil123 ]]>
                                </FL>
                            </details>
                        </success>
                    </row>
                </result>
            </response>

If duplicateCheck=1 , version=4 , records exist with the email address, the functionality and response will be as given below:

<response uri="/crm/private/xml/Leads/insertRecords">
                <result>
                    <row no="1">
                        <success>
                            <code>2002</code>
                            <details>
                                <FL val="Id">2000000120006</FL>
                                <FL val="Created Time">2013-02-11 17:55:04</FL>
                                <FL val="Modified Time">2013-02-11 17:55:04</FL>
                                <FL val="Created By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                                <FL val="Modified By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                            </details>
                        </success>
                    </row>
                    <row no="2">
                        <success>
                            <code>2002</code>
                            <details>
                                <FL val="Id">2000000120007</FL>
                                <FL val="Created Time">2013-02-11 17:55:04</FL>
                                <FL val="Modified Time">2013-02-11 17:55:04</FL>
                                <FL val="Created By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                                <FL val="Modified By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                            </details>
                        </success>
                    </row>
                </result>
            </response>

If duplicateCheck=2 , version=4 , no records exist with the email address, the functionality and response will be as given below:

<response uri="/crm/private/xml/Leads/insertRecords">
                <result>
                    <row no="1">
                        <success>
                            <code>2000</code>
                            <details>
                                <FL val="Id">2000000120006</FL>
                                <FL val="Created Time">2013-02-11 17:55:04</FL>
                                <FL val="Modified Time">2013-02-11 17:55:04</FL>
                                <FL val="Created By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                                <FL val="Modified By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                            </details>
                        </success>
                    </row>
                    <row no="2">
                        <success>
                            <code>2000</code>
                            <details>
                                <FL val="Id">2000000120007</FL>
                                <FL val="Created Time">2013-02-11 17:55:04</FL>
                                <FL val="Modified Time">2013-02-11 17:55:04</FL>
                                <FL val="Created By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                                <FL val="Modified By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                            </details>
                        </success>
                    </row>
                </result>
            </response>

If duplicateCheck=2 , version=4 , records exist with the email address, the functionality and response will be as given below:

<response uri="/crm/private/xml/Leads/insertRecords">
                <result>
                    <row no="1">
                        <success>
                            <code>2001</code>
                            <details>
                                <FL val="Id">2000000120006</FL>
                                <FL val="Created Time">2013-02-11 17:55:04</FL>
                                <FL val="Modified Time">2013-02-11 17:55:04</FL>
                                <FL val="Created By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                                <FL val="Modified By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                            </details>
                        </success>
                    </row>
                    <row no="2">
                        <success>
                            <code>2001</code>
                            <details>
                                <FL val="Id">2000000120007</FL>
                                <FL val="Created Time">2013-02-11 17:55:04</FL>
                                <FL val="Modified Time">2013-02-11 17:55:04</FL>
                                <FL val="Created By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                                <FL val="Modified By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                            </details>
                        </success>
                    </row>
                </result>
            </response>

If duplicateCheck=2 ,version=4 , some records exist with the email address and some records don't, the functionality and response will be as given below:

<response uri="/crm/private/xml/Leads/insertRecords">
                <result>
                    <row no="1">
                        <success>
                            <code>2001</code>
                            <details>
                                <FL val="Id">2000000120006</FL>
                                <FL val="Created Time">2013-02-11 17:55:04</FL>
                                <FL val="Modified Time">2013-02-11 17:55:04</FL>
                                <FL val="Created By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                                <FL val="Modified By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                            </details>
                        </success>
                    </row>
                    <row no="2">
                        <success>
                            <code>2000</code>
                            <details>
                                <FL val="Id">2000000120007</FL>
                                <FL val="Created Time">2013-02-11 17:55:04</FL>
                                <FL val="Modified Time">2013-02-11 17:55:04</FL>
                                <FL val="Created By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                                <FL val="Modified By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                            </details>
                        </success>
                    </row>
                </result>
            </response>

If version=4, some records contain error and some don't, the functionality and response will be as given below:

<response uri="/crm/private/xml/Leads/insertRecords">
                <result>
                    <row no="1">
                        <success>
                            <code>2001</code>
                            <details>
                                <FL val="Id">2000000120006</FL>
                                <FL val="Created Time">2013-02-11 17:55:04</FL>
                                <FL val="Modified Time">2013-02-11 17:55:04</FL>
                                <FL val="Created By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                                <FL val="Modified By">
                                <![CDATA[ aghil123 ]]>
                                </FL>
                            </details>
                        </success>
                    </row>
                    <row no="2">
                        <error>
                            <code>4832</code>
                                          <details>You have given a wrong value for the field : Annual Revenue</details>
                        </error>
                    </row>
                </result>
            </response>

Note

  • Email Address is the duplicate check field for Leads module. For other modules, the duplicate check field varies. To learn more, please read - https://www.zoho.com/crm/help/api/insertrecords.html#Duplicate Check_Field 
  • Developers can now easily identify the record id, since the record detail in the response, is given the same way the user requests in the xml data.
  • If you do not pass the version, the default functionality will be executed.
  • You have to pass version=4 in the parameter URL for duplicate check in multiple records.