---
title: commitConditionModification
slug: campaign/dev-docs/commitconditionmodification
createdAt: 2026-08-06T15:53:46.648Z
---

If the target group is empty, an exception is thrown.

**Type**: void

**Parameters**

| Name           | Type   | Value                                                                                                                        |
| -------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
| sessionId      | String | ID of the session                                                                                                            |
| modificationId | String | Identifier created by [beginConditionModification](https://docs.optimizely.com/campaign/dev-docs/beginconditionmodification) |

**Return values**

- **Code structure**

```javascript
void commitConditionModification(String sessionId, String modificationId)
```
