This API takes ownership of the given approval request. This API accepts Approval Request and Comments as request parameters. The same user has to run the API who wants to take ownership of the Approval Request.

APISignature
takeOwnershipOfRequestsBulkWebService static Boolean takeOwnershipOfRequestsBulk(List<BulkActionRequest> actionRequests);
Request Parameters
NameTypeRequired?Description

requestId

IDYesID of the approval request.
CommentsStringNo

User can provide comments, while taking ownership.

Response Parameter
NameTypeDescription
resultBooleanReturns true if the API is executed successfully.

Sample Code

List<Apttus_Approval__Approval_Request__c> liApprovalRequests =
[Select Id From Apttus_Approval__Approval_Request__c Where Apttus_Approval__Object_Id__c = 'a3X4x000000AQtGEAW'
AND Apttus_Approval__Approval_Status__c = 'Assigned'];

if(!liApprovalRequests.isEmpty()){
    
    List<Apttus_Approval.BulkActionRequest> actionRequests = new List<Apttus_Approval.BulkActionRequest>();
    
    for(Apttus_Approval__Approval_Request__c approvalRequest : liApprovalRequests){
        Apttus_Approval.BulkActionRequest req = new Apttus_Approval.BulkActionRequest();
        req.requestId = approvalRequest.Id;
        req.comments = 'Comment-1';
        actionRequests.add(req);
    }
    if(!actionRequests.isEmpty()){
          Boolean success = Apttus_Approval.ApprovalsWebService.takeOwnershipOfRequestsBulk(actionRequests);
        System.debug('Bulk Take Ownership Job Id : ' + success);  
    }
}
CODE

Integration Details

Use the following information in your integrations with Conga Approvals API. Refer to Integrating Conga with External Systems for information on how 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>
         <app:sessionId>00DR0000001nyVR!ARYAQNCIk5WB9S9PlmZzS2uecBjxnhB20ndYmyxseH1LEfStQi1cXAtXiDxEyd3kAbYrAXbpJmDZzVXGxrxxleE8Fmm6kqSm</app:sessionId>
      </app:SessionHeader>
      </soapenv:Header>
  <soapenv:Body>
    <app:takeOwnershipOfRequestsBulk>
      <app:requestId>a1W0R000007LQpk</app:requestId>
      <app:Comments>Comments</app:Comments>
    </app:takeOwnershipOfRequestsBulk>
  </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_Approval/ApprovalsWebService">
   <soapenv:Body>
      <takeOwnershipOfRequestsBulk>
         <result>true</result>
      </takeOwnershipOfRequestsBulk>
   </soapenv:Body>
</soapenv:Envelope>
XML