Batch Update Object

Update several objects of the same type in your Procore account.

This action uses the same Procore API calls as the Update Object action, which is to say APIs that use an HTTP PATCH request and take a single object (rather than an array of objects) as input. The action calls the specified Procore API multiple types to update multiple objects in Procore.


apiPathRequiredThe Procore API endpoint that you wish to invoke, without the "vapid" prefix, and the "{id}" at the end. Please refer to the Procore Actions overview for more on the apiPath input, which is required for all Procore Actions.
dataSetUrlRequiredThe URL of the DataSet file containing the objects that you want to update. Each DataSet row represents a Procore object that you want to update, while each column is a field within that object.

Your DataSet file must contain a column called id, containing the Procore object IDs corresponding to the objects that you want to update. The update will not work otherwise.
field_<fieldname>Required (at least one)The name of the Procore field represented by the field called fieldname. These inputs are used to map the DataSet column names to the field names expected by the Procore API. Your DataSet may contain many columns, but only the columns mapped in this way will be sent to Procore.

For instance, suppose your DataSet has a column called "FirstName", and the Procore API expects a field called user.first_name. Then you would add an input called field_user.first_name, and set its value to FirstName.

Refer to the Body Parameters section of your Procore API documentation for a list of valid field names.
fieldType_<fieldname>OptionalThe data type of the field called fieldname. The accepted values are date, datetime, boolean, text, number, and integer. Specifying this for a field will format the values in field_<fieldname> in a way that Procore will accept. This is only necessary for date and boolean fields.

Refer to the Body Parameters section of your Procore API's documentation to determine the correct field type for a given field.



Usage Examples

Suppose you have a form that makes some updates to a Procore project. The project ID is contained in a form field called "ProjectId", and one of the things you want to do when the form is completed is update the information of existing Procore project users. You have the latest user information stored in a GoFormz DataSource, and the relevant DataSource column names are FirstName, LastName, Title and IsActive. There is also an "id" column corresponding to the Procore IDs of the project users that you want to update.

You might start this workflow with a Form Completed trigger, then follow it up with the Get Data Source action to extract the user data. Let's say you call this step "GetProjectUsers".

Finally, you would create the Batch Update Object step, which will update these users in the Procore project. Your Batch Update Object inputs will be as follows:


First, we construct the apiPath as described in Procore's Update Project User API documentation, using the "ProjectId" field from the completed form to fill in the required project ID path parameter. Notice that we do not specify the required user ID in the path — the user IDs will be filled in differently for each call in the batch, based on values in the DataSet file's "id" column.

Next, we map all the DataSet columns to the corresponding fields in the Procore API's Body Parametersfirst_name, last_name, job_title and is_active. Finally we set the type of the IsActive column to boolean, to make sure that it is formatted correctly when it is sent to Procore.