Initiate Object Action on Multiple Records
Use this request to initiate an object user action on multiple records. Maximum 500 records per batch.
/api/{version}/vobjects/{object_name}/actions/{action_name}Headers
Section link for Headers| Name | Description |
|---|---|
Content-Type | application/x-www-form-urlencoded |
Accept | application/json (default) or application/xml |
URI Path Parameters
Section link for URI Path Parameters| Name | Description |
|---|---|
object_name | The object name__v field value. |
action_name | The name of the Objectaction or Objectlifecyclestateuseraction to initiate. This is obtained from the Retrieve User Actions request. The format for action_name is Objectaction.{vobject}.{action} or Objectlifecyclestateuseraction.{vobject}.{state}.{action}. For example, Objectlifecyclestateuseraction.country__v.active_state__c.start_wf_useraction__c. |
Query Parameters
Section link for Query Parameters| Name | Description |
|---|---|
entrycriteria | Set 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. |
Body Parameters
Section link for Body Parameters| Name | Description |
|---|---|
idsrequired | Comma-separated list of object record ids on which to initiate the action. |
{participant_group_name}.assignment_type__cconditional | The participant group assignment type for a workflow task, either assigned or available. Required if the workflow initiator must select either Assigned to every user or Available to any user when assigning participants to a task in the workflow start step. For example, part_reviewers__c.assignment_type__c=assigned. |
Values in Required Field Prompts
Section link for Values in Required Field PromptsWhen providing values for field prompts on a start step, task step, or verdict, required fields cannot be omitted, set as blank, or defaulted to their existing value.
To preserve the existing value of a required field prompt in a workflow on a single record, submit the existing value as the new value.
For a workflow on multiple records, there is no way to preserve existing values in a field if that field is a required prompt. Setting a value for a prompt updates all records to the same single value.
Request
Section link for Requestcurl -X POST -H "Authorization: {AUTH_VALUE}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "ids: 0MO0771, 0MO0772, 0MO0773" \
https://myvault.veevavault.com/api/v26.3/vobjects/monitoring_event__v/actions/Objectaction.monitoring_event__v.copy_record__vResponse
Section link for Response{
"responseStatus": "SUCCESS",
"data": [
{
"responseStatus": "SUCCESS",
"id": "0MO0771"
},
{
"responseStatus": "SUCCESS",
"id": "0MO0772"
},
{
"responseStatus": "FAILURE",
"id": "0MO0773",
"errors": [
{
"type": "INSUFFICIENT_ACCESS",
"message": "User does not have sufficient privileges to perform the action"
}
]
}
]
}Request: Entry Criteria Evaluation
Section link for Request: Entry Criteria Evaluationcurl -X POST -H "Authorization: {AUTH_VALUE}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "ids: 0MO0771, 0MO0772, 0MO0773" \
https://myvault.veevavault.com/api/v26.3/vobjects/monitoring_event__v/actions/Objectlifecyclestateuseraction.contract__c.active_state__c.change_state_to_in_review_useraction1__c?entrycriteria=trueResponse: Entry Criteria Evaluation
Section link for Response: Entry Criteria Evaluation{
"responseStatus": "SUCCESS",
"data": [
{
"responseStatus": "FAILURE",
"id": "V57000000001002",
"errors": [
{
"type": "OPERATION_NOT_ALLOWED",
"message": "Entry criteria requirement for state [review_state__c] failed"
}
],
"source_context": {
"is_nested": false,
"type": "object",
"object_name": "task__c",
"record_id": "V99000000001005",
"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/vobjects/contract__c/fields/payment_terms__c"
}
}
]
},
{
"responseStatus": "SUCCESS",
"id": "V57000000001003",
"entry_criteria": []
},
{
"responseStatus": "FAILURE",
"id": "V57000000001004",
"errors": [
{
"type": "OPERATION_NOT_ALLOWED",
"message": "Action is not available on the document in current state"
}
]
}
]
}Response Details
Section link for Response DetailsOn SUCCESS, the response lists the ID and status of each object record provided in the request. Partial success is allowed.
If an object record results in FAILURE due to unmet entry criteria and entrycriteria=true, the response includes a structured evaluation of entry criteria violations for that object record. Learn more about the entry criteria evaluation response.