---
title: setAttributesInBatchFlat
slug: campaign-dev-docs/setattributesinbatchflat
createdAt: 2026-07-02T19:01:45.941Z
---

**Type**: void

**Parameters**

| Name                | Type       | Value                                                                                                                                                                                                                   |
| ------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sessionId           | String     | ID of the session                                                                                                                                                                                                       |
| recipientListId     | long       | ID of the recipient list                                                                                                                                                                                                |
| recipientIds        | String\[ ] | IDs of the recipients                                                                                                                                                                                                   |
| attributeNames      | String\[ ] | Names of the fields (e.g., firstname, lastname etc.) to be updated                                                                                                                                                      |
| flatAttributeValues | String\[ ] | New values for the attributes/fields defined with **attributeNames**<br /><br />Each entry must be formatted according to the [formatting rules](https://docs.optimizely.com/campaign-dev-docs/soap-1-1-compatibility). |

**Return values**

- **Code structure**

```javascript
void setAttributesInBatchFlat(String sessionId, long recipientListId, String[] recipientIds, String[] attributeNames, String[] flatAttributeValues)
```
