Source: https://support.atomicwork.com/product/enterprise-workflows/triggers/workflow-events

# Workflow events

Every workflow starts with an event: something that happens to a record, such as a request being created or an asset's warranty date changing. You pick the events in the **Events** section of the workflow builder by clicking **Add event**. You can add more than one, and any one of them starts the workflow.

Events tell a workflow _when_ to run. To narrow down _which_ records it acts on, add conditions after the events. For example, you might start a workflow on **Priority is updated**, then add a condition so it only continues when the new priority is **Urgent**.

When you pick an **\[Attribute] is updated** event, you can also choose the value it changes from and the value it changes to. Both start as **Any**, so the workflow runs on every change. For example, set **Reporting manager is updated** to change from **Any** to a specific person to start the workflow only when that person becomes someone's manager.

The events you can pick depend on the kind of record the workflow runs on.

## Request events

These events are available for request workflows, including service requests and incidents.

| Event                                                  | Starts the workflow when                                                                                 |
| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------- |
| **Request is created**                                 | A new request is raised.                                                                                 |
| **Request is updated**                                 | Anything on the request changes.                                                                         |
| **Request is converted**                               | The request is converted to another type, for example a service request to an incident.                  |
| **Request is moved**                                   | The request is moved to another workspace.                                                               |
| **Request is restored**                                | A deleted request is restored.                                                                           |
| **Private note is added**                              | A private note is added to the request.                                                                  |
| **Reply is sent**                                      | A reply is sent to the requester.                                                                        |
| **Approval status is updated**                         | An approval on the request changes state.                                                                |
| **Resolution SLA is breached**                         | The request misses its resolution target.                                                                |
| **First response SLA is breached**                     | The request misses its first response target.                                                            |
| **Service item is added**, **updated** or **removed**  | The service catalog item on the request is added, changed or removed.                                    |
| **Incident form is added**, **updated** or **removed** | The incident form on the request is added, changed or removed.                                           |
| **Subject is updated** / **Description is updated**    | The subject or description changes.                                                                      |
| **Group is updated** / **Agent is updated**            | The request is reassigned to a different agent group or agent.                                           |
| **Tags is updated**                                    | Tags are added to or removed from the request.                                                           |
| **Status is updated** / **Priority is updated**        | The status or priority changes.                                                                          |
| **Impact is updated** / **Urgency is updated**         | The impact or urgency changes.                                                                           |
| **Linked assets is updated**                           | Assets are linked to or unlinked from the request.                                                       |
| **\[Custom attribute] is updated**                     | A custom attribute you've added to requests changes, for example **Planned resolution date is updated**. |

## Change events

These events are available for change workflows.

| Event                                                               | Starts the workflow when                                                                   |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| **Change is created**                                               | A new change is raised.                                                                    |
| **Change is updated**                                               | Anything on the change changes.                                                            |
| **Change is restored**                                              | A deleted change is restored.                                                              |
| **Private note is added** / **Reply is sent**                       | A private note is added or a reply is sent on the change.                                  |
| **Subject is updated** / **Description is updated**                 | The subject or description changes.                                                        |
| **Tags is updated**                                                 | Tags are added to or removed from the change.                                              |
| **Group is updated** / **Agent is updated**                         | The change is reassigned to a different agent group or agent.                              |
| **Change type is updated**                                          | The change type changes.                                                                   |
| **Status is updated** / **Priority is updated**                     | The status or priority changes.                                                            |
| **Urgency is updated** / **Impact is updated**                      | The urgency or impact changes.                                                             |
| **Planned start date is updated** / **Planned end date is updated** | The planned window for the change moves.                                                   |
| **Actual start date is updated** / **Actual end date is updated**   | The recorded start or end of the change is updated.                                        |
| **Linked assets is updated**                                        | Assets are linked to or unlinked from the change.                                          |
| **\[Custom attribute] is updated**                                  | A custom attribute you've added to changes is updated, for example **Country is updated**. |

For an end-to-end example, see [Automate your change lifecycle with event-driven workflows](/product/change-management/automate-your-change-lifecycle-with-event-driven-workflows).

## Asset events

These events are available for asset workflows. Besides **Asset is updated**, which starts the workflow when anything on the asset changes, there's an event for each asset attribute, including the custom attributes you add. The most commonly used ones are below.

| Event                                                                                           | Starts the workflow when                             |
| ----------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| **Asset is updated**                                                                            | Anything on the asset changes.                       |
| **Operating system is updated** / **OS version is updated**                                     | The device's operating system or OS version changes. |
| **Last connected is updated** / **Last check-in is updated**                                    | The last connected or last check-in time changes.    |
| **Cost is updated** / **Date of purchase is updated** / **Warranty expiration date is updated** | Purchase or warranty details change.                 |
| **Local Asset Id is updated** / **Management ID is updated**                                    | The asset's identifiers change.                      |
| **App logo URL**, **App support URL**, **App status URL** or **App access URL is updated**      | The details of an application asset change.          |

For example, a workflow that starts on **Warranty expiration date is updated** can check whether the new date falls within the next 30 days and open a service request to renew the warranty.

## User events

These events are available for user workflows. They start a workflow when a person's record in your directory is created or changes, for example when an HR system or identity provider syncs an update.

