Transcription

Contract Management on SalesforceSpring 2020 SOAP API Guide

Table of ContentsAbout this Guide. 4What's New . 5Overview. 6API Supported Packages .6Document Setup.6API Standards and Development Platforms.6Standards .7Development Platforms.7Field Types. 7API Reference. 9Agreement Web Service .9Activating an Agreement .10Publishing Document Outside of Salesforce . 11Publishing the Document to Chatter. 11Publishing the Document to Files and Attachments . 12Selecting a Template for the Agreement Document . 13Terminating Agreements . 13Updating Smart Fields .14Merge Web Service . 15Adding Text to a Header and Footer . 17Applying Security Parameters to a PDF.20Converting a Word Document into a given output format. 21Converting a Word Document into a given output format (Deprecated). 23Converting a Word Document into a given output format for Standard Object (Deprecated).25Converting a Word Document into a PDF. 27Converting a Word Document into a PDF for Standard Objects.29Enabling Authoring for Agreement Documents .30Generating a Document. 32Generating a Document for a Standard Object .35Generating a Document on Submit Request . 37Generating a Document on Submit Request for a Standard Object .39Generating a Supporting Document.41Generating a Supporting Document on Submit Request .44Merging Multiple Documents to a PDF.46

Merging Proposal Documents into a single PDF Document.59Package Multiple Documents.63Author Web Service. 67Getting Word Document Information for Parent with Files.67Initiate Parallel Review.68End Parallel Review.69Callback Classes. 70IAgreementLifecycleCallback2 and IDynamicSectionCallback2.70Apttus Copyright Disclaimer .75

Contract Management on Salesforce Spring 2020 SOAP API GuideAbout this GuideApttus provides Application Programming Interfaces (API) for you to extend the featuresoffered by Apttus. These extensions add more functionality to the features availablethrough configuration on Salesforce.The Apttus Contract Management API Reference Guide describes the APIs used to publishand manipulate the document. It also provides information on creating custom logic.4Copyright 2011-2021 Apttus Corporation. All rights reserved.

Contract Management on Salesforce Spring 2020 SOAP API GuideWhat's NewThe following table lists changes in the documentation to support each release.ReleaseTopicDescriptionSpring 2020 (Rev A)Updating Smart FieldsNew topic. Added a new API—updateSmartFieldsOnAgreementDocument.Spring 2020Package Multiple DocumentsModified topic. Added the followingparameters: RetainInputHeaderFooter CumulativePageNumberWinter 2019Merging Multiple DocumentsModified topic.to a PDFSummer 2019Spring 2019Terminating AgreementsNew topic.Initiate Parallel ReviewNew topic.End Parallel ReviewNew topic.Callback ClassesAdded Contract Managementcallback classes.Winter 2018No updatesNo new APIs are introduced in thisrelease. This guide is updated to reflectthe product name change.5Copyright 2011-2021 Apttus Corporation. All rights reserved.

Contract Management on Salesforce Spring 2020 SOAP API GuideOverview API Supported PackagesThis guide covers Contract Management and Merge Service APIs. Document SetupThe Apttus Contract Management API Reference Guide details the APIs that you canuse to manipulate Apttus objects through API calls and passing parameters. API Standards and Development PlatformsApttus APIs are based on Salesforce APIs and use the same standards and platforms. Field TypesApttus APIs use a subset of the supported data and field types on Salesforce.API Supported PackagesThis guide covers Contract Management and Merge Service APIs.PackageLatest Certified VersionApttus Contract10.2.0491 10.491Management (New)Document SetupThe Apttus Contract Management API Reference Guide details the APIs that you can use tomanipulate Apttus objects through API calls and passing parameters:API ReferenceThe API reference section details the APIs that you can use tomanipulate Apttus objects through API calls and passingparameters. The API reference section also includes some codesamples.API Standards and Development PlatformsApttus APIs are based on Salesforce APIs and use the same standards and platforms.6Copyright 2011-2021 Apttus Corporation. All rights reserved.

Contract Management on Salesforce Spring 2020 SOAP API GuideStandardsNameReferenceSimple Object Access Protocol (SOAP) 1.1http://www.w3.org/TR/2000/NOTESOAP-20000508Web Service Description Language (WDSL) I Basic Profile 004-08-24.htmlDevelopment PlatformsApttus SOAP API works with standard SOAP development environments. For a list ofcompatible development platforms, see Salesforce Developer Force API details.Field TypesApttus APIs use a subset of the supported data and field types on Salesforce.The following table lists the APIs that Apttus provides. For a comprehensive list of all fieldtypes supported by Salesforce, see Salesforce Data Types.TypeDescriptionBooleanThe Boolean field has atrue(or 1) orfalse(or 0) value.Data objectThe Data Object field is an ID type and is represented byCPQ.nnDOinthis document.DateThe Date field contains date values only and do not containrelevant time values. Time in a date field is always set to midnightin the UTC time zone. If you want a timestamp you must use adateTime field.DecimalThe Decimal field provides an exact numeric value and you canarbitrarily size the precision and scale of the value.7Copyright 2011-2021 Apttus Corporation. All rights reserved.

