Hey IH! We're back with another exciting update for Doxy - our Google Docs to PDF automation engine. This time, we're tackling a problem that plagues many document workflows: static content.
The Problem:
Imagine you have a contract template that needs to include specific clauses based on the client's location or industry. Or perhaps an invoice where discounts are applied based on order volume. Previously, you'd need to create separate templates for each scenario or manually edit the document before generating the PDF. Not ideal, right?
The Solution: Conditional Rendering
With Doxy's new conditional rendering feature, you can now create truly dynamic templates where content appears or disappears based on rules you define. Say goodbye to static PDFs and hello to personalized documents tailored to each recipient.
How It Works:
It's simple and intuitive:
Wrap any content you want to make conditional within #if:variable_name# and #endif:variable_name# tags in your Google Docs template
Doxy automatically detects these conditional blocks and adds them to your template schema.
• When generating documents, simply provide the boolean value for each conditional variable (true or false).
• Doxy will then render the content only if the condition is met.
Example:
Let's say you want to include a discount clause in your invoice template only for orders above $1,000:
#if:high_value_order#
Congratulations! You qualify for a 10% discount on this invoice.
#endif:high_value_order#When generating the invoice, you'd pass high_value_order=true for orders exceeding $1,000, and high_value_order=false for smaller orders. Doxy will handle the rest!
Benefits:
• Create one template for multiple scenarios: No more duplicate templates or manual editing.
• Personalize documents at scale: Deliver tailored content to each recipient based on their specific needs.
• Simplify complex workflows: Reduce errors and inconsistencies by automating conditional logic.
What's Next?
We're already working on adding more advanced conditional logic, including:
• Nested conditions: For even more granular control over your content.
• Else and elseif statements: To handle multiple conditions within a single block.
We believe conditional rendering is a game changer for document automation. Try it out and let us know what you think!
Happy automating! 🚀
P.S. Special shout-out to all the early adopters who provided valuable feedback during the beta phase. You rock! 🤘
This update sounds fantastic, Mat!