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
Inline images are not shown on iPhone
When I add an image inline it gets displayed on a Zoho's computer software or web browser, but not on Zoho's iPhone app - the image appears to be broken and cannot be copied neither saved. What's the problem with displaying images inline when reading
Kaizen #186 : Client Script Support for Subforms
Hello everyone! Welcome back to another exciting Kaizen post on Client Script! In this edition, we’re taking a closer look at Client Script Support for Subforms with the help of the following scenario. " Zylker, a manufacturing company, uses the "Orders"
Viewing Live data
Where can I see the live data that is sent from the device?
Canvas templates can now be shared with different CRM organizations
----------------------------------------Moderated on 14th February, 2023------------------------------------------- Dear all, This feature is now open for all users in all DCs. To learn more about importing and exporting canvas templates, read our help
Formatting Mailing Labels
I want to use the "Print Mailing Labels" function on the drop down list, but I am not seeing a way to change the formatting on the mailing labels. At the moment, the information that appears on the mailing labels ARE NOT mailing addresses, but random information. I would also like to change be able to change the size of the labels. At the very least I would like to know what type of labels I can get that would be the correct size.
CRM to Writer Mail Merge Preview not working
When performing a mail merge from CRM to writer the preview function does not work. I get the following error. I am a Zoho one user on a ChromeOS. I have been successfully using mail merge from CRM to Writer about 4 years. This error seemed to coincide
Best practice : when to convert lead to Deal
Hello, I'm new to Zoho and run my own business. To make sure I'm using Zoho correctly, when do I press convert, from Lead to Deal, at what stage in the conversion funnel/conversation. I want to make sure I can a) monitor status of all pending lead or
Show Call History During a Blueprint Transition in Leads Module
Hi all, I have a Blueprint set up in the Leads module with a transition to Reattempt Call, which updates the lead status to Attempted Contact. I’d like to know if there’s a way to show the call history or at least a summary of how many call attempts have
How do I filter contacts by account parameters?
Need to filter a contact view according to account parameter, eg account type. Without this filter users are overwhelmed with irrelevant contacts. Workaround is to create a custom 'Contact Type' field but this unbearable duplicity as the information already
How to delete more than 100 leads at a time.
We are a call center and we need to upload fresh leads daily. Is there any way to delete all leads only at once. Currently we are deleting 100 at a time. Please anyone who can help. Thank you.
The Next Chapter for CRM for Everyone: Moving from Early Access to Phased Rollout for Customers
#CRM25Q1 Hello Everyone, Until now, CRM for Everyone has been available in early access mode exclusively for users who opted to try the new version. We are now transitioning to a phased release, starting with the basic edition. We are thrilled to announce
Canvas for related lists
Hey, we would like to customize our related lists. For us, it would make more sense to present the data from an assigned record vertical instead of horizontal. Can we get a related list Canvas view?
Standalone custom function not generating logs
Why dont't standalone custom functions generate logs when the're called from another function? I have some functions (workflow, buttons and blueprint) that have common parts, so I put that part in a standalone function which is called from the others.
Show Zoho Books Retainer Invoice in Zoho CRM
Hi Support, How can I get Retainer Invoices created in Zoho Books to show in Zoho CRM? If a sales person needs to collect an upfront deposit, they should be able to see that the retainer invoice has been created and paid. Thanks, Ashley
Feature Request - Zoho Books - Add Retainer Invoices to CRM/Books integration
Hi Books Team, My feature request is to include Retainer Invoices in the finance suite integration with Zoho CRM. This way we will be able to see if retainer invoices have been issued and paid. I have also noticed that when the generate retainer invoice
ACR Phone mobile app for logging phone calls into Zoho CRM
ACR Phone is an Android app recording voice calls with additional features such as blacklist, cloud upload, call log and more. Use the ACR Phone extension for Zoho CRM to generate Leads and Contacts with the voice recording attached right after your phone
New in Zoho Sign: Allow recipients to review and change associated recipients
Greetings! We are happy to announce the addition of a new recipient role, Manages recipients, in our signature workflows. This role enables a recipient to review, modify, or add details for any recipients associated with them in the workflow. This ensures
How can I throw an error / terminate the flow from within a custom function?
As the subject says. I would like to be able to terminate a flow from within a custom function if certain conditions are not met. I know I could hook a decision box to the output of my custom function and check return variable, but hoping there is a more
Multiple Zoho Attendees in a Customer meeting
We are having constraints with having to log duplicate meetings when we have 2 Zoho users attending a customer meeting. What are the options to resolve this? You can add participants, but you cannot report on them. What can be done to avoid creating so
iOS 18 is here! Discover the enhanced Bigin app with iOS 18, iPadOS 18 and macOS Sequoia.
Hello, everyone! We are excited to be back with new features and enhancements for the Bigin app. Let us take a look at the new iOS 18 and iPadOS 18 features. The following is the list of features covered in this update: Control widgets. New app icons.
Multi-Select lookup field has reached its maximum??
Hi there, I want to create a multi-select lookup field in a module but I can't select the model I want the relationship to be with from the list. From the help page on this I see that you can only create a max of 2 relationships per module? Is that true?
Password change restriction
Can the administrator restrict users from changing their email password?
NOW Zoho Creator still cannot bulk download Image or File Upload Field
The filedownloader has been deprecated for 5 years. Until now, we still cannot have a replacement tool. How can we bulk download the file that we uploaded to Zoho Creator. Previously, it was so simple to bulk download all those files. But now failed to
CRM API Search Record for Last Name equals "."
When using the CRM API to look for all contacts with a lastname = "." The API returns an Invalid Query Reponse I have tried (Last_Name:equals:.) (Last_Name:equals:%5C.) (Last_Name:equals:\.) We have a scenario where the Last Name may not be known for
MS PowerApps Custom Connector
Has anyone successfully connected to the API from MS PowerApps? The OAuth2 seems impossible to use from a platform like this.
Zdk-cli
As i have tried to login to zdk cli as it returns this error ✔ Success! Logged in as JAYANTHAN ✖ Error during initialization of zdk api supported only in sandbox environment
Se puede mover un Cliente de un modulo a otro personalizado
Hola, tengo una duda que me gustaría resolver: Actualmente trabajo con dos módulos: Seguimiento de Venta y Cierre de Ventas . Mi objetivo es que, cuando desde el módulo de Seguimiento se marca una venta como "Venta Efectiva" , el cliente sea movido al
Its 2022, can our customers log into CRM on their mobiles? Zoho Response: Maybe Later
I am a long time Zoho CRM user. I have just started using the client portal feature. On the plus side I have found it very fast and very easy (for someone used to the CRM config) to set up a subset of module views that make a potentially extremely useful
If Problema Formula
Ceil(Datecomp(${Seguimiento de Venta.Fecha de la proxima visita},Now())/1440) Tengo porblema al plantear el If Quiero que si el valor es dega
Trying to do commission tracking with zoho crm, can i do a Lookup against multiple fields in a module?
So i'm still designing my zoho one crm as i come over from salesforce. One of the things i'm trying to build is a commission tracking module. At some point i'll probably hire someone to help with custom code, I'm just proof of concepting it. I"m not sure
Mapping a new Ticket in Zoho Desk to an Account or Deal in Zoho CRM manually
Is there any way for me to map an existing ticket in Zoho desk to an account or Deal within Zoho CRM? Sometimes people use different email to put in a ticket than the one that we have in the CRM, but it's still the same person. We would like to be able
Commerce service
If I am selling a service in Commerce, how do I turn off shipping?
Customer Portal Zoho Desk | Sort ticket list
Hello, If you view the ticket list inside the desk portal (https://xyc.zohodesk.eu/portal/de/myarea?departmentId=xyz) all tickets are displayed depending on the filters: department "my tickets" / "team tickets" status group/type channel My questions:
Customer/item(s) bought view
Hello In Inventory/Customers/Transactions tab, how do I see what it is the customer actually ordered/bought without having to open each SO? Our customers buy a number of items thoughout the year. I've look at each transactions drop down, and no-where
ERROR: Product type cannot be changed for Items having transactions.
I have mistakenly added a product type as goods for an item that was a digital service. Now when HSN/SAC became mandatory, this brought my attention to this error I did. So I tried changing the product type but it displayed this error message Product
Inventory Asset vs Finish Goods vs Work in Progress please explain or help me choose
New to this so please if you can help in any way I would really appreciate it. So here we go. I make and sell and item which is made out of bunch of other items. (Composite Item). Now one of the parts that the item is made from is also a composite item.
WorkFlow to Update Custom Field in Sales Order with Tracking Information from Shipment of that Sales Order
Hello All- I'd like to update the sales orders with the tracking information I enter in the shipping document. What is the proper variable to get the tracking information out of the shipping document? See attached.
ZOHO Desk-Enable Ticket Notification sound
Hi, I answer the helpdesk tickets for Sevenstar. How can I enable the Ticket Notification sound when I receive a new ticket?
Differentiating between invoice templates when adding custom fields
We are adding HS codes to the items which we would like published on our international customers invoices plus other export data required. We don't need this data on our domestic customer invoices. We have setup an invoice template for them but it if
Batch Tracking Enhancements In Zoho Inventory
Hello users, We’re excited to announce that we’ve taken batch tracking to a whole new level in Zoho Inventory! We’ve made it more accessible and easier to use than ever. Here’s a quick look at the improvements: 1) A New Way To Create or Modify Batches
Next Page