Skip to content

Complete Multi-item Workflow Task

Complete an open workflow task for a multi-item workflow. This endpoint does not support initiating task actions requiring eSignatures (where esignature is true). To provide multiple verdicts for items without completing an open workflow task, use Manage Multi-item Workflow Content.

POST/api/{version}/objects/objectworkflows/tasks/{task_id}/actions/mdwcomplete
NameDescription
Content-Typeapplication/json
Acceptapplication/json (default) or application/xml
NameDescription
{task_id}The task id field value.
NameDescription
entrycriteriaSet to true to receive a structured evaluation of entry criteria violations in the response. If omitted, defaults to false. Learn more about the entry criteria evaluation response.

Controls with required=true in the Retrieve Workflow Task Action Details response must be provided. If a control (such as verdict) defines a set of required fields, those must also be provided. For example, a specific verdict may prompt for comments, reasons, or capacities.

For workflows where type is set to multidocworkflow and cardinality is set to One, Vault pre-populates document field values in field prompts. If you include keys for field prompts without values, Vault submits a blank field value on the document.

In the body of the request, upload parameters as a JSON file. This request may require the following body parameters:

NameDescription
verdict_public_key__c
conditional
The verdict name. Retrieve possible verdict name values by sending a request to Retrieve Workflow Task Action Details.
reason__c
conditional
The reason name. Retrieve possible reason name values by sending a request to Retrieve Workflow Task Action Details.
capacity__c
conditional
The capacity name. Retrieve possible capacity name values by sending a request to Retrieve Workflow Task Action Details.
curl -X POST -H "Authorization: {AUTH_VALUE}" \
--data-raw '[
    {
        "verdict_public_key__c": "verdict_not_approved__c",
        "verdict_not_approved_comment__c": "Needs to be redone."
    }
]' \
https://myvault.veevavault.com/api/v26.3/objects/objectworkflows/tasks/9626/actions/mdwcomplete
curl -X POST -H "Authorization: {AUTH_VALUE}" \
--data-raw '[
    {
        "task_comment__v": "Some of these batches need to be reprocessed.",
        "contents__sys": [
            {
                "object__v": "batch__v",
                "record_id__v": "0BA000000000101",
                "verdict_public_key__c": "verdict_not_approved__c",
                "verdict_not_approved_comment__c": "Needs to be redone."
            },
            {
                "object__v": "batch__v",
                "record_id__v": "0BA000000002001",
                "verdict_public_key__c": "verdict_approved__c"
            },
            {
                "object__v": "batch__v",
                "record_id__v": "0BA000000002002",
                "verdict_public_key__c": "verdict_not_approved__c",
                "verdict_not_approved_comment__c": "Does not meet standards."
            }
        ]
    }
]' \
https://myvault.veevavault.com/api/v26.3/objects/objectworkflows/tasks/9626/actions/mdwcomplete
{
    "responseStatus": "SUCCESS"
}

Request: Entry Criteria Evaluation

Section link for Request: Entry Criteria Evaluation
curl -X POST -H "Authorization: {AUTH_VALUE}" \
-H "Content-Type: application/x-www-form-urlencoded" \
https://myvault.veevavault.com/api/v26.3/objects/objectworkflows/tasks/9626/actions/mdwcomplete?entrycriteria=true

Response: Entry Criteria Evaluation

Section link for Response: Entry Criteria Evaluation
{
  "responseStatus": "FAILURE",
  "errors": [
    {
      "type": "OPERATION_NOT_ALLOWED",
      "message": "Record cannot be updated: Entry criteria requirement for state [in_review_state__c] failed : Payment Terms required before approving this contract"
    }
  ],
  "source_context": {
    "is_nested": false,
    "type": "document",
    "document_id": 100,
    "minor_version_number__v": 0,
    "major_version_number__v": 1,
    "lifecycle": "contract_management_lifecycle__c",
    "target_state": "in_review_state__c"
  },
  "entry_criteria": [
    {
      "type": "field",
      "message": "Payment Terms required before approving this contract.",
      "field": {
        "name": "payment_terms__c",
        "url": "/api/v26.3/metadata/objects/documents/properties"
      }
    },
    {
      "type": "message",
      "message": "Formula must be TRUE."
    }
  ]
}

On SUCCESS, Vault completes the workflow task on behalf of the authenticated user.

If the request results in FAILURE due to unmet entry criteria and entrycriteria=true, the response includes a structured evaluation of entry criteria violations for that record. Learn more about the entry criteria evaluation response.