---
schema_version: "1"
id: 98cf8f22138d88fe1f1073e289b9cea4fb659da4fc06e7209831c0053bb94640
title: Update Attributes in Bulk Invocable Action
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_update_attributes_in_bulk_invocable_action.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_update_attributes_in_bulk_invocable_action.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f05c39c729e1c2852288d536687c8ba38588ac73f2fc7d34edd81b188f0b841f
description: Update product attributes across multiple quote line items in a single asynchronous request without editing each line item individually.
products:
  - Communications
release: "264"
---
# Update Attributes in Bulk Invocable Action

Update product attributes across multiple quote line items in a single asynchronous request without editing each line item individually.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col style="width:100%"></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

Available in Flow Builder and Agentforce for flows running API version 67.0 and later, the action starts a bulk attribute update job and immediately returns an asynchronous job ID for tracking status. The Bulk Attribute Update service performs all business validation, including parent-child relationship checks and duplicate target detection, after the job starts.

## Input Values

   
| Parameter | Required | Description | Data Type |
| --- | --- | --- | --- |
| quoteId | Yes | The ID of the quote whose line-item attributes are updated. | String |
| updates | Yes | A JSON array of update objects. Each object requires `rootQuoteLineItemId`, `quoteLineItemId`, and an `attributes` array of `{ attributeCode, value }`. | String (JSON array) |
| validate | No | Optional. A Boolean value that indicates whether validation runs. The default value is `true`. | Boolean |
| price | No | Optional. A Boolean value that indicates whether pricing is recalculated after the attribute write. The default value is `true`. | Boolean |
| validateCartAfterUpdate | No | Optional. A Boolean value that indicates whether the cart is validated after the attribute write. The default value is `true`. When the cart is invalid, the chunk fails and is not copied back. Set to `false` to copy back regardless of validation errors. | Boolean |
| checkAsyncJobStatus | No | Optional. A Boolean value that indicates whether to check for running asynchronous jobs on the quote before starting the update. The default value is `true`. | Boolean |

## Output Values

  
| Parameter | Description | Data Type |
| --- | --- | --- |
| status | The status of the request. Valid values are `ACCEPTED` when queued and `FAILED` on envelope-level rejection. | String |
| success | A Boolean value that indicates whether the request was accepted and the asynchronous job was queued. | Boolean |
| quoteId | The ID of the quote. | String |
| asyncJobId | The batch job ID for status polling. | String |
| message | A human-readable status message. | String |
| error | An error message if the request was rejected. | String |

## Usage

Use this action when you need to update product attributes across many quote line items without updating each line item individually.

After the request is accepted, the action immediately returns an asynchronous job ID. Use the Get Async Job Status action to monitor processing status.

The action delegates all business processing to the Bulk Attribute Update service. The invocable action performs only payload validation before submitting the asynchronous request.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-communications-264-0-0-production-enus/444efb86-ea1e-477e-afbc-56eaac192eaf/images/icon_note.png)

Note Attribute codes and values aren't validated before this action runs. If you provide an invalid attribute code or value, the API call still returns success, so no error is shown. Make sure the attribute codes and values you enter are correct.

## Extensibility

The Bulk Attribute Update service supports Apex hooks to trigger custom workflows during execution.

**Pre-Hook**

Execution & Availability: Supported via the `preHook` method defined in `B2BCmexAPIHookInterface`.

Behavior: If pre-flight validation fails during request kickoff, the call is rejected synchronously before a job is created, meaning no batch fires and no post-hook runs.

**Post-Hooks**

Opt-in per org (configured via `bulkAttributeUpdateHook` from Setup > Custom Settings > Custom Class Implementation), post-hooks fire at two execution points:

- Immediate Post-Hook (`executePostHook`): Runs synchronously on request acceptance with `phase=ACCEPTED` right after the job is enqueued.
- Batch-Finish Post-Hook (`executePostHookForBatch`): Runs once upon batch completion with `phase=COMPLETED`. It delivers an output payload containing `successCount`, `failureCount`, and a per-entry `results[]` array detailing line-level status and error messages.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-communications-264-0-0-production-enus/444efb86-ea1e-477e-afbc-56eaac192eaf/images/icon_note.png)

Note Post-hook exceptions are swallowed to prevent interrupting the main transaction or notification flow.

## Considerations

- This action supports asynchronous processing only.
- Only one asynchronous job can run for a quote at a time unless `checkAsyncJobStatus` is set to `false`.
- The `updates` input must be a valid JSON array.
- Each update object must contain `rootQuoteLineItemId`, `quoteLineItemId`, and `attributes`.
- Each entry in the `attributes` array must contain `attributeCode` and `value`.
- Validation, pricing recalculation, and cart validation behavior are controlled by optional input parameters.

## Example Input

```json
{
  "quoteId": "0Q0xxxxxxxxxxxxAAA",
  "updates": [
    {
      "rootQuoteLineItemId": "0QLxxxxxxxxxxxxAAA",
      "quoteLineItemId": "0QLxxxxxxxxxxxxAAA",
      "attributes": [
        {
          "attributeCode": "VEPC_ATTR_DOWNLOAD_SPEED",
          "value": "200Mbps"
        },
        {
          "attributeCode": "VEPC_ATTR_CONTRACT_TERM",
          "value": "24Months"
        }
      ]
    },
    {
      "rootQuoteLineItemId": "0QLxxxxxxxxxxxxBBB",
      "quoteLineItemId": "0QLxxxxxxxxxxxxBBB",
      "attributes": [
        {
          "attributeCode": "VEPC_ATTR_DOWNLOAD_SPEED",
          "value": "300Mbps"
        },
        {
          "attributeCode": "VEPC_ATTR_CONTRACT_TERM",
          "value": "34Months"
        }
      ]
    }
  ],
  "validate": true,
  "price": true,
  "validateCartAfterUpdate": true,
  "checkAsyncJobStatus": true
}
```

## Example Output

```json
{
  "success": true,
  "quoteId": "0Q0XXXXXXXXXXXX",
  "status": "ACCEPTED",
  "asyncJobId": "707XXXXXXXXXXXX",
  "message": "Bulk attribute update accepted; poll asyncJobId for status."
}
```

## Error Handling

The action immediately returns a `FAILED` status when the request cannot be accepted.

Service-level validation errors are returned in the `error` output using this format:

```
[errorCode] errorMessage
```

For example:

```
[NOTHING_TO_UPDATE] Specify at least one entry for the updates parameter.
```

The action rejects the request before submitting the asynchronous job when:

- `quoteId` is blank.
- `updates` is blank.
- `updates` is not valid JSON.
- `updates` is not a JSON array.