Hello, everyone! Welcome back to our series.
It's the holiday season, marking a time when businesses witness increased demand for products and services, leading to a significant boost in sales. This also presents an opportunity for businesses to engage with their customers. As a gesture of appreciation and gratitude, many businesses opt to include complimentary items with customer purchases to enhance the overall shopping experience. Today, we bring you a custom function that automatically adds a complimentary/free item to the invoice based on the total purchase amount.
Prerequisites:
1. Create a
Connection named
"zbooks" to successfully execute the function. You can watch the GIF attached below to know how to create the connection.

2. The items that will be given as free should exist under the Items module in Zoho Books.
3. To determine both when and what item should be given as complimentary, define distinct rate slabs in the script and assign a corresponding free item to each slab. In today's script, we have pre-defined 3 rate slabs.
If the invoice total is between $100 - $499, it is eligible for the free item A.
If the invoice total is between $500 - $999, it is eligible for the free item B.
If the invoice total is more than $1000, it is eligible for the free item C.
4. Create a Check Box-type custom field by the name "Include Free item?" for Invoices. Only when this field is ticked, the function will be executed to check the applicable rate slab.
Custom Function:
Navigate to Settings -> Automation -> Workflow Actions -> Custom Functions -> +New Custom Function > Add the function code from this
GitHub link.
Note: The custom function will be executed after the invoice is saved.
Workflow Rule:
Go to Settings -> Automation -> Workflow Rules -> +New Workflow Rule and set up the workflow rule as shown below:-

