# Automated workflows

To access automated workflows, go to **Settings** (gear icon) and select **Automated workflows** from the menu.

## Adding a Workflow

To add an action, click **Add Workflow**.

In the action creation view, you need to set a **condition**, which determines when the action should occur, and the **action** itself that should be executed.

### **Available Conditions**

* **Source** - Choose if the action applies to messages from a specific channel.
* **New Ticket Creation** - Select if the action should occur when any new ticket is created (either by a system employee or triggered by an incoming customer message).
* **Day of the Week** - Select if the action should happen on specific days of the week.
* **Email** - Select if the action should apply to messages from specific email addresses.
* **Subject Contains** - Select if the action should apply to messages with a specific subject (or containing a specific phrase in the subject).
* **Customer Name Contains** - Select if the action should apply to messages from specific senders (you can specify part of the sender’s name).
* **New Message Contains** - Select if the action should trigger for messages containing specific phrases.
* **Time** - Select if the action should happen at specific times.
* **Integrations** - Choose if the action should apply to messages from a specific integration (e.g., if multiple accounts are integrated within one channel).
* **New Message** - Select if the action should happen when any new message is received.
* **Action** - Select if your automated action should respond to one of three actions: first customer message, every new customer message, or return creation.
* **Tag Assigned** - Select if the action should trigger when a specific tag is added to a ticket.
* **Status Set** - Select if the action should trigger when a specific status is set for a ticket.
* **Last Customer Response** - Choose if the action should depend on when the last customer response was received.
* **Ticket Created** - Choose if the action should depend on when the ticket was created.
* **Status Set** - Select if the action should depend on the current ticket status.
* **Context** - Choose if the action should depend on the context of the ticket.
* **Sentiment** - Select if the action should depend on the sentiment of the ticket.
* **Last Customer Response** - Choose if the action should depend on when the last customer message was received.
* **Response Status** - Choose if the action should depend on whether the customer has received a reply.
* **Ticket Status** - Select if the action should apply to tickets with a specific status (e.g., open or closed).
* **Allegro Account** - Select if the action should apply to a specific Allegro account.
* **Inbox** - Select if you want the action to apply only to a specific inbox.
* **Inbox Group** - Select if you want the action to apply to a specific group of inboxes.
* **Ticket Type** - Select if the action should apply to specific types of tickets (e.g., returns).
* **Working Hours** - Choose if the action should trigger only during or outside the working hours of a specified employee.

You can also build actions based on exclusions by using the **is/is not** condition options.

**Example:**

If all messages except Allegro discussions should be assigned to a particular employee, you don't need to assign all other sources manually. Instead, use an exclusion:\
**Source > is not > Allegro Discussions**, and then select **Assign Agent** as the action.

### Available Actions

* **Send Message** - Sends a predefined message to the sender of the message that meets the set conditions.
* **Send Translated Message** - Sends a predefined message, translated into the selected language, to the sender.
* **Message from AI EXPERIMENTAL** - Sends a message generated by AI based on the received message.
* **Send Email** - Sends an email to a specified email address (not to the sender).
* **Set Status** - Automatically sets the status of the ticket.
* **Assign Agent** - Automatically assigns a selected employee to the ticket.
* **Assign Tag** - Automatically assigns a specified tag to the ticket.
* **Change BaseLinker Order Status** - Allows automatic status changes in BaseLinker for orders linked to a ticket in Responso. Currently, it only works for the conditions **ticket source - Responso returns** and **ticket type - return**.

You can combine conditions and actions within a single workflow. Combining conditions refines when the action should occur, and combining actions allows multiple automatic operations to be executed under the same conditions.

**Example:**

If you want to set a reminder for an inquiry that hasn't received a reply within 24 hours, you can choose a combination of conditions:\
**Response Status > Not Responded** and **Ticket Created > More Than > 24 hours**.

To save the action, give it a name and description. Use a descriptive name and description to make it easier to find later. Then, click **Add**.

### Adding Variables to the Message Content

If your automated action involves sending a message or email, you can use variables in the content to dynamically insert specific parameters based on the ticket details. Available variables include:

* `{{ ticket_id }}` - Inserts the ticket ID dynamically.
* `{{ ticket_url }}` - Inserts a dynamic link to the ticket.
* `{{ customer_email }}` - Inserts the customer’s email address dynamically.
* `{{ customer_name }}` - Inserts the customer’s name dynamically.
* `{{ current_date_time }}` - Inserts the current date and time.
* `{{ assigned_agent_first_name }}` - Inserts the first name of the agent assigned to the ticket.
* `{{ assigned_agent_last_name }}` - Inserts the last name of the assigned agent.
* `{{ assigned_agent_full_name }}` - Inserts the full name of the assigned agent.
* `{{ assigned_agent_email }}` - Inserts the email address of the assigned agent.

You can find the current list of available variables in the workflow creation view, under the green "i" icon.

## Automated Workflows Templates

Templates are examples of automated actions. You can use a template as is (just click **Add** after opening it), or you can customize it to suit your needs and then add it.

## Disabling an Automated workflow

If you want to disable an automated action without deleting it, click the three dots on the selected action tile and choose **Edit**. Toggle the switch labeled **Enable** at the top, then click **Update**. In the action tiles view, enabled actions are marked with a green **Yes** tag, while disabled actions are marked with a red **No** tag.

## Deleting an Automated workflow

If you want to permanently delete an automated action, click the three dots on the selected action tile, choose **Delete**, and then confirm the deletion.

{% hint style="warning" %}
**Note:** Once an action is deleted, it cannot be restored!
{% endhint %}
