For this tutorial in video form, click here
In this article, we’ll go over inserting records. Let’s head over to the API documentation and click on the “Insert Records” link under Record APIs.
Let’s look at the Deluge code:
Here, you can see it’s telling us to use bulkCreate. You can certainly use this if you’re going to create multiple records at once. We find that we’re more likely to do one at a time. The only difference is that you do zoho.crm.createRecord instead of zoho.crm.bulkCreate.
You need to specify the module name/API name for the module. If you’re using bulkCreate, you must provide a list of records. However, you only need to supply a single record for a map in docCreate.
Let’s see what that looks like:
Here, we’re doing 3 things:
- Inputting the information for the new lead.
- Creating a response/data map.
- Fetching the newly created record.
Save and execute the script.
Here, you can see that it has indeed created a new one based on the information we added. Any fields where information is not added will be left blank.
What would you use bulkCreate for? If we’re making multiple records at the same time, we could do something like this:
This will allow you to create 3 records in that list. Here, you can see the success messages for each record:
If we check the details property, we can see the unique IDs of each record:
Hope you enjoy automatically creating records in your CRM!