You are here:
Delete an Object Record from an Omniscript
Enable users to delete one or more sObject records by using the Delete Action. Use an Object's Record Id to determine which record to delete. The best practice is to use a merge field to refer to an Id or a list of IDs in the data JSON.
- Preview the Omniscript and identify the JSON path for the record.
-
In the Delete Action properties, click Add sObject to Delete.
- From the Type of sObject dropdown, select an Object.
-
In the Path to Id field, enter the JSON path for the record
id using merge field syntax.
Using the Account example, the path to delete the array of Account ids is:
%Account:accId%. -
If required, select Fail operation if any records aren’t
deleted.
In the designer for a managed package, the check box is All or None.
-
Enable users to confirm the deletion of a record by configuring these fields in the
Confirmation Modal section:
-
To display a confirmation modal before deleting the record, select
Display confirmation modal.
In the designer for a managed package, select Confirm.
- Enter the message to be displayed in the confirmation modal.
- If necessary, provide button labels for confirm and cancel actions.
-
To display a confirmation modal before deleting the record, select
Display confirmation modal.
-
Display messages when the operation succeeds or fails by configuring these fields in
the Error Messages section:
-
In the Deleted Record Message field, enter a message that
displays when a record is deleted.
In the designer for a managed package, enter the message in the Entity Is Deleted Message field.
- In the Invalid ID Message field, enter a message that displays when an invalid Id is sent to the Delete Action.
- In the Deletion Failed Message field, enter a message that displays when the action fails to delete a record.
- In the Configuration Error Message field, enter a message that displays when the Delete Action has a configuration error.
-
In the Deleted Record Message field, enter a message that
displays when a record is deleted.

