How to use the record_id parameter in Zoho Writer's merge templates

How to use the record_id parameter in Zoho Writer's merge templates

The record_id parameter in Zoho Writer's merge templates allows you to easily fetch the values of the desired fields based on the record_id value. With this new parameter, you do not have to manually map every field used in the template in your Deluge code.

Prerequisites for using the record_id parameter   

Ensure these conditions are met before using the record_id parameter:
  1. You should have connected your merge template to a data source.
  2. You should have the necessary permissions to fetch records from the data source.
  3. You must have sufficient automation credits to generate documents. Learn more about credits and pricing.

Zoho apps supported by the Merge APIs  

At the moment, the Merge APIs integrate with these Zoho apps to fetch the relevant records using the record_id:
  1. Zoho CRM
  2. Zoho Creator
  3. Bigin
  4. Zoho Recruit

Sample Code

Here’s an example of how to use the record_id parameter in a Deluge code to merge a specific record from Zoho CRM into a Writer template:
  1. document_id = "4tx4ie20882e93a3b40a58a613213b5491b99";
  2. recordId = "154845000004785001";
  3. outputsettings = Map();
  4. outputsettings.put("doc_name","Student Grade PDF");
  5. outputsettings.put("folder_id","mt3vx64b53cadf1dxxxxxxxxxxx");
  6. outputsettings.put("output_format","pdf");
  7. param = Map();
  8. param.put("record_id",recordId);
  9. param.put("output_settings",outputsettings);
  10. response = invokeurl
  11. [
  12. url :"https://zohoapis.com/writer/api/v2/documents/1mg03e345d3ecbe4241958089f6cd9a55421d/merge/store"
  13. type :POST
  14. parameters:param
  15. connection:"writercrm"
  16. ];
  17. info response;
This Deluge code fetches the data for the given record_id and merges it into the document template to dynamically generate a personalized document.

Benefits of the record_id parameter

  1. The required records and their fields are fetched and mapped automatically using the record ID
  2. The process is accurate and error-free
  3. Automation saves time and effort
Refer this forum post to learn how record_id parameter simplifies Deluge code. 

      Create. Review. Publish.

      Write, edit, collaborate on, and publish documents to different content management platforms.

      Get Started Now


        Access your files securely from anywhere

          Zoho CRM Training Programs

          Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

          Zoho CRM Training
            Redefine the way you work
            with Zoho Workplace

              Zoho DataPrep Personalized Demo

              If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

              Zoho CRM Training

                Create, share, and deliver

                beautiful slides from anywhere.

                Get Started Now


                  Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                  BOOK A SESSION







                              Quick LinksWorkflow AutomationData Collection
                              Web FormsEnterpriseOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceAccessible Forms
                              Digital FormsMarketingForms for Small Business
                              HTML FormsEducationForms for Enterprise
                              Contact FormsE-commerceForms for any business
                              Lead Generation FormsHealthcareForms for Startups
                              Wordpress FormsCustomer onboardingForms for Small Business
                              No Code FormsConstructionRSVP tool for holidays
                              Free FormsTravelFeatures for Order Forms
                              Prefill FormsNon-Profit
                              Intake FormsLegalMobile App
                              Form DesignerHRMobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic Forms
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsEncrypted Forms

                              Secure Forms

                              WCAG

                                      Create. Review. Publish.

                                      Write, edit, collaborate on, and publish documents to different content management platforms.

                                      Get Started Now






                                                        You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                            Manage your brands on social media


                                                              • Desk Community Learning Series


                                                              • Digest


                                                              • Functions


                                                              • Meetups


                                                              • Kbase


                                                              • Resources


                                                              • Glossary


                                                              • Desk Marketplace


                                                              • MVP Corner


                                                              • Word of the Day


                                                              • Ask the Experts


                                                                Zoho Sheet Resources

                                                                 

                                                                    Zoho Forms Resources


                                                                      Secure your business
                                                                      communication with Zoho Mail


                                                                      Mail on the move with
                                                                      Zoho Mail mobile application

                                                                        Stay on top of your schedule
                                                                        at all times


                                                                        Carry your calendar with you
                                                                        Anytime, anywhere




                                                                              Zoho Sign Resources

                                                                                Sign, Paperless!

                                                                                Sign and send business documents on the go!

                                                                                Get Started Now




                                                                                        Zoho TeamInbox Resources





                                                                                                  Zoho DataPrep Demo

                                                                                                  Get a personalized demo or POC

                                                                                                  REGISTER NOW


                                                                                                    Design. Discuss. Deliver.

                                                                                                    Create visually engaging stories with Zoho Show.

                                                                                                    Get Started Now









                                                                                                                        • Related Articles

                                                                                                                        • How to track merge status and handle errors in Zoho Writer

                                                                                                                          Overview You can track the status of the merge jobs using email notifications and the merge logs. While email notifications help you track the merge initiation and completion status, the merge logs help you track the status of jobs in progress, along ...
                                                                                                                        • How to merge Writer templates using Zoho Flow

                                                                                                                          We're working on a Zoho Flow-Writer integration to help you pick template documents from Writer, place merge fields on them and merge it with data from Zoho Services. Find below steps to merge Writer Documents and with Zoho Creator Form fields. Steps ...
                                                                                                                        • How to merge and send document via email in Zoho Writer

                                                                                                                          Overview The Merge and Send via Email option in Zoho Writer lets you generate personalized documents for each record in your data source and automatically send them via email. Each recipient gets a customized document as an attachment or inline ...
                                                                                                                        • How to merge subform fields and image field via Zoho Writer's Merge APIs?

                                                                                                                          Overview Zoho Writer's Merge API enables the dynamic population of documents using data from Zoho CRM. This includes merging not only standard fields but also related list (subform) fields and image fields. This guide outlines the steps required to ...
                                                                                                                        • Configure workflow in Zoho Books with Writer's mail merge

                                                                                                                          With the Zoho Books and Zoho Writer merge integration, you can easily generate customized documents, like shipping labels or invoices, directly from your Zoho Books data. For instance, if you need to create labels for customer orders that include ...
                                                                                                                          Wherever you are is as good as
                                                                                                                          your workplace

                                                                                                                            Resources

                                                                                                                            Videos

                                                                                                                            Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                            eBooks

                                                                                                                            Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                            Webinars

                                                                                                                            Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                            CRM Tips

                                                                                                                            Make the most of Zoho CRM with these useful tips.



                                                                                                                              Zoho Show Resources