# Configure Periodic Digests for Pending Tickets

This guide will walk you through the steps to set up periodic digests for tickets, helping you stay on top of pending tickets with a potential savings of $500 or more.

## Use Case

Your goal is to set up periodic reminders from OneLens for tickets that have the potential to save $500 or more. This ensures you stay informed about important tickets that require attention, helping you make timely decisions.

## Video Guide

For a more detailed walkthrough, refer to the video available here.

{% embed url="<https://www.youtube.com/watch?v=jx1qjrw-u3E>" %}

## Step-by-Step Guide

{% stepper %}
{% step %}

### Access the Workflows

1. Navigate to the **Workflow** section in OneLens.
2. Click the **Create** button in the top-left corner to start a new workflow.

<figure><img src="/files/75wac7d254QViBTqUBFQ" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Create a New Workflow

1. A dialog box will appear, asking for a workflow name. Enter a descriptive name, such as Periodic Digest for New Tickets.
2. Optionally, you can add a description.
3. Click **Create** to proceed.

<img src="/files/PPRUshfx5DKX6NfeYBOK" alt="" width="563">
{% endstep %}

{% step %}

### Select a Trigger

1. In the workflow setup, select the **Tickets** option as your trigger.
2. For this scenario, choose from **All Ticket Digest** with the desired timeframe, as you want to trigger the workflow when a new ticket is generated.

<figure><img src="/files/cg25ZCyjCCrPpsCZRfTT" alt="" width="563"><figcaption></figcaption></figure>

#### **Configure The Trigger**

The next step is configuring the start of the triggers.

1. Set the specific **day and time** at which the digest will be dispatched.

{% hint style="info" %}
**NOTE:** The time is based on the **tenant’s time zone.**
{% endhint %}

2. Next, configure the conditions for the trigger. You have two options for how these conditions should apply:
   1. **Trigger when all conditions match** – the workflow triggers when all conditions are met.
   2. **Trigger when any condition matches** – the workflow triggers when one of the conditions is met.
3. To add multiple conditions, click the **Add Rule** button.

#### **Set Conditions**

Each condition requires three fields:

1. **Criteria**: Choose the property of the ticket to filter by, such as:
   1. **Ticket**: Status, Category
   2. **Recommendation**: Potential Savings, Effort
   3. **Resource**: Name, Account, Region, Service, Tags
   4. **Cost Center (Org Hierarchy)**: Cost Center, Category
   5. **Policy**: Name, Category
2. **Limit**: Select a comparison operator (e.g., Greater Than, Less Than) for the chosen criteria.
3. **Borderline**: Set the value to compare against.

#### **Example Condition:**

* **Criteria**: Potential Savings
* **Limit**: Greater Than
* **Borderline**: 500 (filters for tickets with potential savings greater than $500)

You can add multiple conditions with different criteria, limits, and boundaries.

Once you've defined your conditions, click **Save Changes** to finalize the trigger.

<img src="/files/IkON6r1Ssq7l3Jncc4fe" alt="" width="563">
{% endstep %}

{% step %}

### Set Up Email Notifications

1. After setting the trigger and conditions, click **Add Step**.

<img src="/files/0z4yLWVjmzs4hImfqN12" alt="" width="563">

2. Under **Messaging**, select **Send Email to Users**.

<img src="/files/YdF5sqjglG4TWdJe4jv1" alt="" width="563">

#### **Configure the Email**

* **Recipients**: Enter the email addresses of the users who will receive the notifications.
* **Cc/Bcc**: Optionally, add recipients in the Cc or Bcc fields.
* **Subject**: Define the subject of the email.
* **Message**: Write the content of the email.

#### **Preview the Email**

* To ensure the email is formatted correctly, click **Show preview with mock data**. This shows a preview of the email with sample data.
* If everything looks good, click **Save Changes**.

<img src="/files/oKB6h494pH1YspnL4ppl" alt="" width="563">
{% endstep %}

{% step %}

### Publish the Workflow

Review your workflow to confirm everything is set up properly. When you’re ready, click **Publish** to activate the workflow.

<img src="/files/MPEx1g4v9ckg1tToHqYw" alt="" width="563">
{% endstep %}
{% endstepper %}

## Result

Here is how your email will look:

<figure><img src="/files/iemdcha2KNBxvdoouDnc" alt="" width="563"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onelens.cloud/automate/workflows-and-automation/usecases/configure-periodic-digests-for-pending-tickets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
