Submitting Approvals Asynchronously
API |
Signature |
---|---|
submitForApprovalsAsync |
WebService static Boolean submitForApprovalsAsync(String sObjectType, ID sObjectId); |
Request Parameters | |||
---|---|---|---|
Name |
Type |
Required? |
Description |
approvalObjectId | ID |
Yes |
ID of the approval context object. |
approvalObjectType | String |
Yes |
Type of the approval context object. |
Response Parameter | ||
---|---|---|
Name |
Type |
Description |
result | Boolean |
Returns true if the API is executed successfully. |
/**
* Apttus Approvals Management
* TestSubmitAsyncAPISample
*
* @2020 Apttus Inc. All rights reserved.
*/
public with sharing class TestSubmitAsyncAPISample {
/**
* Class Constructor
*/
public TestSubmitAsyncAPISample() {
}
// test webservice API calls by running as anonymous apex from developer console
//TestSubmitAsyncAPISample.TestSubmitForApprovalsAsync('Apttus__APTS_Agreement__c','a07R000000AiYQX');
/**
* Submit an approvals process asynchronously
* @param sObjectType the approval context sobject type
* @param sObjectId the approval context sobject identifier
* @return true if successful
*/
public static void TestSubmitForApprovalsAsync(String sObjectType, ID sObjectId) {
// call API to submit async
Boolean ok = Apttus_Approval.ApprovalsWebService.SubmitForApprovalsAsync(sObjectType, sObjectId);
system.assertEquals(ok, true);
}
}
Integration Details
Use the following information in your integrations with Conga Approvals API. Refer to Integrating Conga with External Systems to get started.
API Prerequisites
None.
Response/Request XML
Example Request<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:app="http://soap.sforce.com/schemas/class/Apttus_Approval/ApprovalsWebService">
<soapenv:Header>
<app:SessionHeader>
<sessionId>00DR0000001nyVR!ARYAQDLDaz7Bw9IfDVuVTeyiZwGL.4Oc2G8tgKIoJo0EEw9vlWQVnlEawyHu5UcIu.AUay3cBSoNFGd8OtrxX.D7yjqBK9SL</sessionId>
</app:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<app:submitForApprovalsAsync>
<app:sObjectType>Apttus__APTS_Agreement__c</app:sObjectType>
<app:sObjectId>a07R000000AiYQX</app:sObjectId>
</app:submitForApprovalsAsync>
</soapenv:Body>
</soapenv:Envelope>
Example Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://soap.sforce.com/schemas/class/Apttus_Approval/ApprovalsWebService">
<soapenv:Body>
<submitForApprovalsAsyncResponse>
<result>true</result>
</submitForApprovalsAsyncResponse>
</soapenv:Body>
</soapenv:Envelope>