Generates a supporting document, such as Contract Summary, Renewal Letter, and Termination Letter, using the template specified by the templateId and is associated with the agreement record represented by the agreementId.


API

Signature

generateSupportingDoc

webService static Id generateSupportingDoc(Id templateId, Id agreementId, String pLevel, String docFormat, String sessionId, String serverUrl)



Request Parameters
NameTypeDescriptionRequired?
templateIdIDThe id of the template used to generate the word document.Yes
agreementIdIDThe id of the agreement providing the content for the document.Yes
pLevelStringThe protection level to apply to the document. Valid values are:
  • Full access
  • Insert comments only
  • Insert comments and tracked changes only
  • Read only
  • Fill in form fields only
Yes
docFormatStringIndicates whether the document will be:
  • DOC
  • DOCX
  • PDF
  • RTF
Yes
sessionIdStringThe Salesforce session id.Yes
serverUrlStringThe Salesforce server id.Yes



Response Parameter
NameTypeDescription
resultIDThe id of the generated document.


Code Sample

ID templateId = 'a036100000Fha5D';
ID agreementId = 'a016100000Che3D';
String pLevel = 'Full access';
String docFormat = 'DOC';
String sessionId = sessionId; //This is the session Id.
String serverUrl = System.Url.getSalesforceBaseUrl().toExternalForm() + '/services/Soap/u/50.0/' + UserInfo.getOrganizationId();
ID docId = Apttus.MergeWebService.generateSupportingDoc(templateId,agreementId,pLevel,docFormat,sessionId,serverUrl);
CODE

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">
   <soapenv:Header>
      <mer:SessionHeader>
         <mer:sessionId>00D020000008lUh!AQYAQPYE.vw_Vh7FI.cV871nm9WWqIdhVINQJIl7PDNzr3fLVNdGjwk9qTJbDYIRoxbfpa44bpuIyeyVxEepPxdubr_AWjOv</mer:sessionId>
      </mer:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <mer:generateSupportingDoc>
         <mer:templateId>a09R000000AjMCy</mer:templateId>
         <mer:agreementId>a07020000008w91</mer:agreementId>
         <mer:pLevel>Insert Comments Only</mer:pLevel>
         <mer:docFormat>DOCX</mer:docFormat>
         <mer:sessionId>00D020000008lUh!AQYAQPYE.vw_Vh7FI.cV871nm9WWqIdhVINQJIl7PDNzr3fLVNdGjwk9qTJbDYIRoxbfpa44bpuIyeyVxEepPxdubr_AWjOv</mer:sessionId>
         <mer:serverUrl>https://testmanaged--5s20minor.my.salesforce.com/services/Soap/u/50.0/00D020000008lUh</mer:serverUrl>
      </mer:generateSupportingDoc>
   </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>
      <generateSupportingDocResponse>
         <result>00P02000000Ib0GEAS</result>
      </generateSupportingDocResponse>
   </soapenv:Body>
</soapenv:Envelope>
XML


This API is the same as the generateSupportingDoc API and additionally enables you to add a draft watermark to the generated document.


API

Signature

generateSupportingDoc2

webService static Id generateSupportingDoc2(Id templateId, Id agreementId, String pLevel, String docFormat, Boolean isDraft, String sessionId, String serverUrl)
Request Parameters
NameTypeDescriptionRequired?
templateIdIDThe id of the template used to generate the word doc.Yes
agreementIdIDThe id of the agreement providing the content for the document.Yes
pLevelStringThe protection level to apply to the document. Valid values are: 'Full access', 'Insert comments only', 'Insert comments and tracked changes only', 'Read only', and 'Fill in form fields only'.Yes
docFormatStringIndicates whether the document will be 'DOC', 'DOCX', 'PDF', or 'RTF'.Yes
isDraftBooleanIndicates whether a draft watermark should be added to the document.Yes
sessionIdStringThe Salesforce session id.Yes
serverUrlStringThe Salesforce server id.Yes



Response Parameter
NameTypeDescription
resultIDThe id of the generated document.


Code Sample

ID templateId = 'a036100000Fha5D';
ID agreementId = 'a016100000Che3D';
String pLevel = 'Full access';
String docFormat = 'DOC';
isDraft= true;
String sessionId = sessionId; //This is the session Id.
String serverUrl = System.Url.getSalesforceBaseUrl().toExternalForm() + '/services/Soap/u/50.0/' + UserInfo.getOrganizationId();
ID docId = Apttus.MergeWebService.generateSupportingDoc2(templateId,agreementId,pLevel,docFormat,isDraft,sessionId,serverUrl);
CODE

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

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mer="http://soap.sforce.com/schemas/class/Apttus/MergeWebService">
   <soapenv:Header>
      <mer:SessionHeader>
         <mer:sessionId>00D020000008lUh!AQYAQPYE.vw_Vh7FI.cV871nm9WWqIdhVINQJIl7PDNzr3fLVNdGjwk9qTJbDYIRoxbfpa44bpuIyeyVxEepPxdubr_AWjOv</mer:sessionId>
      </mer:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <mer:generateSupportingDoc2>
         <mer:templateId>a09R000000AjMCy</mer:templateId>
         <mer:agreementId>a07020000008w91</mer:agreementId>
         <mer:pLevel>Insert Comments Only</mer:pLevel>
         <mer:docFormat>DOCX</mer:docFormat>
         <mer:isDraft>True</mer:isDraft>
         <mer:sessionId>00D020000008lUh!AQYAQPYE.vw_Vh7FI.cV871nm9WWqIdhVINQJIl7PDNzr3fLVNdGjwk9qTJbDYIRoxbfpa44bpuIyeyVxEepPxdubr_AWjOv</mer:sessionId>
         <mer:serverUrl>https://testmanaged--5s20minor.my.salesforce.com/services/Soap/u/50.0/00D020000008lUh</mer:serverUrl>
      </mer:generateSupportingDoc2>
   </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>
      <generateSupportingDoc2Response>
         <result>00P02000000Ib0aEAC</result>
      </generateSupportingDoc2Response>
   </soapenv:Body>
</soapenv:Envelope>
XML