| Event                                                                 | Starts the workflow when                              |
| --------------------------------------------------------------------- | ----------------------------------------------------- |
| **User is created**                                                   | A new user is added to Atomicwork.                    |
| **User is updated**                                                   | Anything on the user's record changes.                |
| **Work email is updated** / **Personal email is updated**             | Either email address changes.                         |
| **Employee ID is updated**                                            | The user's employee ID changes.                       |
| **First name**, **Middle name** or **Last name is updated**           | Any part of the user's name changes.                  |
| **Date of birth is updated** / **Gender is updated**                  | Those personal details change.                        |
| **Hire date is updated** / **Exit date is updated**                   | The user's hire or exit date is set or changed.       |
| **Start date is updated**                                             | The user's start date is set or changed.              |
| **Employment status is updated**                                      | The user's employment status changes.                 |
| **Job title**, **Level**, **Team** or **Department is updated**       | The user's role or place in the organization changes. |
| **Reporting manager is updated** / **HR Business Partner is updated** | The user's manager or HR business partner changes.    |
| **Timezone is updated** / **Language is updated**                     | The user's timezone or language preference changes.   |
| **Country is updated** / **State is updated** / **City is updated**   | The user's country, state or city changes.            |
| **Phone number is updated**                                           | The user's phone number changes.                      |

Custom fields you add to user records get their own **\[Field] is updated** events too.

For example, a workflow that starts on **Exit date is updated** can kick off offboarding as soon as HR records a leaving date, well before the person's last day.

### Update event payload

When a user workflow starts because a user's record was updated, the update event is passed in the workflow payload. You can reference the previous and new values of any field that changed:

- `{{user.event.changeLog.<field>.from}}` — the previous value
- `{{user.event.changeLog.<field>.to}}` — the new value
- `{{user.event.changeLog.<field>.fromName}}` and `{{user.event.changeLog.<field>.toName}}` — the previous and new display names, for fields that store an id, such as the user's manager

For example, when a user's manager changes, use `{{user.event.changeLog.manager.from}}` and `{{user.event.changeLog.manager.to}}` for the previous and new manager records, and `{{user.event.changeLog.manager.fromName}}` and `{{user.event.changeLog.manager.toName}}` for their names.

These placeholders are available in every user update workflow.

To open a user workflow, go to **Automations > Workflow library**. On **Event-based**, select **Users**, open the workflow, and click **Builder**. Add or open a trigger event such as **Reporting manager is updated**.

![The Builder for a user workflow, with the trigger open on Reporting manager is updated, from Any to Any, and a filter that the work email is not empty](assets/workflow-events-01-trigger-reporting-manager.png)

In the **Builder**, click **Show code** to inspect the payload. It arrives as `input.trigger_context.event_data`.

![The code view of a user workflow, with the script reading the update event from input.trigger\_context.event\_data](assets/workflow-events-02-code-view-event-data.png)

### Example: move pending approvals when a manager changes

A common use is a manager change. Start a workflow on **Reporting manager is updated**, then ask Service Assist to add a step that reads the previous and new manager from the event and replaces the old approver with the new one on pending requests.

## Custom object events

Every custom object type gets its own set of events, built from its attributes:

- **\[Object] is created** and **\[Object] is updated**, for the record as a whole.

- **\[Attribute] is updated** for each attribute on the object type.

For example, a **Location** object with **Display name**, **Name**, **Location type**, **Time zone**, **Site Contact** and **Business hours** attributes offers **Location is created**, **Location is updated**, **Display name is updated**, **Name is updated**, **Location type is updated**, **Time zone is updated**, **Site Contact is updated** and **Business hours is updated**. When you add an attribute to the object type, a matching event becomes available.

## Limiting who can trigger a workflow

Events say what has to happen. **Performed by** says who has to do it: the workflow only starts when the event comes from the actor you pick. For example, a workflow on **Reply is sent** with **Performed by** set to **Requester** runs when the employee replies but not when an agent does, which makes it a good way to reopen a request that was waiting on the requester.

Choose the actor in the **Performed by** section of the trigger, under **Events**. Request workflows offer these options:

| Option                     | Starts the workflow when the event comes from       |
| -------------------------- | --------------------------------------------------- |
| **Any user**               | Any person, whether an employee or an agent.        |
| **Requester**              | The person who raised the request.                  |
| **Assigned agent**         | The human agent assigned to the request.            |
| **Any agent**              | Any human service desk agent.                       |
| **Assigned AI agent**      | The AI agent assigned to the request.               |
| **Any AI agent**           | Any AI agent, assigned or not.                      |
| **Any user or AI agent**   | Any person or AI agent, but not an automation.      |
| **System**                 | An automation, another workflow, or an integration. |
| **System or any user**     | An automation or any person.                        |
| **System or any AI agent** | An automation or any AI agent.                      |
| **Any actor**              | Any person, AI agent, or automation.                |

We'd recommend **Any user or AI agent** for workflows that update the records they run on. Updates made by other workflows and integrations then don't start the workflow again, so workflows don't keep triggering each other.

## Schedules

Workflows can also run on a schedule instead of an event. See [Scheduled workflows](/product/enterprise-workflows/triggers/scheduled-workflows).
