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 FormsRetailOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceForms for Solopreneurs
                              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
                              Forms for Government
                              Intake FormsLegal
                              Mobile App
                              Form DesignerHR
                              Mobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic FormsInsurance
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsWufoo alternativeEncrypted Forms
                              Accessible FormsTypeform alternativeSecure 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

                                                                  Use cases

                                                                  Make the most of Zoho Desk with the use cases.

                                                                   
                                                                    

                                                                  eBooks

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

                                                                   
                                                                    

                                                                  Videos

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

                                                                   
                                                                    

                                                                  Webinar

                                                                  Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                                                   
                                                                    
                                                                  • Desk Community Learning Series


                                                                  • Meetups


                                                                  • Ask the Experts


                                                                  • Kbase


                                                                  • Resources


                                                                  • Glossary


                                                                  • Desk Marketplace


                                                                  • MVP Corner



                                                                    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 Label Templates in Zoho Writer

                                                                                                                              How to merge and print labels? Mailing labels are commonly used in letters and packages to identify the addressee and the sender information. These labels are used for various business purposes, such as sending a monthly billing statement to your ...
                                                                                                                            • 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 setup fields in fillable templates in Zoho Writer

                                                                                                                              Overview A fillable template in Zoho Writer is a document designed with interactive form fields that allow users to enter, edit, or submit data directly within the document, just like filling out a digital form. There are 20 field types that are ...
                                                                                                                            • 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 ...
                                                                                                                              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