- HOME
- Tips and Tricks
- Generate personalized usage-based invoices using the DATEDIF function in Writer's merge templates
Generate personalized usage-based invoices using the DATEDIF function in Writer's merge templates
- Last Updated : December 5, 2024
- 32 Views
- 2 Min Read
Hello everyone,
This article explains how to use Writer's merge templates to automatically generate and share customized invoices with dynamically calculated amounts based on usage.
Let's say you're an outdoor advertisement partner that runs ads on billboards for a certain number of days every month. You can use the DATEDIF function to dynamically calculate how long a client used your service based on the start and end date, and determine the total amount for a usage-based invoice.
Here's a step by step guide to achieve this.
Step 1: Open a new merge template and design an invoice template by adding the required placeholder fields, such as the invoice number, client name, and invoice date. Detailed steps on template creation
Step 2: Insert a table with the start and end date fields and the number of billing days in different rows.
Step 3: Insert the DATEDIF function to calculate the number of billing days between the billing start and end dates and populate the value in the number of billing days column. Detailed steps on calculations with DATEDIF
Step 4: Add a formula to calculate the invoice amount by multiplying the number of billing days and the daily rate.
Step 5: Connect your data source with the relevant fields, and replace the placeholder fields with the fields from your data source.
Step 6: Click Preview Merge to ensure the invoice amount is calculated correctly based on the number of billing days.
Step 7: Choose Merge & send via email as the output option. Detailed steps on merging for emails
Step 8: Click Run Merge. The invoice amount will be dynamically calculated for each customer based on the billing days, and the invoices will be shared with them. You can also schedule the merge to generate and share the invoices to customers at your preferred time.
This is just one example of the utility of the DATEDIF function. You can use it in any case where you have to dynamically calculate the number of days.
Try the DATEDIF function and let us know your feedback or comments at support@zohowriter.com or support@eu.zohowriter.com.
If you have any function that you want us to add to Zoho Writer, please let us know in the comments.
Until then,
Happy automating!