Contract Management on Salesforce Spring 2020 SOAP API GuideTypeDescriptionIDThe ID field is an alphanumeric field that acts like the primary keyfor a specific record associated with an object. The ID value includesa three-character code that identifies which object the record isassociated with. The ID for a specific record does not change.For some objects, this field may also be areferencetype value, whichcontains the ID value for a related record. They are identified byfield names ending in 'Id', such aspriceListId. The ID field acts likeforeign keys and their values can be changed using anupdate()call.IntegerThe Integer field contains whole numbers only. There are no digitsafter the decimal.ListThe List field includes a fixed set of values from which you mustselect a single value. Picklists are available as drop-down lists. If apicklist is unrestricted, the API does not limit entries to only currentlyactive values.StringThe String field contains text and may have differing lengthrestrictions based on the data you store in the specific field. Forinstance,Citymay be limited to 50 characters, whileAddressLine1islimited to 255 characters.8Copyright 2011-2021 Apttus Corporation. All rights reserved.

Contract Management on Salesforce Spring 2020 SOAP API GuideAPI Reference Agreement Web ServiceThe Agreement Web Service APIs are used for activating, selecting and publishingagreements. Once an agreement has been activated and associated with a templateit can be published to Salesforce.com – either to Chatter files or Documents - orpublished to an external repository. Merge Web ServiceThe Merge Web Service APIs are used for generating and manipulating documents.Both agreements and supporting documents can be generated, while text can beadded to document headers and footers. Word documents can be converted into PDFdocuments and security rules can be applied to PDF documents. Author Web ServiceThe Author Web Service API contains all the services related to files or documents andcan be used with various operations related to X-Author.Agreement Web ServiceThe Agreement Web Service APIs are used for activating, selecting and publishingagreements. Once an agreement has been activated and associated with a template itcan be published to Salesforce.com – either to Chatter files or Documents - or published toan external repository.The APIs enable you to do the following:Activating an AgreementThis activates an agreement and can also be used to delete related draft versions. Onceactivated an agreement document can be published to multiple channels.Selecting a Template for the Agreement DocumentThis associates a template with the agreement, enabling the agreement document to bepublished.Publishing the Document to ChatterThis publishes the agreement document for the activated agreement to Chatter Files forthe Salesforce object the agreement is associated with.Publishing the Document to Files and AttachmentsThis publishes the agreement document for the activated agreement to Files andAttachments for the Salesforce object the agreement is associated with.9Copyright 2011-2021 Apttus Corporation. All rights reserved.

Contract Management on Salesforce Spring 2020 SOAP API GuidePublishing Document Outside of SalesforceThis publishes the agreement document for the activated agreement to an externallocation. This method will write the data into an integration object. A trigger should bewritten to send the document to the external location.Activating an AgreementThis activates an agreement and can also be used to delete related draft versions. Onceactivated, an agreement document can be published to multiple ptionagreementIdIDThe id of the agreement.selectedDocIdsList ID List of fully signed document ids.removableDocIdsList ID List of draft document ids that can Indicates whether the agreement was activatedsuccessfully.Code Sample1Id agreementId agreement.Id;2String[] activateDocIds new String[1];3String[] remDocIds new String[]{};4Boolean response mentId, activateDocIds,remDocIds);10Copyright 2011-2021 Apttus Corporation. All rights reserved.

Contract Management on Salesforce Spring 2020 SOAP API GuidePublishing Document Outside of SalesforceThis publishes the agreement document for the activated agreement to an externallocation. This method will write the data into an integration object. A trigger should bewritten to send the document to the external TypeDescriptionagreementIdIDThe id of the agreementattachmentIdIDThe id of the document that is to be Indicates whether the document was publishedsuccessfully.Publishing the Document to ChatterThis publishes the agreement document for the activated agreement to Chatter Files forthe Salesforce object the agreement is associated escriptionagreementIdIDThe id of the agreementattachmentIdIDThe id of the document that is to be published anduploaded to Chatter Files.11Copyright 2011-2021 Apttus Corporation. All rights reserved.

Contract Management on Salesforce Spring 2020 SOAP API ates whether the document was published toChatter successfully.Code Sample1Id agreementId agreement.Id;2Id publishDocId AttachmentId;3Boolean response ory(agreementId, publishDocId);Publishing the Document to Files andAttachmentsThis publishes the agreement document for the activated agreement to Files andAttachments for the Salesforce object the agreement is associated DescriptionagreementIdIDThe id of the agreementattachmentIdIDThe id of the document that is to be published anduploaded to Files and anIndicates whether the document was published toFiles and Attachments successfully.12Copyright 2011-2021 Apttus Corporation. All rights reserved.

