> For the complete documentation index, see [llms.txt](https://ivory-docs.gitbook.io/ivory/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ivory-docs.gitbook.io/ivory/features/creating-rules.md).

# Creating Rules & Data Elements

Use natural language to create Adobe Tags components

Describe what you want in plain language. Ivory generates the components.

## Create a Rule

1. Click **Create** in the Ivory panel
2. Enter your request:

```
Create a rule that fires on page load and sets eVar1 to the page title
```

3. Click **Generate**

Ivory creates all necessary components: events, conditions, and actions.

## Create Data Elements

Same process, different request:

```
Create a data element that captures the value of #user-email
```

Or create multiple at once:

```
Create data elements for page name, page URL, and page type
from the digitalData.page object
```

## Writing Effective Prompts

**Be specific about triggers:**

* "fires on clicks of .cta-button" (good)
* "fires on button clicks" (too vague)

**Specify the data you need:**

* "set eVar5 to page name, eVar6 to page URL" (good)
* "set some variables" (too vague)

**Include conditions when needed:**

* "only on pages where the path contains /checkout"

## Review Workflow

After generation, review each component:

| Action              | Result                                   |
| ------------------- | ---------------------------------------- |
| Approve             | Component created as-is                  |
| Deny                | Component skipped                        |
| Approve All Pending | Approve all remaining components at once |

Only approved components are created in Adobe Tags.

## Batch Creation

Create multiple items in one prompt:

```
Create click tracking rules for:
- Add to cart button
- Remove from cart button
- Checkout button
Each should send an Analytics beacon with the button name in eVar10
```

Each rule appears separately in the review carousel.

## Using Templates

Start from a saved prompt template for common rule patterns:

1. Click **Create** to open the Create modal
2. Select a template from the dropdown in the "Context & Template" section
3. The template text populates the request field
4. Modify as needed and click **Generate**

Templates are managed in the [Ivory web app](https://ivory.moonbird.ai). Learn more about [Prompt Templates](/ivory/features/prompt-templates.md).
