Function #41: Notify users when sales orders exceed the credit limit

Function #41: Notify users when sales orders exceed the credit limit



Hello everyone, and welcome back to our series!

As you're aware, Zoho Books lets you set credit limits for your customers, that can be monitored in both invoices and sales orders. Previously, we shared a custom function that can alert users when an invoice exceeds the credit limit. Today, we bring you a similar function for sales orders. It will automatically send email notifications to specific users when a sales order exceeds the credit limit.


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. Create a Check Box-type custom field called "Notify about Credit Limit?" for the users. The email notifications about the credit limit will be sent only to those users for whom the checkbox is ticked. 

Note: If you have already created this custom field while implementing Function #40 and have ticked it for specific users, then the same users will also be notified about the sales orders. 



Custom Function:

Navigate to Settings -> Automation -> Workflow Actions -> 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.



If you have enabled credit limits for both sales orders and invoices, implement today's custom function along with Function #40. This ensures that you receive notifications whenever an invoice or sales order surpasses the credit limit. If you need any assistance with setting up the function, feel free to contact us at support[at]zohobooks[dot]com.

See you all next week with another custom function.

Regards,
Shireen Farhana
Zoho Books