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

Ask AI to explain this: ChatGPT | Perplexity | Claude

Overview

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 FormsLegal
                                Mobile App
                                Form DesignerHR
                                Mobile 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 FormsFormstack alternativeEncrypted Forms

                                Wufoo alternativeSecure Forms

                                TypeformWCAG


                                    All-in-one knowledge management and training platform for your employees and customers.

                                              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 ...
                                                                                                                                • Configure workflow in Zoho Books with Writer's mail merge

                                                                                                                                  Overview Use Zoho Writer with Zoho Books to create branded PDFs and automate document generation from your Books data. You can either use the Zoho Writer Templates extension in Zoho Books for one‑click document generation, or configure ...
                                                                                                                                • How to insert CRM Email Templates into Merge and Send emails

                                                                                                                                  Overview Reuse the email templates when you merge and email documents in writer. The merged document will be sent as an attachment along with the selected CRM template's content as the email body. Steps Check the Merge & send via email as the output ...
                                                                                                                                • How to sort data in repeat blocks in merge templates

                                                                                                                                  Ask AI to explain this: ChatGPT | Perplexity | Claude Overview You can organize your repeat table data by sorting it using specific merge fields. For example, to list employees by department, and then by their date of joining within each department, ...
                                                                                                                                • How to design templates or create documents using AI in Zoho Writer

                                                                                                                                  Overview Zia now enables you to design templates or create different types of business documents such as sales orders, resumes, and proposals with easy-to-use prompts. You can choose between Zoho's AI or OpenAI to design templates or create ...
                                                                                                                                  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