> For the complete documentation index, see [llms.txt](https://en.help.firstline.cc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://en.help.firstline.cc/feature/integrate/automation.md).

# Automation

Automation features help users automatically perform tedious and repetitive tasks, providing human support in an automated way so staff can focus on the most important things and fully enjoy the many advantages brought by FIRST LINE.

## Automation type

Automations have different trigger conditions and actions depending on the data source. The currently provided data types are as follows

* Customer: when a customer is created or updated
* Ticket: when a ticket is created or updated
* Conversation record: when an agent contacts, answers a customer, or replies to a message
* File: when a file is uploaded, such as customer and ticket attachments
* Employee: when an employee logs out or logs in

You can choose the appropriate type according to different usage scenarios to build automation features that can help you do the following.

* Integrate customer data into the corporate database.
* Integrate tickets with third-party services, such as LINE notifications or Google Calendar reminders.
* Assign responsible agents based on priority.

{% hint style="info" %}
We automate repetitive and time-consuming tasks and, according to required conditions or trigger points, allow users to focus on handling what truly matters.
{% endhint %}

## Basic settings

All automation types have the following basic settings

<table data-header-hidden><thead><tr><th width="150">Required</th><th width="150">Name</th><th>Description</th></tr></thead><tbody><tr><td>Required</td><td>Name</td><td>Description</td></tr><tr><td><ul class="contains-task-list"><li><input type="checkbox"></li></ul></td><td>Enable rule</td><td>You can choose whether to enable this rule.</td></tr><tr><td><ul class="contains-task-list"><li><input type="checkbox" checked></li></ul></td><td>Rule name</td><td>Enter a simple and easily identifiable name; this is required.</td></tr><tr><td><ul class="contains-task-list"><li><input type="checkbox"></li></ul></td><td>Content</td><td>Write notes to help understand the rule's purpose and intent.</td></tr></tbody></table>

## Trigger actions

Automations are automatically triggered by "events." Different automation categories have different trigger events, and you can use multiple selections to satisfy business logic.

![](https://3300265106-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNRu7dk70ei7JV9HlW9%2F-McxkDLPhWmPQ93BywGG%2F-McxkW2-ibQyHHQJsg_Y%2Fimage.png?alt=media\&token=4dbb22f3-6cb7-4e1b-9f03-1d6d780c2a37)

### Customer

* When data is created
* When data is updated

### Ticket

* When data is created
* When data is updated

### Conversation record

* When agent proactively contacts
* When agent answers a customer
* Customer replies to message
* Agent replies to message
* When call is connected
* When conversation ends

## Data conditions

When an event is triggered, you can further specify detailed conditions based on the data content to decide whether to execute actions.

Conditions can also determine whether a "value" has changed; depending on the usage scenario, this can reduce the frequency of repeated executions.

![](https://3300265106-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNRu7dk70ei7JV9HlW9%2F-McxkhhKEN2CIFFJrhLP%2F-McxkorWWLiZO4RdQs8o%2Fimage.png?alt=media\&token=00c332ae-0335-4500-8f4d-fc071dce47d9)

### Customer

* Last name: whether it contains/does not contain keywords.
* First name: whether it contains/does not contain keywords.
* Member ID: whether it contains/does not contain keywords.
* National ID number: whether it contains/does not contain keywords.
* Responsible agent: whether this customer matches the specified agent.

### Ticket

* Status: whether it contains/does not contain the specified status.
* Priority: whether it contains/does not contain the specified priority.
* Responsible agent: whether this customer matches the specified agent.
* Created by agent: whether this customer matches the specified agent.

### Conversation record

* Channel type: such as LINE, live chat, etc.
* Conversation initiator: whether the contact was initiated by the agent or the customer.
* Online status: limited to live chat channels, whether the customer has enabled live chat.

## Execute actions

"Actions" are the most important settings that make up automation features. Each automation consists of one or more actions. When the "trigger" and "conditions" are met, the "actions" will execute automatically, replacing manual work. The actions that can be executed vary by type.

![](https://3300265106-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNRu7dk70ei7JV9HlW9%2F-McxqllNmTtn3tp94JhG%2F-McxqqNdDcv8_hIXUKx7%2Fimage.png?alt=media\&token=da1218fd-e162-46cc-b0b4-e3a56f4cb744)

### Customer

* Change last name
* Change first name
* Change member ID
* Change responsible agent
* Delete customer
* Call Webhook script

### Ticket <a href="#gong-chan" id="gong-chan"></a>

* Change status
* Change priority
* Change title
* Change responsible agent
* Delete ticket
* Call Webhook script

### Conversation record <a href="#jiao-tan-ji-lu" id="jiao-tan-ji-lu"></a>

* Call Webhook script

{% hint style="info" %}
With the Webhook script feature, companies can further develop their own APIs or integrate with third-party services to build auxiliary functions that better fit their business logic.
{% endhint %}