Here's how it works:
After creating ("Include Free item?" should be True) and saving an invoice, the custom function kicks in, checking the rate slab associated with the invoice. Based on the identified rate slab, the function automatically adds the corresponding free item.
Try out this function and drop your feedback in the comments section. If you have any specific customizations in mind, don't hesitate to reach out to our support desk at support[at]zohobooks[dot]com. We're here to assist you.
Stay tuned for our next custom function. Until then, have a joyful holiday season!
Regards,
Shireen Farhana
Zoho Books
Recent Topics
Trying to export a report to Excel via a deluge script
I have this code from other posts but it gives me an error of improper statement, due to missing ; at end of line or incomplete expression. Tried lots of variations to no avail. openUrl(https://creatorapp.zoho.com/<username>/<app name>/XLSX/#Report:<reportname>,"same
Work Drive Tray Icon Missing
How can I get the tray icon back? The app froze, had to restart PC and then it's been gone since... I've re-installed the windows program and restarted my machine twice now.
cant receive emails
I have checked the Dns and everything seems to be fine pls check the print screens attached below help me cause i need to solve this fast
Retainer invoice in Zoho Finance modlue
Hello, Is there a way of creating retainer invoices in the Zoho Finance module? If not can I request this is considered for future updates please.
iOS Widget Not Working
It appears that the iOS widget is not working, displaying a blank white screen instead of a selected note. I’m using app version 6.5.12 and iOS 18.3.1.
Two Problems With Data Imported to Notes
Occasionally I want to create a note by copying and pasting a few paragraphs from an article on line. When I create a new note and paste in the section the newly created note winds up with each paragraph in white text on a dark background rather than
Zoho Books | Product updates | March 2025
Hello users, We have rolled out new updates in Zoho Books to enhance your accounting experience. These include the ability to create workflow rules for manual journals and Multi-Factor Authentication (MFA) for customer and vendor portals. Explore these
Workdrive on Android - Gallery Photo Backups
Hello, Is there any way of backing up the photos on my android phone directly to a specific folder on Workdrive? Assuming i have the workdrive app installed on the phone in question. Emma
Generate a link for Zoho Sign we can copy and use in a separate email
Please consider adding functionality that would all a user to copy a reminder link so that we can include it in a personalized email instead of sending a Zoho reminder. Or, allow us to customize the reminder email. Use Case: We have clients we need to
How to associate a document sent in Zoho Sign with an deal in the CRM?
Hi, often documents are loaded in Zoho sign and sent for signature. These sometimes are linked to a deal in the Zoho CRM and would be nice to see the status of the document within the CRM. I am aware of the integration, but that assumes that the document
Preventing auto-redirect to Parent Record on Save...
Our users often create records from the related list on th left side of the screen. They click the blue "plus" button to create the record. This is handy, but for some modules, or situations, they would like to remain on the record AFTER clicking "Save",
CRM Portal Help
Hello, I am trying to set up a portal to connect with our referring doctors to keep patient cases organized. I set up the accounts module as office, the contacts as doctors, the leads as patients, and the deals as treatments. Everything seems to work
Zoho Books (UK) needs to be able to submit a CT600 CTSA return
As well as a VAT Return, most (if not all) small businesses have to submit a CT600 Corporation Tax Self-Assessment. There are many providers who do this (like Xero) bujt not Zoho. Can you add this to the request list please? Many thanks Steve
No image image comes out in the recipient when I sent an email
Hello to the entire forum, when I send an email from Zoho, my profile picture does not come out. On the other hand, if you do, using Gmail accounts. How is it configured to leave ??? Thank you Greetings !!
Zoho Desk & Tasks
Hi, I'd like to be able to create a set of tasks each time a customer request comes in, as I understand it, currently each would need to be create manually. Project is too much of an overhead for what we want to use. Effectively in various use cases we
zet pack not working
We are using the zet pack command to package our Zoho extension. However, after running the command, the extension gets packed, but the resulting package is empty. We've attached a screenshot for reference. Could you please assist us with resolving this
While retrieving the Balance Sheet Report, there is always this "COST OF GOODS SOLD", This is not editable.
Hi Zoho & Readers, While retrieving the Balance Sheet Report, there is always this "COST OF GOODS SOLD", which is reduced from the Sales to arrive at the gross profit. The issue I face here is that Service Oriented Companies don't incur any COGS, hence
Changing salesorder_number via zoho flow
For some reason updating salesorder_number via zoho flow does not stick. Flow is triggered by new sales order filtered by sales channel update sales order: PO#: CX${trigger.reference_number} Salesorder_number: CX${trigger.reference_number} PO# successfully
Working with Products that are non-tangible
How does one create a 'service' in products? Is there a way to disable inventory functions for things like Sofware as a service? The services module doesn't look to be much help either. Not sure how to do this in CRM
Loop in Blueprint but it works. Why? How should this be set?
see picture
Zoho Error: This Operation has been restricted. Please contact support-as@zohocorp.com for further details
Hello There, l tried to verify my domain (florindagoreti.com.br) and its shows this error: This Operation has been restricted. Please contact support-as@zohocorp.com for further details. Screenshot Given Below - please check what went wrong. Thanks
Bulk Delete Images
How do I bulk Delete Images from Zoho Campaigns. We have been using the Zoho since 2019 and can still only see the option to delete images one by one and we have a lot of old Campaign imagery we don't need anymore. Thanks!
Tip #5: Setting access rights at the subfolder level
Hello everyone, We hope you're finding our WorkDrive Tips and Tricks series useful. For today's tip, we'll teach you how to assign higher subfolder permissions to Team Folder members. Team Folders helps you avoid the drawbacks of traditional file sharing.
I want to update the photo from the mobile app to the product tab product.
I want to update the photo from the mobile app to the product tab product. Because I want to use the CRM product tab for inventory management Contact registration can save photos from the mobile app. Attached screenshot.
Setting default From address when replying to request
At the moment, if I want to reply to a request, the From field has three options, company@zohosupport.com, support@company.zohosupport.com, and support@company.com. The first two are really internal address that should never be seen by the customer and
Enable Image and Hyperlink Sync in Zoho Desk - Jira Integration
Hi, We are using the Zoho Desk - Jira integration, which allows comments to sync automatically between a Zoho Desk ticket and its linked Jira issue. However, we have noticed a limitation: When adding a hyperlink or image in a Zoho Desk comment, it is
Deluge Function to Update Custom Field
I'm trying to get a Deluge function (which will run as part of a Schedule in Desk) that retrieves all tickets with the status "Recurring" and updates the custom field checkbox "cf_recurring" to "true". Here's what I have, which doesn't work: searchValue
Implement Date-Time-Based Triggers in Zoho Desk
Dear Zoho Desk Support Team, We are writing to request a new feature that would allow for the creation of workflows triggered by specific date-time conditions. Currently, Zoho Desk does not provide native support for date-time-based triggers, limiting
How many ZOHO-Sites does the ZOHO-One Suite allow for?
The free version of ZOHO-Sites allows for two sites, but it seems that the professional version (which is included in the ZOHO-One Suite) only allows for two websites. Is that correct? How many sites can I have within one ZOHO-One account?
Zoho desk Spam Folder
Dear Zoho Support Team, We are experiencing an issue with Zoho Desk, where all emails sent to our customers are being marked as spam. As a result, they are not receiving notifications for new ticket replies. Please assist us in resolving this issue.
Is Zoho Tables part of Zoho One
Cant seem to add the app as part of my Zoho One Subscription?
Canva Integration
Hello! As many marketing departments are streamlining their teams, many have begun utilizing Canva for all design mockups and approvals prior to its integration into Marketing automation software. While Zoho Social has this integration already accomplished,
Possible to filter out contacts that hasn't opened emails in Cadence?
We use Cadences in various outreach - is it possible in analytics or reports to filter out the contacts that have not opened their emails?
On Duty Requests using API
Currently we can only do attendance entries using API, we need to make on Duty Requests using API Use Case We are using different on premise devices to track meetings, we want to sync this data with Zoho People Currently we are manually making on duty
Dialing Microsoft Teams Phone Service via Zoho CRM
I am using the VOIP option in Microsoft teams for my office phone system. I was hoping to have a way to dial numbers directly from Zoho CRM, but don't see anything in the Teams Integration or in the Telephony integration that will enable this. Does anyone
Zoho Books API down
We've been using the zoho books api for the last few weeks to pull open invoices, and the code has stopped working suddenly. When making the same API call as always, we're getting a 400 error.
Issue with ticket replies via Slack: '+' symbols replacing spaces in emails
Hello, support team! We're experiencing an issue when replying to tickets directly through Slack. When the reply is sent to the email, spaces are being replaced by '+' symbols. This makes the message harder to read and understand. Is there any solution
Phonebridge is not visible for one user
Hello Community, i setup phonebridge. It is working for all users in the organisation. Except for one. I uninstalled phonebridge for the user and reinstalled. But the Call button is not appearing in CRM. What could I am missing. ? Many thanks and best
Connecting Portals from different Zoho apps
Hi, I note that Zoho has functionality for customer portals for several of the Zoho apps, like CRM, Projects, Desk etc. Is there any way to connect these portals? It would be great if we could give our customers access to a portal in which they could
Introducing Keyboard Shortcuts for Zoho CRM
Dear Customers, We're happy to introduce keyboard shortcuts for Zoho CRM features! Until now, you might have been navigating to modules manually using the mouse, and at times, it could be tedious, especially when you had to search for specific modules
Next Page