---
source_url: https://www.pubnub.com/docs/illuminate/decisions/create-decision
title: Create Decision
updated_at: 2026-06-23T11:43:25.745Z
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# Create Decision

After you create a Business Object, start acting on it. Configure Decisions and related rules to evaluate metric data. When a condition is met, the Decision triggers the configured actions.

:::tip Creating Decisions for customers
If you are a PubNub partner with Illuminate embedded, create Decisions for yourself or your end customers in the Admin Portal. See [Illuminate for PubNub Partners](#illuminate-for-pubnub-partners) for details.
:::

## Use case

For our [use case](https://www.pubnub.com/docs/illuminate/basics#sample-use-case), create a Decision based on the previously [created](https://www.pubnub.com/docs/illuminate/business-objects/create-business-object) and [activated](https://www.pubnub.com/docs/illuminate/decisions/create-decision#activate-decision) `Game engagement experiment` Business Object and the [Message sum](https://www.pubnub.com/docs/illuminate/business-objects/create-business-object#create-metrics) metric.

Configure a Decision that sends a personalized message with a discount code to guilds when they publish `100` or more messages within `30 minutes`.

##### Check configuration details

Summary of items we define:

| Item | Values | Description |
| --- | --- | --- |
| Decision | Name: `Send discount code` |  |
| Action 1 | Name: Send discount code — Rockin Guild, Channel ID: rockin, Message body: "${message}. Use ${discountCode} to buy ${purchasedItem}." | Action of the **Send Message** type that defines the content of the personalized message to be sent to the Rockin Guild members and the channel ID on which this message should be sent. |
| Action 2 | Name: Send discount code — Hurrah, Channel ID: hurrah, Message body: "${message}. Use ${discountCode} to buy ${purchasedItem}." | Action of the **Send Message** type that defines the content of the personalized message to be sent to the Hurrah guild members and the channel ID on which this message should be sent. |
| Conditions | Sum of Messages, Guild Name | Automatically populated from the `Message sum` metric. |
| Rules configuration | Hit policy: Multiple, Evaluation frequency: 30 minutes |  |
| Rule 1 | Discount code: FORTFREE, Purchase item: Wood Fort, Guild name: Rockin Guild, Message: You really rock, Rockin Guild! | Rule that triggers Action 1 whenever Rockin Guild members send `100` or more messages within the evaluation window of `30 minutes`. |
| Rule 2 | Discount code: FORTX, Purchase item: Metal Fort, Guild name: Hurrah, Message: Hip, Hip, Hurrah! | Rule that triggers Action 2 whenever Hurrah members send `100` or more messages within the evaluation window of `30 minutes`. |

## Steps

Follow these sections to configure a Decision with actions and rules.

### Create actions

Create a Decision and define actions.

#### Watch video

[Illuminate: Create actions](https://youtu.be/XjYnB5er_cY)

#### Step-by-step guide

1. On the Decisions home page, click Create Decision. The Create new Decision modal opens.
2. Enter the Decision name (Send discount code) and an optional description.
3. Click Select Business Object and choose the previously created Game engagement experiment Business Object.
4. Select an aggregation and choose the Message Sum metric from the list. After you select the metric, Conditions auto-populate from the metric’s data fields. You also see an empty Decision table preview with the conditions as columns. Event-based DecisionsThis guide uses the Metric Decision Type with metric-based conditions. For your scenario, you can use the Event Decision Type and add conditions from Business Object data fields or Query Decision Type and add conditions from the query. For guidance on creating Queries and Decisions, refer to Query Builder.
5. Choose an action to run when rules are met. Select + Add action, enter the action name (Send discount code - Rockin Guild), add an optional description, and click Configure.
6. Choose the Send Message action type to send a personalized message with discount codes to guild members.
7. Select publish and subscribe keys for the guild channel ID. Enter the message Body ("${message}. Use ${discountCode} to buy ${purchasedItem}."). Define variables in two ways. For dynamic values from real-time data, use conditions or add the data field as a condition. For static strings or values, create variables and set them in the decision table. You set static variables in later steps.
8. Optionally add Headers or Documentation / Notes, then click Save.
9. Variables in the action payload appear as new columns in the Decision table preview. You can update their values.
10. Repeat steps 5-9 to create the Send discount code - Hurrah action for the Hurrah guild.
11. Select Create to finalize the Decision.

### Add conditions and rules

Create rules that trigger actions when conditions are met.

#### Watch video

[Illuminate: Add conditions and rules](https://youtu.be/rJ3rbpdc6D0)

#### Step-by-step guide

1. Start from the link that appears after creation, or open the Decision and click Edit Rules.
2. Click + Add rule and define two rules for your Decision. Set Hit Policy to Multiple and Evaluation frequency to 30 minutes. Set action frequency with the Action Execution Limit icon for each rule.
3. When you’re done, Save the changes.

After you configure and save the Decision, [activate](https://www.pubnub.com/docs/illuminate/decisions/create-decision#activate-decision) it.

### Activate Decision

Activate the Decision to evaluate rules and run actions.

:::note Conditions for activating a Decision
Head to the [Additional details](https://www.pubnub.com/docs/illuminate/decisions/basics#additional-details) section for details on conditions that must be met to activate a Decision.
:::

###### Watch video

[Illuminate: Activate decision](https://youtu.be/sfz186HLWGM)

###### Step-by-step guide

Click **Activate**.

![Activate Decision](https://www.pubnub.com/assets/images/decision-settings-7200a753a938c336f135b606a3d1fe47.png)

Choose one option:

* Activate until manually deactivated.
* Set dates when the rule is active (uses your browser’s time zone).

![Activate Decision — configuration window](https://www.pubnub.com/assets/images/activate-decision-configuration-window-1545d081705af0a9396db6a48d572f37.png)

After activation, you can still edit values in rules.

After activation, rules run and actions can trigger. View results on a [Dashboard](https://www.pubnub.com/docs/illuminate/dashboards/create-dashboards-and-charts) with a chart for the same metric.

## Illuminate for PubNub partners

If you’re a PubNub partner, you see a drop-down to choose who you work on in Illuminate.

* Select **your own company name** at the top of the drop-down if you’re creating Decisions for yourself.
* **All customers** to see which customers have been set up with Illuminate.
* A **customer name** to see only their Decisions and start creating or editing only for this one customer.
* **All internal and customers** for your own Decisions and those of the customers.

![Create Decision for end customers](https://www.pubnub.com/assets/images/decisions-for-end-customers-e1cec6cb0c9103cd5587e4ab76a0a5e2.png)

The `Customer` column shows whether a Decision belongs to a customer or your organization.

* If you don’t see a customer in the drop-down menu, go to the [Partner Portal](https://www.pubnub.com/docs/portal/partner-portal) section of the PubNub Admin Portal and make sure you’ve created the customer in PubNub and assigned a keyset to them.
* If, after selecting the customer, you don’t see apps or keysets for selection, assign keysets for this customer in the Partner Portal.

## Terms in this document

* **Action** - The type of activity (procedure) to execute when a condition is satisfied (for example, sending a message).
* **Condition** - A requirement that must be satisfied or evaluated to true for an action to be executed. Input in a decision table.
* **Decision** - A collection (or decision table) of conditions and actions. When conditions are satisfied, the corresponding actions are triggered as per defined rules.
* **End Customer** - A customer of a PubNub partner. End customers do not have direct access to the Admin Portal. Instead, they interact with PubNub products—such as Illuminate—through the partner’s portal, where PubNub services are embedded. They can create PubNub objects only within this partner-provided environment.
* **Partner** - A PubNub customer who resells PubNub products, such as Illuminate, to their own customers. Partners have access to the Admin Portal, enabling them to create and manage PubNub objects for themselves or on behalf of their end customers.
* **Rule** - A definition (row in a decision table) stating which action should be triggered for which condition.
