How To Use Delete Action In Integration Procedures

The Delete Action in Integration Procedures allows you to remove Salesforce records directly using OmniStudio, without writing any Apex code. It is commonly used when you want to delete records from an OmniScript or FlexCard based on a user action, such as clicking a button or submitting a form. This approach keeps the implementation lightweight, fast, and easy to maintain.

In this post, we will understand how the Delete Action works, how to configure it correctly, and how to call it from an OmniScript.

Understanding Delete Action in Integration Procedures

Delete Action is a standard OmniStudio Integration Procedure element designed specifically for record deletion. It works by accepting a Salesforce record Id and deleting the corresponding record from the specified object. Unlike DataRaptor or Apex-based solutions, Delete Action does not require field mappings or custom logic, making it ideal for straightforward delete operations.

This action is especially useful when you need to delete child records, clean up related data, or allow users to manage records directly from a guided OmniScript flow.

Creating the Integration Procedure

To begin, create a new Integration Procedure from the OmniStudio console. Provide a meaningful name and description so the purpose of the Integration Procedure is clear. Once created, save the Integration Procedure before adding any actions.

After saving, drag the Delete Action onto the Integration Procedure canvas. This action will handle the actual deletion of the record in Salesforce.

Configuring the Delete Action

In the Delete Action properties, you must specify the Salesforce object and the record Id to be deleted. The Delete SObject Type should be the API name of the object, such as Account, Contact, or a custom object.

The Path To Id is where the record Id will be passed in the request JSON. This Id usually comes from an OmniScript, FlexCard, or context variable. As long as the correct Id is provided, the Delete Action will remove the record successfully.

Once configured, the Delete Action is ready to perform deletions.

Using Response Action to Return Status

Although the Delete Action deletes the record, it does not automatically send a confirmation back to the calling component. To handle this properly, it is recommended to add a Response Action after the Delete Action.

The Response Action allows you to send information such as a success message, deleted record Id, or status flag back to the OmniScript or FlexCard. This helps in displaying confirmation messages or triggering additional logic on the UI side.

After adding the Response Action, configure it to return the required output data and save your changes.

Activating the Integration Procedure

Before the Integration Procedure can be used, it must be activated. Activation makes it available for use across OmniScripts and FlexCards. Without activation, the Integration Procedure will not appear in the selection list.

Calling Delete Action from OmniScript

Next, open or create an OmniScript where the delete operation is required. Drag an Integration Procedure Action onto the OmniScript canvas and select the Integration Procedure you created.

In the Remote Properties → Extra Payload, pass the record Id that needs to be deleted. This Id can come from the Context Id, a DataRaptor response, or user-selected data. Once the Id is passed correctly, the OmniScript is fully connected to the Delete Action.

 


Integration Procedures
Delete Action an Integration Procedures

Testing the Delete Functionality

To test the setup, go to the OmniScript preview. Provide a valid record Id in the Context Id or test parameters and trigger the delete action. Once executed, the record will be immediately deleted from Salesforce.

If a Response Action is configured, you will also see the confirmation or response data returned on the preview screen.

 


Integration Procedures
Response Action

Best Practices for Using Delete Action

While Delete Action is powerful, it should be used carefully. Always ensure that only authorized users can delete records. Adding confirmation messages and using role-based access control helps prevent accidental deletions. In production environments, it is also a good idea to log delete operations or notify users after successful deletion.


Integration Procedures
Result On Preview Tab

Conclusion

The Delete Action in Integration Procedures offers a clean and efficient way to delete Salesforce records using OmniStudio. It eliminates the need for Apex or complex DataRaptor configurations and works seamlessly with OmniScripts and FlexCards. When used correctly with proper validation and confirmation, it becomes a reliable solution for record management in OmniStudio implementations.

Scroll to Top