This API allows you to regenerate agreement documents with redlines.

API

Signature

regenerateDocWithRedlines

webService static Id regenerateDocWithRedlines(Apttus.CustomClass.DocGenParam params)
Request Parameters
NameTypeDescriptionRequired?
templateIdIDThe ID of the templateYes
versionDetailIdIDThe Id of the document version    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
isDraftBooleanIndicates whether a draft watermark should be added to the document.Yes
SObjectIdID

The Id of the object which holds data for merge fields.


sourceDocumentIdIDThe Id of the document to regenerate. The document is used to compare for redlines.Yes
sessionidStringThe Salesforce session ID.Yes
sessionUrlStringThe Salesforce server Url.Yes
Response Parameter
NameTypeDescription
resultBooleanIndicates whether the document was regenerated successfully.

Code Sample

Apttus.CustomClass.DocGenParam docGenParam = New Apttus.CustomClass.DocGenParam();
docGenParam.TemplateId = ''; // Record Id of the template which needs to be regenerated
docGenParam.SObjectId = ''; // Record Id of Agreement
docGenParam.VersionDetailId = ''; // Record Id of a newly created Document Version Detail
docGenParam.ProtectionLevel = 'Insert comments and tracked changes only';
docGenParam.DocFormat = 'DOCX';
docGenParam.IsDraft = false;
docGenParam.SourceDocumentId = ''; // Content version Id of the Redlining document
// Content Id of the Redlined Document, can be found on its Document Version Detail record page
docGenParam.AcceptRedlines = false;
docGenParam.SessionId = UserInfo.getSessionId();
docGenParam.SessionUrl = System.Url.getOrgDomainUrl().toExternalForm() + '/services/Soap/u/50.0/' + UserInfo.getOrganizationId();
ID documentId = Apttus.MergeWebService.regenerateDocWithRedlines(docGenParam); 
System.debug('Doc Id = '+ documentId);
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"
    xmlns:cus="http://soap.sforce.com/schemas/class/Apttus/CustomClass">
    <soapenv:Header>
                <mer:SessionHeader>
            <mer:sessionId>?</mer:sessionId>
        </mer:SessionHeader>
    </soapenv:Header>
    <soapenv:Body>
        <mer:regenerateDocWithRedlines>
            <mer:params>
                <cus:AcceptRedlines>False</cus:AcceptRedlines>
                <cus:DocFormat>PDF</cus:DocFormat>
                <cus:IsDraft>True</cus:IsDraft>
                <cus:ProtectionLevel>Full Access</cus:ProtectionLevel>
                <cus:ReviewerName>Conga</cus:ReviewerName>
                <cus:SessionId>00D0S0000000Pa8!ARUAQMLgPIx6FwqD3DCEs9oBPnTI2Gx9k0jH5wIL7WLW1sR1vNq1dI7oAxxG4EKbk5XBzRZlP5TQivHyO5bivwe.toaF9MrQ</cus:SessionId>
                <cus:SessionUrl>https://testmanaged--5s20minor.my.salesforce.com/services/Soap/u/50.0/00D020000008lUh</cus:SessionUrl>
                <cus:SObjectId>0015500000YAdXR</cus:SObjectId>
                <cus:SourceDocumentId>a07020000008w91</cus:SourceDocumentId>
                <cus:TemplateId>a09R000000AjMCy</cus:TemplateId>
                <cus:VersionDetailId>a6v0S0000009DEY</cus:VersionDetailId>
            </mer:params>
        </mer:regenerateDocWithRedlines>
    </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/AuthorWebService">
   <soapenv:Body>
      <regenerateDocWithRedlines>
         <result>true</result>
      </regenerateDocWithRedlines>
   </soapenv:Body>
</soapenv:Envelope>
XML