Contract Management on Salesforce Spring 2020 SOAP API GuideSelecting a Template for the AgreementDocumentThis associates a template with the agreement, enabling the agreement document to etersNameTypeDescriptionagreementIdIDThe id of the agreementResponseNameTypeDescriptionresultIDThe id of the template that is used to generate theagreement documentTerminating AgreementsThe terminateAgreementsAsync API allows you to bulk terminate agreements based on theagreement escriptionRequired?agreementIdsList ID List of agreement IdsYesCode Sample13Copyright 2011-2021 Apttus Corporation. All rights reserved.

Contract Management on Salesforce Spring 2020 SOAP API GuideList ID agreementIdList new List ID ();Boolean response c(agreementIdList);Use CaseBulk terminate agreements and their related agreements with the same agreementnumber.Order of Execution1.2.3.4.5.6.7.8.Check permissions.Get the agreement object.Register the terminate indicator.Terminate the agreement.Save the terminated agreement.Reset the terminate indicator.Refresh the original agreement.Post-termination updates.Updating Smart FieldsThis updates multiple smart fields in a document with the latest values and generates anew quisite: You need to configure the Comply System Property—XAJS Endpoint. For moreinformation, see Comply System Properties topic in Contract Management on SalesforceAdministrator ntIdIDYesThe id of the agreementdocumentIdIDYesThe id of the document that is to bepublished.Response14Copyright 2011-2021 Apttus Corporation. All rights reserved.

Contract Management on Salesforce Spring 2020 SOAP API GuideThis API returns documentId of the newly created document after updating all the smartfields.Code SampleID agreementId 'a03123123123';ID documentId '069123123123'; //attachment or file reementDocument(agreementId,documentId);Use caseConsider an agreement A1 contains document D1. Create an agreement A2 and clone thedocument D1. This creates document D2. Attach D2 to A2. As D2 contains metadata from A1,you will not be able to call updateSmartFieldsOnAgreementDocument to update D2. Toupdate D2, you need to call enableAuthoring API and thencall updateSmartFieldsOnAgreementDocument.Merge Web ServiceConverting a Word Document into a given output format for Standard Object(Deprecated)The Merge Web Service APIs are used for generating and manipulatingdocuments. Both agreements and supporting documents can be generated, while text canbe added to document headers and footers. Word documents can be converted into PDFdocuments and security rules can be applied to PDF documents.The APIs enable you to do the following:Generating a DocumentGenerates a Word agreement document by using the template specified by the templateIdparameter and the agreement indicated by the agreementId. The document is added to theFiles and Attachments section for the Agreement object.Generating a Document for a Standard ObjectGenerates a Word agreement document for a standard object, using the template selectedby the templateId parameter and the object indicated by the sObjectId and sObjectType.Generating a Supporting DocumentGenerates a supporting document, such as Contract Summary, Renewal Letter, andTermination Letter, using the template specified by the templateId and is associated withthe agreement record represented by the agreementId.Adding Text to a Header and Footer15Copyright 2011-2021 Apttus Corporation. All rights reserved.

Contract Management on Salesforce Spring 2020 SOAP API GuideAppends the given text to the header and footer for a given document.Converting a Word Document into a given output formatThis API converts an agreement Word document, specified in docFileName into a specificoutput format using the parameters, such as agreementId and docFormat. This APIinternally checks if the header and footer are added to the generated document.Converting a Word Document into a given output format for Standard Object(Deprecated)For any standard object, this API converts a generated Word document into a specificoutput format, specified in docFormat using the parameters, such as, docId, docFileName.This API is deprecated.Converting a Word Document into a given output format (Deprecated)This API converts an agreement Word document into a specific output format using theparameters, such as agreementId and docFormat. This API is deprecated.Converting a Word Document into a PDFThis converts a Word document into a PDF document. It can be any Word document anddoes not have to be created using generateDoc or generateSupportingDoc. The protectionlevel applicable on the Word document is not applicable to the PDF document.Converting a Word Document into a PDF for Standard ObjectsThis converts a Word document into a PDF document for a standard object. It can be anyWord document and does not have to be created using generateDoc orgenerateSupportingDoc. The protection level applicable on the Word document is notapplicable to the PDF document.Applying Security Parameters to a PDFThis applies Adobe PDF security parameters to the PDF document. Ensure that you have setan admin entry with the PDFSecurityDefaulttags. For more information, refer ContractManagement Administrator Guide.Enabling Authoring for Agreement DocumentsThis API enables redlining capability for a list of documents, specified in the docIds, by usingthe parameters, such as sObjectID and pLevel.Generating a Document on Submit RequestThis API submits the generate document action using the given template from templateIdand agreement from agreementId. The output format of the generated document is of thetype specified in the docFormat parameter.16Copyright 2011-2021 Apttus Corporation. All rights reserved.

