Function #29: Auto-populate Expiry date on Quotes

Function #29: Auto-populate Expiry date on Quotes

Greetings everyone!

A quote (Formerly known as an estimate) is a document sent to customers containing a detailed overview of items and their prices for potential purchase. The quoted prices usually have a specific validity period, after which the proposal becomes void. Within this timeframe, customers have the option to accept or reject the quotation.

In Zoho Books, when creating a quote, you can specify the "Expiry Date," to indicate when the proposal loses its validity. Instead of manually selecting this date, you can configure a Field Update to automatically populate a static expiry date or a dynamic date based on specific criteria. 


Furthermore, if you want the expiry date to be populated based on the "Quote Date," today's custom function can be used. The function will automatically populate the expiry date on a quote, setting it "n" number of days from the quote date.

Here's how it works:

Suppose you use the custom function to set the expiry date as 15 days from the quote date. When you create and save a quote with the "Quote date" set as 1.11.2023, the function will kick in, dynamically populating the "Expiry date" as 16.11.2023.



Prerequisites: 

1. Create a Connection named "zbooks" to successfully execute the function. You can watch the GIF attached below to learn how to create the connection. 



Custom Function:

Navigate to Settings -> Automation -> Workflow Actions -> Custom Functions -> +New Custom Function > Add the function code from this GitHub linkIn the variable "numberDaysTobeExtended," you can specify the number of days to determine the expiry date.

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 the workflow, choose the custom function you created and then hit "Save".

Do give this function a try and let us know how you liked it. If you have any questions, don't hesitate to reach out to our support team at support[at]zohobooks[dot]com.

See you all next week with another interesting custom function!

Regards,
Shireen Farhana 
Zoho Books