Function #38: Charge rush fees for invoices

Function #38: Charge rush fees for invoices



Hello everyone!

Rush fees are additional charges that businesses add to invoices when customers request expedited or prioritized services, compensating for the extra resources and effort. The method for calculating these fees can vary across industries and businesses. One commonly used method is the percentage-based approach, in which rush fees are calculated as a percentage of the item rate.

Consider Zylker Designs, a graphic design firm that typically delivers designs with a standard turnaround time of 5 days. ABC Corporation urgently requires a logo and promotional banners within 48 hours for an upcoming product launch, prompting Zylker Designs to implement rush fees. The standard fees are $1,000 for logo design and $800 for promotional banners, with rush fees set at 30% and 20%, respectively. 

Rush fees for the logo and banners are calculated as follows:
Logo Rush Fee = $1,000 * 30% = $300
Banners Rush Fee = $800 * 20% = $160
Thus, the total fee for the rush order = $1,000 + $800 + $300 + $160 = $2,260

Today's custom function can help automate this process of calculating and applying rush fees to item rates. When creating an invoice, users can enter the percentage of rush fees for each item in the item-level custom field (created specifically for this purpose). After saving the invoice, the custom function is executed, calculating the revised item rates.

Pre-requisites:

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. Create a custom field called "Rush Fees (Percent)" to be displayed in the item table of invoices. The percentage of the item rate to be charged as rush fees should be entered in this field. 



3. Create another custom field called "Unit Rate" to be displayed in the item table of invoices. The purpose of this custom field is to store the original sales rate of the line item. 



4. Create a Check Box-type custom field by the name "Add Rush fees ?" for Invoices. Only when this field is ticked, the function will be executed.



Custom Function:

Navigate to Settings -> Automation -> Custom Functions -> +New Custom Function > Add the function code from this GitHub link -> Hit Save.

Workflow Rule: 
 
Go to Settings -> Automation -> Workflow Rules -> +New Workflow Rule and set up the workflow rule as shown below:-




In the final step of this workflow rule, associate the custom function you created and then hit Save.

Here's how it works:

After creating and saving the invoice as draft, the custom function will be executed. Initially, it copies the original sales rate to the Unit Rate (Custom) field. Then, it calculates the rush fees and adds it to the value in the Unit Rate field. The resultant is displayed in the Rate (Default) field. Following this, Zoho Books performs the calculation of Rate (Default field) * Quantity and fills the result in the Amount field.

Note: If you wish to hide the "Rate" - default field at the template level, go to Settings > Customisation > PDF Templates > Invoices > Edit > Table > Disable the checkbox for Rate field > Save. Now the invoice templates will only display the Unit Rate (Custom field), Rush Fees (Percent), Quantity field, and the Amount field.



If you wish to set up an alternative method for calculating rush fees, kindly send an email outlining your requirements to support[at]zohobooks[dot]com. We will be happy to help you.

See you next week with another interesting custom function! 

