Checking if an Approval Is Required
isApprovalRequired
This API is designed to evaluate a single business record (like an Agreement, Quote, or custom object) and determine whether it currently meets the criteria to enter an approval process. It is ideal for simple use cases where only one object needs evaluation at a time.
Example: You have a custom "Submit for Approval" button on an Agreement. Before triggering the approval request, you use isApprovalRequired
to check if the record actually requires approval based on active rules.
API |
Signature |
---|---|
isApprovalRequired |
webService static Boolean isApprovalRequired(String sObjectType, Id sObjectId) |
Request Parameters | |||
---|---|---|---|
Name |
Type |
Required? |
Description |
sObjectId | ID |
Yes |
ID of the business context object. |
sObjectType | String |
Yes |
Type of the context object. |
Response Parameter | ||
---|---|---|
Name |
Type |
Description |
result | Boolean |
Returns true if approval is required. |
Integration Details
Use the following information in your integrations with Conga Approvals API. Refer to Integrating Conga with External Systems to get started.
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:isApprovalRequired>
<app:sObjectType>Apttus__APTS_Agreement__c</app:sObjectType>
<app:sObjectId>a07R000000AiYlw</app:sObjectId>
</app:isApprovalRequired>
</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>
<isApprovalRequiredResponse>
<result>true</result>
</isApprovalRequiredResponse>
</soapenv:Body>
</soapenv:Envelope>
checkIfApprovalRequired
This API lets you check multiple records at once to see if they need approval. It returns a list of true or false values, matching the order of the input IDs. This helps improve performance by avoiding separate calls for each record.
Example: You are running a daily job that scans hundreds of Agreements. You pass the list of record IDs to this API and get back a list of Booleans that tell you which ones require approval.
API |
Signature |
---|---|
checkIfApprovalRequired |
webService static List checkIfApprovalRequired(List sObjectIds) |
Request Parameters | |||
---|---|---|---|
Name |
Type |
Required? |
Description |
sObjectIds | List<ID> |
Yes |
List of IDs of business context objects. |
Response Parameter | ||
---|---|---|
Name |
Type |
Description |
result | List<Boolean> |
Returns a list of Boolean indicators. The indicator is true if approval is required. |
Integration Details
Use the following information in your integrations with Conga Intelligent Workflow Approvals API. Refer to Integrating Conga with External Systems to get started.
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:checkIfApprovalRequired>
<!--Zero or more repetitions:-->
<app:sObjectIds>a07R000000AiYlw</app:sObjectIds>
</app:checkIfApprovalRequired>
</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>
<checkIfApprovalRequiredResponse>
<result>false</result>
</checkIfApprovalRequiredResponse>
</soapenv:Body>
</soapenv:Envelope>
checkIfApprovalRequired2
This API is used for complex hierarchical data structures, such as a parent-child relationship (e.g., Agreement and Agreement Line Items). It evaluates the approval requirement for both the header (parent) and its children (line items) in one combined call.
API |
Signature |
---|---|
checkIfApprovalRequired2 |
webService static List checkIfApprovalRequired2(String headerIdStatus, List childIdStatusList, List modifiedChildObjectIds) |
headerIdStatus
and childIdStatus
follow this format: <Object ID>__<Approval_Status__c>
Request Parameters | |||
---|---|---|---|
Name |
Type |
Required? |
Description |
headerIdStatus | String |
Yes |
Header ID and approval status. |
childIdStatusList | List<String> |
Yes |
List of approval status ID of child objects. |
modifiedChildObjectIds | Lsit<ID> |
Yes |
List of IDs of modified child objects. |
ID__ApprovalStatus
(e.g., a01U0000017FRf9IAG__Approval Required
).
Response Parameter | ||
---|---|---|
Name |
Type |
Description |
result | List<String> |
Returns a list of the header ID and child object id approval statuses separated by '__'. |
Integration Details
Use the following information in your integrations with Apttus Intelligent Workflow Approvals API. Refer to Integrating Conga with External Systems to get started.
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!ARYAQLGLUK2b6FoONhmSG.PKSeCYBRUhIi4LqHYHUF8J.W1m8zLATtD0rjJECgiJhcfEwcgRAUC6uaHqgF9jAmkP1evILkhb</sessionId>
</app:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<app:checkIfApprovalRequired2>
<app:headerIdStatus>a07R000000AijfS__None</app:headerIdStatus>
</app:checkIfApprovalRequired2>
</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>
<checkIfApprovalRequired2Response>
<result>a07R000000AijfSIAR__null</result>
</checkIfApprovalRequired2Response>
</soapenv:Body>
</soapenv:Envelope>