Welcome to Portal

?Unknown\pull-down

Welcome to Zoho Cares

Bienvenido a Soporte de Zoho

Search our knowledge base, ask the community or submit a request.

Here goes one of the highly sought-after custom functions in Zoho Books. If you find yourself needing to apply additional charges to customers on their invoices (say credit card surcharges, or fuel charges applicable to customers from a certain region, or transaction fees), this function would save you a good deal of time and effort by doing it automatically and accurately for you. 

The function we've written will add the additional charges as a new line item in the invoices you create. 

Prerequisites:

Create a Checkbox type custom field named "Charge Customer" (or anything similar) for the Customers module. This enables you to apply the charges to invoices of specific customers by ticking the checkbox at customer level. We also have the Bulk Update option to update this value for multiple customers at once. 

Custom Function: 

Head to Settings -> Automation -> Custom Functions -> +New Custom Function to set it up. 



You can get the code from this GitHub link. The first 4 lines of the function code (percentage of the charges, account name, tax name, item name) can be modified as per your need before saving the function. 

You must also create a connection named "zbooks" for the function to work. Watch this to know how to create it:



Workflow Rule: 

The final step towards jump-starting the automation is setting up a workflow rule. Go to Settings -> Automation -> Workflow Rules -> +New Workflow Rule and configure it as shown below. 




Select the respective custom function finally and save the workflow. This will execute on all the upcoming invoices you create (after the invoice is saved) for customers whose checkbox custom field is enabled. 

Feel free to connect with us if you require further customization for this function.

Follow our page to get updates when new posts go up and stay tuned for more useful custom functions coming your way! 

Regards,
Divya R
Zoho Books

18 Replies
Reply
3 more
  • 9 months ago

A huge need by many companies is the ability to charge customer when they are paying with credit card.  This workaround still does not work as we don't know how customers will pay when we send the invoice.  Even more, they might pay with a credit card one time and with a check for a future invoice.

  • 8 months ago

Mary, agreed, we have the same situation here and was trying to see how we can use this function on those occasions only.  

  • 8 months ago

Agreed. It is time consuming and unprofessional to continually ask customers before they pay which method of payment they will be using.

  • 7 months ago

The custom function is ok but not quite what we need, 

The fees need to be added only if the customer comes to the online payment page, if not they can pay without those fees normally.

I checked the function it looks like for this to work we need to make the decision in advance on what method 5he customer would use. That's not what I want.

We want to give the customer the standard invoice.

If they choose to pay online via credit card, then this fee gets added

  • 7 months ago

It's crazy that this is a custom function but not properly built out in the app.  If we had to do this we can manually add the credit card surcharge 

  • 6 months ago

This requires quite some extra manual work and potentially extra communication with the client - which is terrible when we get 10-20 new clients every week. 
Ideally, the invoice will show the original total, in case customers decide to pay via check and the fee will only be added if they pay via the payment processor.  
Can you suggest a different workaround?

  • 6 months ago

Hello
,

As mentioned in our previous correspondence, we currently do not have an alternative solution to automate the inclusion of transaction fees in invoices. Please use our Custom Function for the time being and if you require any specific customizations, feel free to reach out. We are happy to assist.

Regards,
Shireen Farhana
Zoho Cares

  • 4 months ago

Hello
Thanks for posting this. I followed the instructions to create the custom function. when I execute the function I get the following error message "Check and update the code in line 24 as there is a Exception : Invalid JSON Format String". Do you have any idea on what might be producing the error?

Thanks,
Wesam

Screenshot 2024-09-23 at 22.59.42.png
Screenshot 2024-09-23 at 22.59.42.png472 KB
  • 4 months ago

Hello
,

We have revised the script. Please update the Custom Function with the new version found in the GitHub link. This should resolve the error and the function will work as intended.

Regards,
Shireen Farhana
Zoho Cares 

  • 4 months ago

I love the concept of this idea. Would it not be better served to have the checkbox in the actual invoice itself so that the box may be ticked if a customer comes into a store and decides to pay with card in the store?

  • 4 months ago

Thank you for the suggestion
. That's definitely an option. Adding the checkbox field at the invoice level would give users more flexibility to decide when the function should be executed.

When setting up the automation, you can create the "Charge Customer" custom field for invoices rather than for customers, while keeping the other settings unchanged. This way, the function will be executed only for those invoices where the checkbox is marked as TRUE.

Regards,
Shireen Farhana
Zoho Cares

Hi. Not 100% sure what i'm doing wrong. I've made the connection to Books, but everytime I click on "save and associate" in the custom function, i get the errors:

This happens when I replace the entire code with the code from github.
If I keep the original "void automation.additional..." and paste it within the braces, I only get the "failed to update function". Any help would be greatly appreciated. Thanks

  • 2 months ago

Very useful forum, but I can’t seem to add this custom function without having zoho billing. 
My average sales are way below than thr monthly fee for billing and I’m a sole entrepreneur. Anyway of adding this custom workflow rule to the free zoho invoicing module ?

Can this function be modified so that it applies to retainer invoices? 

Then we'll also add it to the final invoice minus any retainers that the customer already paid

I’d like to know if the ability to add additional charges to invoices is now a built-in feature in Zoho Books. If this feature is not available, is there a timeline for its implementation? This functionality is critical for businesses that need to pass on extra costs, such as payment processing fees, directly to customers. If it is not planned for implementation, please let us know so we can explore other vendors.

Looking forward to your response.

Reply to R DivyaA
/* */
  • 12
  • Insert
  • Plain text
Add Comment
(Up to 20 MB )