If you've been looking for a way to update certain data in Zoho Subscriptions that's outdated or just needs to be changed in bulk, then this week's tip is for you.
Bulk-updating data can help you save time and effort
Need to update the value for a custom field? How about updating salespersons for subscriptions because there's been a change in your company's staff? These actions can be quite tiresome, especially if there are numerous fields to go through and edit.
For now, Zoho Subscriptions supports bulk-updates for credit notes with the upper limit being 25 credit notes per update. However, if you'd like to update fields for other modules without any restrictions on the number of fields that can be updated, that's where this method of bulk-updating will come in handy. Let's see how.
How It Works
For this to work, you'd have to export your data from the module where you want to make changes and import it in a spreadsheet software like Zoho Sheet or Google Sheets. Next, enter the values that you'd like to update in the spreadsheet and run a script (we'll link it below) in the spreadsheet software, which updates the required values from the spreadsheet to Zoho Susbcriptions via our powerful REST APIs.
Here's how you can do it:
Let's take an example where you need to update the salesperson field for multiple subscriptions. To do this:
- Go to Zoho Subscriptions > More Actions.
- Click Export Subscriptions.
Once you've exported the file, it needs to be imported into a spreadsheet software.
Next, create another column for salespersons.
Fill in the name of the salespersons for the subscriptions that you want to update it for.
To update this data from the Spreadsheet to Zoho Susbcriptions, you'd have to create a script that can communicate with Zoho Susbcriptions via an API.
Creating the script in Zoho Sheet:
- Go to Zoho Sheet > Tools > Custom Functions > Create.
Use the script below and customize it as required.
Creating the script in Google Sheets:
- Go to Google Sheets > Tools > Script Editor > New Project.
- Use this script and customize it as required.
Note: A previous version of this post contained scripts which used Authtokens for authentication with Zoho Subscriptions' APIs. However, support for Authtokens has been removed as of 30 June 2021. The scripts have since been updated to use authentication via OAuth, and you must add your access tokens' detail in the script, along with your organization ID. Learn how to generate access tokens.
Create another column to execute this script. This column will also be used to display whether the script succeeded or not, so it can be named accordingly. To execute the script in this column, type ' = ' followed by the name of the function() and then provide the cell positons of the subscription ID and salesperon as parameters. For example, =UpdateSalesPerson(a2,c2).
On pressing enter, the salesperson will be updated in Zoho Susbcriptions and the status of the script will be updated in the spreadsheet. To update the remaining salespersons, simply double click on the bottom right corner of the first cell where you ran the script. The spreadsheet application will then automatically run the script for the remaining salespersons.
Similarly, this script can be used for other modules as well by importing their data and making necessary changes to the script. Here's an example where the same script has been tweaked to bulk-update custom fields.
Try it out and let us know what you think in the comments below! We'll be back next week with a new post, so stay tuned.
The Zoho Subscriptions Team