Contact Us

June 9, 2024

June 23, 2026 2:55 pm

Restoring a deleted Salesforce flow

Share with

Understanding the Issue

When clients hit this problem, they often check the Recycle Bin first. However, Flows are metadata and not data, so they are not stored in the Recycle Bin.

Backups generally cover data, not metadata. So, even if you have a third-party backup solution, it’s unlikely that you’ll be able to recover the Flow from there.

The root cause of this issue is that metadata, such as Flows, are not stored in the same way as data in Salesforce. This means that traditional backup methods may not be effective in recovering deleted metadata.

Potential Solutions

If you have a sandbox environment, it’s possible that the Flow is still available there. You can check your sandboxes to see if the Flow exists in any of them.

Another potential solution is to check if you have connected a developer environment like VSCode to your Salesforce org. If you have, you might have pulled the metadata for the Flow, which could allow you to recover it.

Recreating the Flow

If you’re unable to recover the deleted Flow, you’ll need to recreate it. You can use the original flow logic as a reference, or try to recreate it from memory.

To recreate the Flow, you can follow these steps: first, navigate to the Flow editor and click the “New Flow” button. Then, choose the type of Flow you want to create and start building it.

example.flow

// Example Flow code
// Create a new Flow
Flow myFlow = new Flow();
// Add a trigger to the Flow
myFlow.addTrigger(TriggerType.Manual);
// Add an action to the Flow
myFlow.addAction(ActionType.CreateRecord);

Best Practices

To avoid this issue in the future, it’s a good idea to regularly back up your metadata, including your Flows. You can use a third-party tool or a manual process to export your metadata and store it in a safe place.

Checklist for Preventing Deleted Flows

  • Regularly back up your metadata, including Flows
  • Use a version control system to track changes to your Flows
  • Test your Flows regularly to ensure they are working correctly
  • Use a sandbox environment to test and develop new Flows
  • Document your Flow logic and configuration

What is the best way to back up my Flows?

The best way to back up your Flows is to use a third-party tool or a manual process to export your metadata and store it in a safe place.

Can I recover a deleted Flow from the Recycle Bin?

No, Flows are metadata and are not stored in the Recycle Bin. You will need to use a backup or another environment to recover a deleted Flow.

How often should I back up my metadata?

It’s a good idea to regularly back up your metadata, including your Flows, to ensure that you can recover them in case of an issue.

What is the best way to document my Flow logic and configuration?

The best way to document your Flow logic and configuration is to use a clear and concise format, such as a diagram or a written description, and to store it in a safe place.

Genetrix Technology · Salesforce Marketing Cloud Partner

Need help shipping this in production?

Genetrix builds and untangles Salesforce Marketing Cloud and Agentforce setups for teams that want it done right the first time. If anything in this post sounds familiar, talk to us before it ships.

Get in Touch with Genetrix →

Blogs for the

Business-Savvy!​

Let’s Connect

A 30 min no cost strategy session
with cloud support expert

Let’s Connect

A 30 min no cost strategy session
with cloud support expert