This API merges multiple documents using the values specified in the docIds parameter into a single PDF document with the name docFileName. This API enhances mergeDocsToPDF by providing the ability to automatically display or hide the footer in the merged PDF.

Before invoking this API, CustomClass.ActionParams must be instantiated by passing the parameters described below. The parameters are then passed to the API when it is invoked.

API

Signature

createPDF

webService static Id createPDF(Apttus.CustomClass.ActionParams params)
Request Parameters
NameTypeDescription
parentIdIdThe Id of the parent object to associate with the result (merged) document.
docIdsListA collection of the Ids of the documents to merge into a PDF document.
docFileNameStringThe file name for the PDF document.
sessionIdStringThe Salesforce session Id.
sessionUrlStringThe Salesforce server Id.
addFooterBooleanDisplay/hide the footer in the merged PDF.

Note

Footers in the final PDF will always list the original filename of the input document for the collated page.

All redlines that are present in input documents are accepted prior to collation.

Response Parameter
NameTypeDescription
resultIdThe Id of the generated (merged) PDF.

Code Sample

CustomClass.ActionParams objParam = new CustomClass.ActionParams();
objParam.SessionId = ServerInfo.getSessionId();
objParam.SessionUrl = ServerInfo.getServerUrl();
objParam.ParentId = '{parentID}';
objParam.DocIds = new ID[]{ID.valueOf('{docId}'),
ID.valueOf('{docId}')};
objParam.DocFileName = 'My_Merged_PDF.pdf';
objParam.AddFooter = true;
ID mergedPDF = MergeWebService.createPDF(objParam);
CODE

Note

Values inside '{ }' in the above code sample denote an Id is required.

Integration Details

Use the following information in your integrations with Apttus Contract Management Web Services API. For information on how to get started, refer to Integrating Conga CLM with External Systems.

API Prerequisites

None.

Request/Response XML

Example Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mer="http://soap.sforce.com/schemas/class/Apttus/MergeWebService" xmlns:cus="http://soap.sforce.com/schemas/class/Apttus/CustomClass">
   <soapenv:Header>
      <mer:SessionHeader>
         <mer:sessionId>00D0S0000000Pa8!ARUAQGAA1VTGcAG1zxylmAb1RJmiUnspuO5dzL53Xsx3jVhYI3oWTqB2dqzdBeswmwj_I49aI6BgIM4veO1At3rLd9z6BjXv</mer:sessionId>
      </mer:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <mer:createPDF>
         <mer:params>
            <cus:DocFileName>Merged.PDF</cus:DocFileName>
            <cus:DocIds>0690S000000SvjOQAS</cus:DocIds>
            <cus:DocIds>0690S000000SvnkQAC</cus:DocIds>
            <cus:ParentId>a070S000002bSFzQAM</cus:ParentId>
            <cus:SessionId>00D0S0000000Pa8!ARUAQGAA1VTGcAG1zxylmAb1RJmiUnspuO5dzL53Xsx3jVhYI3oWTqB2dqzdBeswmwj_I49aI6BgIM4veO1At3rLd9z6BjXv</cus:SessionId>
            <cus:SessionUrl>https://testmanagedclm--tbox.my.salesforce.com/services/Soap/u/50.0/00D0S0000000Pa8</cus:SessionUrl>
         </mer:params>
      </mer:createPDF>
   </soapenv:Body>
</soapenv:Envelope>
XML

Example Response

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://soap.sforce.com/schemas/class/Apttus/MergeWebService">
   <soapenv:Body>
      <createPDFResponse>
         <result>0690S000000SvzWQAS</result>
      </createPDFResponse>
   </soapenv:Body>
</soapenv:Envelope>
XML