Contract Management on Salesforce Spring 2020 SOAP API GuideGenerating a Document on Submit Request for a Standard ObjectFor a standard object, this API submits the generate document action using the giventemplate from templateId and for a sObject from sObjectId and sObjectType. The outputformat of the generated document is of the type specified in the docFormat parameter.Generating a Supporting Document on Submit RequestThis API submits the generate supporting document action using the given template fromtemplateId and for an agreement from agreementId. The output format of the generatedsupporting document is of the type specified in the docFormat parameter.Packaging Multiple DocumentsThis API packages multiple documents (such as a Quote and Agreement document)together into a single merged DOCX document. Implementation requires creating a customVisualforce page to use the API for document packaging purposes.Merging Multiple Documents to a PDFApttus provides three APIs to assist you in merging multiple documents into a single PDF.Choose the API that best suits your needs.Merging Proposal Documents into a single PDF DocumentThis API packages multiple proposal documents together into a single merged PDFdocument. Implementation requires creating a custom Visualforce page to use the API fordocument packaging purposes.Adding Text to a Header and FooterAppend the given text to the header and footer for a given criptionRequired?docIdIDThe id of the document which willYeshave header and footer contentadded to it.headerTextStringThe header text to be appended toYesthe document.17Copyright 2011-2021 Apttus Corporation. All rights reserved.

Contract Management on Salesforce Spring 2020 SOAP API extStringThe footer text to be appended to theYesdocument.sessionIdStringThe Salesforce session id.YesserverUrlStringThe Salesforce server icates whether the header and footer areadded successfully.Code SampleID docId AttachmentId;String headerText 'This is Header';String footerText 'This is Footer';String apiServerURL System.Url.getSalesforceBaseUrl().toExternalForm() '/services/Soap/u/14.0/' UserInfo.getOrganizationId();String SessionId sessionId; //This is the session Id.String generatedDocId Apttus d,headerText, footerText, sessionId, serverUrl); NoteappendToHeaderFooter does not support protection levels for FX1 documents (FX2documents do support document protection). Document protection levels are resetwhen header and footer are added. To retain protection levels for FX1 documents,use appendToHeaderFooter2 instead.appendToHeaderFooter218Copyright 2011-2021 Apttus Corporation. All rights reserved.

Contract Management on Salesforce Spring 2020 SOAP API The id of the document which willYeshave header and/or footer contentadd to it.headerTextStringThe header text to append to theYesdocument.footerTextStringThe footer text to append to theYesdocument.pLevelStringThe protection level to apply to theYesdocument. Valid values are: Full access Insert comments only Insert comments and trackedchanges only Read only Fill in form fields onlysessionIdStringThe Salesforce session id.YesserverUrlStringThe Salesforce server icates whether the header and footer wereadded successfully.Code SampleID docId 'a0Y61000002K6IR';String headerText 'Agreement Id: 0123456789';String footerText 'Date Created: 11/27/2018 7:23:15 PM';String pLevel 'Full access';String sessionId sessionId; //This is the session Id.String serverUrl System.Url.getSalesforceBaseUrl().toExternalForm() '/services/Soap/u/14.0/' UserInfo.getOrganizationId();Boolean result , headerText,footerText, pLevel, sessionId, serverUrl);19Copyright 2011-2021 Apttus Corporation. All rights reserved.

Contract Management on Salesforce Spring 2020 SOAP API GuideApplying Security Parameters to a PDFThis applies Adobe PDF security parameters to the PDF document. Ensure that you have setan admin entry with the PDFSecurityDefault tags. For more information, refer ContractManagement Admin Guide.TheapplyPDFSecurity()function provides a great way to handle document security. Using thisfunction is fairly complex, and what we want is a simple way to quickly apply security. Thefunction provides us with just such an option. The actual parameters in the policy couldbedocId,session Id,serverUrland so on. This API controls the security properties of a PDFdocument, such as, Content Copying, Filling of form fields, and tionRequired?docIdIDThe id of the PDF document to applyYessecurity parameters to.session IdStringThe Salesforce session id.YesserverUrlStringThe Salesforce server icates if the security parameters were appliedsuccessfully to the PDF.Code Sample20Copyright 2011-2021 Apttus Corporation. All rights reserved.

Contract Management on Salesforce Spring 2020 SOAP API Guide1ID docId 'a0Y61000002K6IR';2String sessionId sessionId; //This is the session Id.3String serverUrl

Publishing Document Outside of Salesforce. Publishing the Document to Chatter. Publishing the Document to Files and Attachments. Selecting a Template for the Agreement Document. Terminating Agreements. Updating Smart Fields. Merge Web Service. Adding Text to a Header and Foote