Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

Show Page Sections

download

Generate and Email Documents

Using High Volume Document Generation API, generate PDF documents and send emails using HTML templates.

Prerequisites

Use Case

In this use case, we use an HTML email template and an HTML template to merge with data from CSV or JSON data, convert it to PDF format and email it via Conga Advantage Platform.

Step 1: Create an HTML Template

Create an email template on using the HTML Editor. Once done, copy the template's file ID. For more information on how to create a template and get the File ID, see the following topics:

Step 2: Create the Merge Request

Create a merge request to generate the document. The merge request contains several parameters that determine which features are included in the generated document. An example of the parameters as they appear in JSON is as follows:{ "dataFileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "templateIds": [ "3fa85f64-5717-4562-b3fc-2cE963f66afa6" ], "emailTemplateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "emailProvider": "CongaPlatform", "format": "Json" }Here is an example of the High Volume Doc Gen API method to merge and email the document:
MethodPOST
Request Endpoint https://prod-rls10.congacloud.com/api/highvolumemerge/v1/merge
Request Body { "dataFileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "templateIds": [ "3fa85f64-5717-4562-b3fc-2cE963f66afa6" ], "emailTemplateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "emailProvider": "CongaPlatform", "format": "Json" }
Example JSON file data[ { "Id": "a24c9f37-0456-4623-a2de-459b8f5e1221", "EmailOptions": { "From": { "Address": "chris.miller@example.com", "DisplayName": "Chris Miller" }, "To": [ { "Address": "amy.johnson@example.com", "DisplayName": "Amy Johnson" }, { "Address": "steve.davis@example.com", "DisplayName": "Steve Davis" } ], "Cc": [ { "Address": "tony.lee@example.com", "DisplayName": "Tony Lee" } ], "Bcc": [] }, "DocumentOptions": { "OutputName": "contract.pdf" }, "Data": { "CONTACT_FIRSTNAME": "Oliver", "OPPORTUNITY_NAME": "Cloud Solution Partnership", "ACCOUNT_NAME": "Acme Inc", "Conga_Doc_Link": "https://example.com/doc1", "USER_FIRSTNAME": "Daniel", "USER_NAME": "Daniel Smith", "USER_TITLE": "Senior Manager", "USER_CUSTOM_ORG_NAME": "Smith Consulting", "USER_PHONE": "555-123-4567", "USER_EMAIL": "daniel.smith@example.com", "OppLineItems": [ { "PRODUCT_NAME": "Service Plan", "OPPORTUNITY_LINEITEM_UNITPRICE": "$200", "OPPORTUNITY_LINEITEM_QUANTITY": 10, "OPPORTUNITY_LINEITEM_TOTALPRICE": "$2000" }, { "PRODUCT_NAME": "Consultation", "OPPORTUNITY_LINEITEM_UNITPRICE": "$500", "OPPORTUNITY_LINEITEM_QUANTITY": 5, "OPPORTUNITY_LINEITEM_TOTALPRICE": "$2500" } ] }, } ]