Function #5: Add late fees for overdue invoices

Function #5: Add late fees for overdue invoices

Looking to charge a penalty for delayed payments from customers? This custom function helps you apply a late fee by automatically detecting invoices that have gone overdue and adding the calculated fee to the respective customer's outstanding balance in Zoho Books. 

More specifically, the function we have provided here will create a new invoice for the late fee amount. If you wish to simply have it added as an additional line item to the existing invoice, do contact us and we'll help you on that. 


Create a Checkbox custom field by the name "Late Fee Invoice" for the Invoices module. This is to identify the invoices generated automatically through the custom function from the invoices that you create. 

Custom Function:

You can set it up by navigating to Settings -> Automation -> Custom Functions -> +New Custom Function. Click this GitHub link to get the function code. 

Note: We have entered the late fee percentage as 7.5 in the script. If you apply a different percentage for your customers, please change it when you create the function in Zoho Books (Line 2 in the screenshot above). 

It's also essential that you set up a Connection named "zbooks" for the function to work. To learn how to create the connection, refer to the GIF below. 

Workflow Rule: 

Next, establish a workflow rule to kick off this function. Go to Settings -> Automation -> Workflow Rules -> +New Workflow Rule and create it as follows. 

Don't forget to choose the custom function in the final step of the workflow setup. 

And that's about it. Say good-bye to manual follow-ups and negotiations. Zoho Books will now reduce your administrative burden by automating penalty calculations and late fee invoices. 

If you found this helpful, give this post a thumbs-up or share your feedback in the comments. Should you need any assistance or customization in this function, send us an email to and we'll help. 

Divya R
Zoho Books

                            Zoho Desk Resources

                            • Desk Community Learning Series

                            • Digest

                            • Functions

                            • Meetups

                            • Kbase

                            • Resources

                            • Glossary

                            • Desk Marketplace

                            • MVP Corner

                            • Word of the Day

                                Zoho Marketing Automation

                                        Manage your brands on social media

                                                Zoho TeamInbox Resources

                                                  Zoho DataPrep Resources

                                                    Zoho CRM Plus Resources

                                                      Zoho Books Resources

                                                        Zoho Subscriptions Resources

                                                          Zoho Projects Resources

                                                            Zoho Sprints Resources

                                                              Qntrl Resources

                                                                Zoho Creator Resources

                                                                  Zoho WorkDrive Resources

                                                                    Zoho Campaigns Resources

                                                                      Zoho CRM Resources

                                                                      • CRM Community Learning Series

                                                                        CRM Community Learning Series

                                                                      • Tips


                                                                      • Functions


                                                                      • Meetups


                                                                      • Kbase


                                                                      • Resources


                                                                      • Digest


                                                                      • CRM Marketplace

                                                                        CRM Marketplace

                                                                      • MVP Corner

                                                                        MVP Corner



                                                                          Design. Discuss. Deliver.

                                                                          Create visually engaging stories with Zoho Show.

                                                                          Get Started Now