---
title: createTemporary
slug: campaign/docs/createtemporary
docTags: 
createdAt: 2026-07-02T19:01:45.941Z
---

The target group becomes invalid after the end of the session.

:::hint{type="info"}
**Note**
Temporary target groups cannot be used for mailings. Use them to filter the results of a query.
:::

**Type**: long

**Parameters**

| Name                | Type       | Value                                                                    |
| ------------------- | ---------- | ------------------------------------------------------------------------ |
| sessionId           | String     | ID of the session                                                        |
| negateCondition     | boolean    | See [Type conversion and formatting rules](docId\:oBo45vU4YUXzQMBi5Pwvz) |
| attributeName       | String     | See [Type conversion and formatting rules](docId\:oBo45vU4YUXzQMBi5Pwvz) |
| operation           | String     | See [Available operators](docId\:oBo45vU4YUXzQMBi5Pwvz)                  |
| operationParameters | String\[ ] | See [Attribute values](docId\:oBo45vU4YUXzQMBi5Pwvz)                     |

**Return values**

ID of the target group

**Code structure**

```javascript
long createTemporary(String sessionId, boolean negateCondition, String attributeName, String operation, String[] operationParameters)
```
