# Edit or delete an action configuration

## Overview

[Video: Edit or delete an action configuration](https://www.youtube.com/watch?v=NPldQLj-5Lk)

This flow describes how a superuser of the Care instance edits or deletes an [action configuration](https://docs.ohc.network/concepts/platform/action.md): a named list of actions that Care runs when staff book an [appointment](https://docs.ohc.network/concepts/scheduling/booking.md) from a slot.

You can change the name, the description and the actions, but not **Runs for** or the on-demand setting.

## Pre-requisites

* You sign in as a superuser. Care shows **Admin Dashboard** on the home dashboard only to superusers.
* The action configuration is saved in Admin > Actions. See [Create an action configuration](https://docs.ohc.network/flows/platform/action/create-an-action-configuration.md).
* You have the permissions listed below.

## Permissions

| Permission | Access |
| - | - |
| Superuser of the Care instance | Only a superuser can change or delete an action configuration. No role gives this access, and Care refuses the change from every other user. |

## Steps

### 1. Open Actions

On the home dashboard, select **Admin Dashboard**.

In the admin sidebar, under **Configuration**, select **Actions**.

![Actions in the admin sidebar](/assets/images/edit-or-delete-an-action-configuration-1-b56fdc6a79b4dee1d98d1a02573a005e.webp)

### 2. Open the action configuration

The list shows the **Name**, **Runs for**, **Actions** and **On demand** of each configuration.

Select the row or the name of the configuration. Care opens the configuration.

The configuration shows who created it under **Created By**, and who changed it last under **Last updated by**.

Note: The list has no delete control. To delete a configuration, open it first.

![An action configuration row on the Actions page](/assets/images/edit-or-delete-an-action-configuration-2-8388c8eb04fb12a9d1e5618ac17dcec3.webp)

### 3. Change the name or the description

Change the **Name** or the **Description**.

| Components | What it captures |
| - | - |
| **Name** | The name of the configuration in the list. This field is required. It holds at most 254 characters. |
| **Description** | More information about the configuration. The list shows it under the name. This field is optional. |

**Runs for** shows as a badge. If the configuration can be run on demand, an **On demand** badge shows next to it.

You cannot change these badges. Care shows "The context and the on-demand setting are fixed once created."

Note: The on-demand setting decides if staff can run the configuration by hand. No screen in this version runs a configuration by hand.

![The name and description of the configuration being changed](/assets/images/edit-or-delete-an-action-configuration-3-2ccc7eb665ee965f46dca5f50132faaa.webp)

### 4. Change an action

Each action shows as a card titled "Action 1", "Action 2" and so on. A summary of the action shows under the title. Every card starts closed.

Select the "Action N" header of the action that you want to change. The card opens, and any other open card closes.

Change the conditions under **When**, or the instructions under **Then**. For details, see [Create an action configuration](https://docs.ohc.network/flows/platform/action/create-an-action-configuration.md).

![An action card opened to change its conditions and instructions](/assets/images/edit-or-delete-an-action-configuration-4-4de23d524ff2cb9eb9602431bac83bac.webp)

### 5. Add or remove an action

To add an action, select **Add action**. Set its conditions under **When** and its instructions under **Then**.

To remove an action:

1. On the card of the action, select the bin button "Remove action N".
2. Care asks "Remove action N?". Select **Remove**.

Note: Care removes the action from the saved configuration only when you select **Save**.

### 6. Save the changes

Select **Save**.

Note: **Save** stays disabled until you change something.

If the name is empty or too long, Care shows "This field is required" or "Maximum 254 characters are allowed".

If an action has a problem, Care shows the problem in an error message and opens that action. Care does not save. Fix the action, then select **Save** again.

Note: If you leave the configuration before you save, Care asks "You have unsaved changes. Leave without saving?"

![The success message after saving the configuration](/assets/images/edit-or-delete-an-action-configuration-5-550a5f450f8ab69324d85bcfa857a46b.webp)

### 7. Delete the action configuration

Follow this step only when the configuration must stop running. You do not need steps 3 to 6.

Select **Delete**.

Care asks "Delete this configuration?" and tells you that the configuration stops running. Records it already acted on are not changed.

Select **Delete**. To keep the configuration, select **Cancel**.

![The delete confirmation dialog](/assets/images/edit-or-delete-an-action-configuration-6-b83f46c2844b06c418820e848f01e8b4.webp)

![The success message after deleting the configuration](/assets/images/edit-or-delete-an-action-configuration-7-021a0b3eafc71c07b301ad15678248a1.webp)

## Expected Outcome

* After you save, Care shows "Action configuration updated", and the configuration stays open.
* When staff book an appointment from a slot after you save, Care runs the changed configuration.
* The change applies in every facility, because action configurations in Admin > Actions belong to the whole Care instance.
* Care does not run the changed configuration on appointments that are already booked, even when staff edit or reschedule them.
* After you delete, Care shows "Action configuration deleted" and goes back to the list.
* A deleted configuration leaves the list and no longer runs. Records it already acted on are not changed.

## Related

Concepts:

* [Action](https://docs.ohc.network/concepts/platform/action.md)
* [Appointment Booking](https://docs.ohc.network/concepts/scheduling/booking.md)

Flows:

* [Create an action configuration](https://docs.ohc.network/flows/platform/action/create-an-action-configuration.md)
* [Submit a form that has actions](https://docs.ohc.network/flows/platform/action/submit-a-form-that-has-actions.md)
* [Add actions to a questionnaire](https://docs.ohc.network/flows/platform/action/add-actions-to-a-questionnaire.md)
