# Escalation of High-Value Pending Tickets

This guide explains how to configure a workflow to automatically escalate high-value tickets that remain unresolved for a certain period.

## Use Case

For instance, you may want to escalate tickets with potential savings greater than $50 that have not been resolved within 7 days. This setup automatically notifies higher-level stakeholders, such as engineering leads or cost optimization managers, to ensure timely attention to impactful tickets and help avoid missed savings opportunities.

## Setting up Workflow

{% stepper %}
{% step %}

### Access Workflow Section in OneLens

1. Navigate to the **workflow** section of 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 (e.g., Pending High-Value Ticket Escalation – 7 Days).
2. You can also add a *description*, which is optional.
3. Once you’ve filled in the details, click **Create** to proceed.

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

{% step %}

### Choose the Trigger for the Workflow

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

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

#### **Trigger Start**

* You’ll have two options for how these conditions should be applied:
* **Trigger when all conditions match** – the workflow will only trigger if all conditions are met.
* **Trigger when any condition matches** – the workflow will trigger if one of the conditions is met.
* You can configure multiple conditions by clicking on the **Add Rule** button.

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

#### **Conditions Configuration**

Each condition involves filling out three fields:

1. **Criteria**: Choose the specific property of the ticket you want to filter by. You can use the following attributes:
   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**: Set a comparison operator or criteria type for the selected attribute. The available options vary based on the chosen criteria.
3. **Borderline**: Set the specific value or list of values to compare against.

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

#### **Example: Recommendation > Potential Savings**

* **Criteria**: Potential Savings
* **Limit**: Greater Than
* **Borderline**: 500 (this would filter for tickets where potential savings are greater than $500).

You can set multiple conditions, each with unique criteria, limits, and boundaries, depending on the ticket types you wish to target.

Once all conditions are defined, click **Save Changes** to finalize the trigger.
{% endstep %}

{% step %}

### Set Up Email Notifications

* After defining the trigger and conditions, click **Add Step**.
* Under Messaging, choose **Send Email to Users**.

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

#### **Configure Email**

Add the following details:

* **Recipients**: Enter the email addresses of the users who should receive the email notifications.
* **Cc/Bcc**: Optionally, add additional recipients in the Cc or Bcc fields.
* **Subject**: Specify the subject line for the email notification.
* **Message**: Enter the email's body content, including relevant details for the recipients.

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

#### **Preview the Email**

To ensure the email looks as expected, you can preview it before sending it.

Click on **Show preview with mock data** to view the email preview. This will display how the email will appear with sample data, allowing you to verify its format and content.

Once you're satisfied with the preview, click on **Save Changes**.

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

{% step %}

### Add Delay Step

Click **Add Step**, then select **Wait for a Specific Time under Delay**.

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

Enter the desired duration and choose the appropriate time unit. You can set the delay in:

* Hours
* Days
* Months
* Years

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

For this case, go with 7 days.

Click **Save Changes**.
{% endstep %}

{% step %}

### Add Conditional Step for Escalation Check

Click **Add Step** and choose **If/Else Condition** under **Conditional**.

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

Configure the If condition:

* **Criteria**: Ticket Status
* **Limit**: Is In
* **Borderline**: To Do

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

Click Save Changes.
{% endstep %}

{% step %}

### Setting Up Escalation mail

1. Under the If path, click **Add Step**, then select **Send Email to Users**.

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

2. Enter escalation recipients (e.g., higher authorities).
3. Optionally, include the original recipients in Cc.
4. Set the Subject and compose a message indicating the pending ticket status.
5. Click **Save Changes**.
   {% endstep %}

{% step %}

### Publish the Workflow

Review the workflow representation to ensure everything is set up correctly.

Click **Publish** to make the workflow active.
{% endstep %}
{% endstepper %}


---

# 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/escalation-of-high-value-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.
