01 Getting Started

This tutorial covers optimization. This tutorial covers two optimizing areas:
  • Retrieving data from Salesforce.
  • Conditions set on projects.

02 Integrations that Occur during Onload

A power table and two charts were inserted into the project to demonstrate the loading
Data is pulled from Salesforce to populate the table and charts when previewing the project.
screenshot showing how data is displayed in preview mode
When viewing the Network Console, there were three Salesforce mapping entries. One for each of the elements on the screen.
salesforce gets in the network view

03 View the Gets

1. Click on the Project Settings gear icon and Click the Salesforce. The Salesforce Integration screen opens.
project settings > salesforce tab
2. Click on the Records subtab to view the gets created.
salesforce get records window

04 Navigate to the Configure Actions Screen

1. Click the pages drop-down in the top menu ribbon.
2. Click the kebab menu next to the page you want to review. The sub-menu displays.
3. Click Configure Actions button. The Configure Actions Screen opens.
pages dropdown > page kebab menu > configure actions button on sub menu
4. Click on the Every Time tab to review the actions that run every time the page loads.
Screenshot of every time actions tab
Multiple gets running consecutively is not the best practice for your projects. This tutorial will cover how to configure the gets to run simultaneously.

05 Turn Off Actions

You do not need to delete your actions to disable them.
1. In the left-hand menu, click the power icon.
power icon
The action will now be greyed out and the green icon at the top turns red.
example of a disabled action

06 Combining Rules

Create a new rule to combine all the salesforce gets into one.
1. Click + New Rule.
plus new rule button
A new tab is automatically added.
new rule tab added
2. Click the start + icon. The Add Node Screen Opens.plus icon next to start
3. Select the Salesforce Action option and click Next.salesforce action node
4. Using the drop-down, select all 3 gets. This will combine the gets into one Salesforce Action.
5. Click the Integration Options dropdown and enable Parallel load to run the gets simultaneously. Combining the action will improve loading time even if you do not enable parallel load. Click Next.
adding all three gets into one action
6. Add a Tag for the Salesforce Action and click Insert.
The node is added to the screen.
7. Click Apply.
Added node to every time action screen
Save and Preview the project.
When viewing the network source, there is only one Salesforce mapping entry as they have been combined. This will reduce your page load time.
Combined salesforce mapping

07 Using Conditions to Improve Optimization

You can set conditions to execute actions if the condition criteria are met. Conditions can be put on different levels: project, page, strip, and elements. It is essential to ensure that the conditions are set at the correct level so no unnecessary actions are running when they are not required.

08 Project Level Conditions

Setting a condition at the project level will execute any time the user refreshes the page or navigates from one page to another.
The below example uses a global static variable and a Salesforce get. This is to demonstrate how a global condition affects the loading time.
1. Click on the project settings gear icon and select the tools tab.
2. Click the Custom Variables gear icon. The Custom Variables screen opens.
project settings > tools tab > custom variables
3. Click on the Static Variables tab and add a global variable. For example, a default value of True.
configure static variable
4. Select the Conditions Tab and click on the If Condition icon. The Edit Node screen opens.
if condition icon
5. Configure the condition that the Global Variable equals True. Click Next.
edit node screen
6. Add a tag and click Insert.
7. Click on the Then + icon. The Add Node screen opens.
then plus icon
8. Select the Salesforce Action option and click Next.
salesforce action node
9. Use the drop-down to select the process push or get. For example, the get that runs for the power table. Click Next.
integration action screen
10. Add a tag and click Insert.
The node is added to the Conditions window. This condition will run anytime the page loads.
11. Click Apply.
configured actions
Save and preview the project. Navigate to the second page of your project. When viewing the network source, the Salesforce Action ran on the second page, despite the fact that the power table is on the first page. This can waste resources and mean a longer page loading time.
page 2 loading
It is best practice only to use project-level conditions if you require an action to run every time a user reloads a page or navigates between pages. Note: This project-level condition was turned off before proceeding.

09 Page Level Conditions

Set conditions per page to ensure the action only runs if the user is currently on that page.
1. Click the pages drop-down in the top menu ribbon.
2. Click the kebab menu next to the page that requires the condition. The sub-menu displays.
3. Click Configure Actions button. The Configure Actions Screen opens.
pages drop-down > page kebab menu > sub menu
4. Click the Every Time tab and click + New Rule.
everytime action screen with plus new rule button
5. Click the Start + icon. The Add Node screen opens.
6. Select Condition and click Next.
condition node
7. Configure the condition that the Global Variable equals True. Click Next.
configure condition
8. Add a tag and click Insert. The node is added.
9. Click the Then + icon. The Add Node screen opens.
then plus icon
10. Select the Salesforce Action option and click Next.
salesforce action button
11. Use the drop-down to select the process push or get. For example, the get that runs for the power table. Click Next.
integration action screen
12. Add a tag and click Insert.
The node is added to the Conditions window. This condition will run on the home page only.
13. Click Apply.
configure actions screen with added nodes

10 The Takeaway

By ensuring your Salesforce Actions are combined, you can save loading time for your pages. When setting conditions it is vital they are set at the correct level. This ensures that actions are only run when they are required.

11 Got Feedback?

Additional Resources