Edit or delete a discount code
Overview
This flow describes how to change or delete a discount code of a facility in Care. Discount codes are part of the billing settings of the facility.
You can change only the discount codes of the facility, marked Facility. The discount codes of the deployment, marked Instance, have no edit or delete buttons.
Pre-requisites
- You are a member of the facility in any role, or of its geographic organization or an organization above it.
- The facility has its own discount code, marked Facility in the list. See Create a discount code.
- The facility has saved a discount configuration. If it has not, set the discount configuration first.
- If you want to delete the code or change its Code, no discount component uses the code. If one does, change or delete that discount component first.
- You have the permissions listed below.
Permissions
| Permission | Access |
|---|---|
| Can Update on Facility | Lets you save the billing settings of the facility. It counts when you hold it through a role in the facility's root organization, which Care names Administration. A role in the facility's geographic organization, or in an organization above it, also counts. A role that you hold only in a department or team of the facility does not count. By default, the Facility Admin, Administrator and Staff roles hold it. Every member of the facility can open the page and use its buttons. Without this permission, Care refuses the save with a message that contains "You do not have permission to create Facilities". |
Steps
1. Open the discount codes
In the facility sidebar, under Administration, select Settings.
Care shows the settings sidebar of the facility.
In the Billing group, select Billing.
Under Discount, select Discount Codes.

2. Find the discount code
To filter the list, type a name or a code in Search.
Find the row of the discount code. Only the rows marked Facility have the edit and delete buttons.

3. Change the discount code
Follow this step to change the name or the code. To delete the code, go to step 4.
On the row of the code, select the pencil icon.
Care opens the Edit Discount Code form with the current values.
Change the Name, the Code, or both.
Select Save.
Note: Save stays disabled until you change a field.
Care closes the form at once, before it saves the change.
If Care refuses the save, your changes are lost. Open the form again. Make the changes again.
If Care shows an error message, use this table.
| If the message contains | What to do |
|---|---|
| All monetary components code must be defined. | A discount component uses the old code. Keep the old code. Or, change or delete those discount components first. |
| Duplicate codes are not allowed. | The facility already has a discount code with this code. Use a different code. |
| Redefining system codes are not allowed. | The deployment already has a discount code with this code. Use a different code. |
| Field required | The facility has not saved a discount configuration. Set the discount configuration first. Then change the code again. |
| You do not have permission to create Facilities | You do not hold the permission listed above in the right organization. Ask for a role that has it in the facility's root organization, Administration. |

4. Delete the discount code
Follow this step to delete the code.
On the row of the code, select the trash icon.
Care shows the Confirm Delete dialog with the message "Are you sure you want to delete this discount code? This action cannot be undone."
Select Confirm.
To keep the code, select Cancel.
If a discount component uses the code, Care refuses the delete. Care shows a message that contains "All monetary components code must be defined."
In that case, change or delete those discount components first. Then delete the code again.


Expected Outcome
- After you save a change, Care shows the message "Discount code updated successfully".
- After you delete a code, Care shows the message "Discount code deleted successfully".
- The list shows the changed code, or no longer shows the deleted code.
- You cannot undo a delete.
Related
Concepts:
Flows: