Function #35: Automatically create a Task when a Quote is sent

Function #35: Automatically create a Task when a Quote is sent



Hello everyone, and welcome back to our series!

A business employs various approaches to boost its revenue, and one such method involves promptly following up with customers to convert Quotes into actual sales. The challenge lies in handling numerous quotes while consistently staying proactive in contacting customers to avoid missing potential opportunities. 

An effective solution to address this challenge is utilizing the Tasks module in Zoho Books. Here, tasks can be created specifically for quotes that need follow-up and can be assigned to users. Additionally, these tasks can be set to send periodic reminders, ensuring that you receive timely prompts to monitor the status of your quotes. 

The entire process described above can be automated using today's custom function. It automatically creates a task when a quote is sent and also populates task details from the corresponding quote. This function not only streamlines the workflow but also provides a systematic and efficient approach to handling the follow-up process.

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 dropdown-type custom field called "Priority" for Quotes, similar to the default "Priority" field found in Tasks. Populate the dropdown options with the values provided below:-
  • Very Low
  • Low
  • Normal
  • High
  • Very High


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.

Here's how it works:

Whenever a quote is sent/marked as sent and the "Priority" custom field is filled, the custom function will be executed, automatically creating a corresponding task. The task details are fetched from the quote and populated as follows:
  • Title - Follow-up of the Quote QT - Quote#
  • Related Contact - Customer selected in the quote
  • Due Date - Expiry Date (If Expiry date is not chosen, the function will automatically set the Due date as 7 days from the Quote date)
  • Assign To - User who created the quote
  • Priority - Option chosen in the dropdown-type custom field
  • Notify user via email - Enabled
  • Set Reminder - Enabled
  • Remind Before - 3 days (Daily) (This number can be replaced in line 15 of the script)
  • Alert Type - Email & In-app Notification
Try out this custom function and share your feedback in the comments. Should you require additional customizations, don't hesitate to contact us at support[at]zohobooks[dot]com. We're here to assist you!

See you next week with another useful custom function. Until then, wishing you all a joyous and prosperous New Year!

Regards,
Shireen Farhana
Zoho Books