Regards,
Shireen Farhana
Zoho Books 

    Access your files securely from anywhere







                            Zoho Developer Community




                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                  • Ask the Experts





                                                            Manage your brands on social media



                                                                  Zoho TeamInbox Resources



                                                                      Zoho CRM Plus Resources

                                                                        Zoho Books Resources


                                                                          Zoho Subscriptions Resources

                                                                            Zoho Projects Resources


                                                                              Zoho Sprints Resources


                                                                                Qntrl Resources


                                                                                  Zoho Creator Resources



                                                                                      Zoho CRM Resources

                                                                                      • CRM Community Learning Series

                                                                                        CRM Community Learning Series


                                                                                      • Kaizen

                                                                                        Kaizen

                                                                                      • Functions

                                                                                        Functions

                                                                                      • Meetups

                                                                                        Meetups

                                                                                      • Kbase

                                                                                        Kbase

                                                                                      • Resources

                                                                                        Resources

                                                                                      • Digest

                                                                                        Digest

                                                                                      • CRM Marketplace

                                                                                        CRM Marketplace

                                                                                      • MVP Corner

                                                                                        MVP Corner









                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now


                                                                                            Zoho Show Resources

                                                                                              Zoho Writer

                                                                                              Get Started. Write Away!

                                                                                              Writer is a powerful online word processor, designed for collaborative work.

                                                                                                Zoho CRM コンテンツ



                                                                                                  Nederlandse Hulpbronnen


                                                                                                      ご検討中の方




                                                                                                              • Recent Topics

                                                                                                              • Function #53: Transaction Level Profitability for Invoices

                                                                                                                Hello everyone, and welcome back to our series! We have previously provided custom functions for calculating the profitability of a quote and a sales order. There may be instances where the invoice may differ from its corresponding quote or sales order.
                                                                                                              • Payment Vouchers

                                                                                                                Is there any Payment Vouchers in Zoho? How can we create payment for non-trade vendors, i.e. professional fees, rent, and payment to commissioner income tax?
                                                                                                              • API in E-Invoice/GST portal

                                                                                                                Hi, Do I have to change the api in gst/e-invoice portal as I use zoho e books for my e-invoicing. If yes, please confirm the process.
                                                                                                              • When I click on PDF/PRINT it makes the invoice half size

                                                                                                                When I click PDF / Print for my invoice in Zoho Books, the generated PDF appears at half size — everything is scaled down, including the logo, text, and layout. The content does not fill the page as it should. Could someone advise what causes Zoho Books
                                                                                                              • Search by contain letter in a column

                                                                                                                Hello, everyone I need a filter function that searches by letter in a cell, and it should be a macro. To clarify further, if I have a column with several names and I chose a search cell and what I want is search by a single letter, for example, "a" then
                                                                                                              • Archiving Contacts

                                                                                                                How do I archive a list of contacts, or individual contacts?
                                                                                                              • Enrich your contact and company details automatically using the Data Enrichment topping

                                                                                                                Greetings, I hope you're all doing well. We're happy to announce the latest topping we've added to Bigin: The Data Enrichment topping, powered by WebAmigo. This topping helps you automatically enhance your contact and company records in Bigin. By leveraging
                                                                                                              • Easier onboarding for new users with stage descriptions

                                                                                                                Greetings, I hope all of you are doing well. We're happy to announce a recent enhancement we've made to Bigin. You can now add descriptions to the stages in your pipeline. Previously, when creating a pipeline, you could only add stages. With this update,
                                                                                                              • Create an Eye-Catching Announcement Widget for Your Help Center

                                                                                                                Hello Everyone! In this week’s edition, let’s explore how to keep your customers updated with exciting news in the Help Center. See how ZylkerMobile wowed their customers by bringing updates right to their portal. ZylkerMobile, the renowned brand for
                                                                                                              • Zoho Books Invoices Templates

                                                                                                                It would be really helpful to have more advanced features to customise the invoice templates in Zoho Books. Especially I´m thinking of the spacing of the different parts of the invoice (Address line etc.). If you have a sender and receiver address in
                                                                                                              • Can add a colum to the left of the item in Zoho Books?

                                                                                                                I would need to add a column to the left of the item column in Books. When i create custom fields, i can only display them to the right of the item.
                                                                                                              • Verifying Zoho Mail Functionality After Switching DNS from Cloudflare to Hosting Provider

                                                                                                                I initially configured my domain's (https://roblaxmod.com/) email with Zoho Mail while using Cloudflare to manage my DNS records (MX, SPF, etc.). All services were working correctly. Recently, I have removed my site from Cloudflare and switched my domain's
                                                                                                              • AI Bot and Advanced Automation for WhatsApp

                                                                                                                Most small businesses "live" on WhatsApp, and while Bigin’s current integration is helpful, users need more automation to keep up with volume. We are requesting features based on our customer Feedbacks AI Bot: For auto-replying to FAQs. Keyword Triggers:
                                                                                                              • Improved Contact Sync flow in Google Integration with Zoho CRM

                                                                                                                Hello Everyone, Your contact sync in Google integration just got revamped! We have redesigned the sync process to give users more control over what data flows into Google and ensure that this data flows effortlessly between Zoho CRM and Google. With this
                                                                                                              • 2025 Ask the Experts sessions wrap-up : Key highlights from the experts

                                                                                                                Here is a rewind journey of our Ask the Experts (ATE) Sessions, where we brought you expert insights and practical best practices together in one place. This recap highlights the key takeaways, learnings, and best practices from all these sessions so
                                                                                                              • New Enhancements to Zoho CRM and Zoho Creator Integration

                                                                                                                Hello Everyone, We’ve rolled out enhancements to the Zoho Creator and Zoho CRM integration to align with recent updates made to the Zoho Creator platform. With enhancements to both the UI and functionality, This update also tightens access control by
                                                                                                              • How to disable the edit option in subform

                                                                                                                How to disable the edit option in subform
                                                                                                              • Power up your Kiosk Studio with Real-Time Data Capture, Client Scripts & More!

                                                                                                                Hello Everyone, We’re thrilled to announce a powerful set of enhancements to Kiosk Studio in Zoho CRM. These new updates give you more flexibility, faster record handling, and real-time data capture, making your Kiosk flows smarter and more efficient
                                                                                                              • Adding non-Indian billing address for my Zoho subscription

                                                                                                                Hey Need help with adding a non-Indian billing address for my Zoho subscription, trying to edit the address to my Singapore registered company. Won't let me change the country. Would appreciate the help. Regards, Rishabh
                                                                                                              • Is it possible to enforce a single default task for all users in a Zoho Projects ?

                                                                                                                In Zoho Projects, the Tasks module provides multiple views, including List, Gantt, and Kanban. Additionally, users can create and switch to their own custom views. During project review meetings, this flexibility creates confusion because different users
                                                                                                              • Move record from one custom module to another custom module

                                                                                                                Is it possible to create a button or custom field that will transfer a record from one custom module to another? I already have the 'Leads' module used for the Sr. Sales department, once the deal is closed they convert it to the 'Accounts' module. I would like to create a 'Convert' button for a custom module ('Locations') for the department that finds locations for each account. Once the location is secured, I want to move the record to another custom module called 'Secured Locations'. It's basically
                                                                                                              • Convert Lead Automation Trigger

                                                                                                                Currently, there is only a convert lead action available in workflow rules and blueprints. Also, there is a Convert Lead button available but it doesn't trigger any automations. Once the lead is converted to a Contact/Account the dataset that can be fetched
                                                                                                              • Notes Not Saving

                                                                                                                Hello,  My notes are continuously not saving.  I make sure to save them, I know the process to save them.  It is not operator error.  I go back into a Leads profile a while later and do not see the previous notes that I have made.  I then have to go back and do unnecessary research that would have been in the notes in the first place.  Not a good experience and it is frustrating.  Slows me down and makes me do unnecessary work.  Please resolve.   As a quick heads up, deleting cookies is not a fix
                                                                                                              • Integration between "Zoho Sprints Stories" and "Zoho Projects Tasks/Subtasks"

                                                                                                                We have two separate teams in our organization using Zoho for project management: The Development team uses Zoho Sprints and follows Agile/Scrum methodology. The Infrastructure team uses Zoho Projects for traditional task-based project management. In
                                                                                                              • Prefill form with CRM/Campaigns

                                                                                                                I created a form in zForms and created prefill fields. I added this to the CRM and selected the fields so when sending from the CRM, the form works great. However, I want to use the same form in Campaigns and I want it to pull the data from CRM (which
                                                                                                              • Notes badge as a quick action in the list view

                                                                                                                Hello all, We are introducing the Notes badge in the list view of all modules as a quick action you can perform for each record, in addition to the existing Activity badge. With this enhancement, users will have quick visibility into the notes associated
                                                                                                              • Triggering a campaign automation from a Form

                                                                                                                I used Forms to create a lead form that is accessed by a button on my website. The field information flows into the CRM. However, I am trying to figure out how to use Campaign automations to start a workflow (series of campaign emails) that is triggered
                                                                                                              • Employee Appraisal Applicability - Why is Date of Joining Hard-Coded?

                                                                                                                In the new (to me, at least) Performance Appraisal Cycle wizard, it's possible to set criteria to determine for whom the appraisal process should apply. This makes sense on its face. However, one MUST use the Date of Joining criterion as a filter. Why
                                                                                                              • Formula fields

                                                                                                                Zoho People now supports formula fields. This post illustrates it. Formula fields are fields whose value is calculated instead of being entered by the user. Using this, number, decimal and date manipulations can be done. The value of this field could be numeric or date depending on the output of the formula. In date manipulations, the result will be given in milliseconds, which you can format as per you need. The operators we support are +, - , *, /. Formula fields get recalculated automatically
                                                                                                              • Copy paste from word document deletes random spaces

                                                                                                                Hello Dear Zoho Team, When copying from a word document into Notebook, often I face a problem of the program deleting random spaces between words, the document become terribly faulty, eventhough it is perfect in its original source document (and without
                                                                                                              • Is it possible to use module field filters via URL parameters?

                                                                                                                It would be really convenient if I could quickly link to a filter. For reference, this is the filter functionality I'm referring to: https://help.zoho.com/portal/en/kb/crm/customize-crm-account/advanced-filters/articles/advanced-filters For example: My
                                                                                                              • Transitioning FESCO Bill Project to Zoho Sheets and Integration Options

                                                                                                                Hello Zoho Support, I'm considering transitioning my FESCO bill project from Google Sheets to Zoho Sheets and wanted to know if there are integration options to seamlessly migrate our existing work. You can view our platform here, any guidance would be
                                                                                                              • Support for Custom Fonts in Zoho Recruit Career Site and Candidate Portal

                                                                                                                Dear Zoho Recruit Team, I hope you're doing well. We would like to request the ability to use custom fonts in the Zoho Recruit Career Site and Candidate Portal. Currently only the default fonts (Roboto, Lato, and Montserrat) are available. While these
                                                                                                              • Lightbox Pop-up form

                                                                                                                I would like to embed my form using the lightbox pop up. I don't want it to load automatically. I want it to load when some clicks the button. I can see this option, however when I use the "show pop-up launch button" on the website, the button automatically
                                                                                                              • Unable to remove the “Automatically Assigned” territory from existing records

                                                                                                                Hello Zoho Community Team, We are currently using Territory Management in Zoho CRM and have encountered an issue with automatically assigned territories on Account records. Once any account is created the territory is assigned automatically, the Automatically
                                                                                                              • Data Processing Basis

                                                                                                                Hi, Is there a way to automate the data processing for a candidate every time an application arrives from job boards, without requiring manual intervention? That is, to automatically acquire consent for data processing. I've seen a workflow that allows
                                                                                                              • Lightbox Pop-up form

                                                                                                                I would like to embed my form using the lightbox pop up. I don't want it to load automatically. I want it to load when some clicks the button. I can see this option, however when I use the "show pop-up launch button" on the website, the button automatically
                                                                                                              • Zoho CRM for Everyone's NextGen UI Gets an Upgrade

                                                                                                                Hello Everyone We've made improvements to Zoho CRM for Everyone's Nextgen UI. These changes are the result of valuable feedback from you where we’ve focused on improving usability, providing wider screen space, and making navigation smoother so everything
                                                                                                              • Customer Management: #5 Never Let the Customer Slip

                                                                                                                When Rahul started Knight's Watch Consulting, his focus was simple: deliver good work and keep clients happy. He offered one-time consulting projects, monthly advisory retainers and usage-based support for growing clients. Business was steady, and customers
                                                                                                              • 10GB Email Storage Limits in Zoho CRM

                                                                                                                We’ve had Zoho One for almost 5 years and have always synced our emails from Gmail via IMAP… As of late, we’ve run into issues with our emails not syncing, due to being over the 10GB storage cap… What’s very odd is that we haven’t changed a thing? I know
                                                                                                              • Next Page