This lesson will cover the following topics:

02 | Setup
07 | Preview

01 Getting Started

This tutorial covers how to delete files from Salesforce.

02 Setup

The following elements were inserted into the project: 


  • A Lookup element is configured to bring in Contacts from Salesforce.
  • A button. This button will be used to delete files from Salesforce.

Project setup screen

03 Setting Up Variables

1. Navigate to the Project Settings and select the Tools tab.

2. Click the Custom Variables gear icon.

Project settings tool tab

3. Create a new static variable labeled - cont-doc-id. Click Apply.

Custom variables static variable

04 Salesforce Get Record Action

1. Navigate to the Project Settings menu and select the Salesforce tab.

Salesforce tab in Project Settings

2. Click Create New under the Get Records tab.

Create new Salesforce get

3. In the Object Settings tab, configure: Contact as the Salesforce Object, User Action as the Trigger, add a description, and set the Multiple Matches to First Record.

Map Salesforce fields object settings tab

4. In the Conditions tab, configure: Contact ID equals the Lookup Value. Click Apply.

Map Salesforce fields conditions tab

5. Select the Get Record ellipsis menu and click + Add Child from the submenu.

Add child push

6. In the Object Settings tab, configure: Content Version as the Salesforce Object, add a description, and set the Multiple Matches to Up to 100.

Map Salesforce fields object settings tab

7. In the Conditions tab, configure: First Publish Location ID equals the Contact ID. This condition will already be configured as this is a child get.

Map Salesforce fields conditions tab

8. In the Mapping tab, configure: Global Variable/ cont-doc-id - ContentDocumentID. Click Apply.

Map Salesforce fields mapping tab

05 Salesforce Delete Action

1. Navigate to the Salesforce Integration window, and under the Push tab click Create New.

Create New push

2. In the Object Settings tab, configure: Content Document as the Salesforce Object, Delete as the Action, add a description, and set the Multiple Matches to All.

Map Salesforce fields object settings tab

3. In the Conditions tab, configure: ContentDocument ID IN con-doc-id global variable. Click Apply.

Map salesforce fields conditions tab

06 Invoking the Action

1. Select the button and click the Interactivity icon in the menu.

Button menu with interactivity icon highlighted

2. Select the Start + icon, choose Condition as the node, and click Next.

On Click Action window showing condition node selected

3. Configure Rule 1 that the Lookup value must not be empty. Click Next.

Rule 1 condition configuration

4. Enter a Tag and click Insert.

5. Click the Then + icon, choose Salesforce Action as the node, and click Next.

On click action with Salesforce Action as the node

6. Use the dropdown to select the Contact Get and the Files Delete actions.

7. Expand the Integration Options menu and enable Custom Order of Execution.

8. Label the Get action as 1 and the Delete Push action as 2.

Integration Action selected

9. Enter a Tag and click Insert.

The node should display as follows:

Configured nodes

07 Preview

Using the Lookup element, you can find a contact in Salesforce. Once the contact has been found, clicking the button will delete all files associated with that Contact.

Preview of project for deleting files in Salesforce

08 Got Feedback?

Additional Resources