This workbook is designed to accompany section 108 - Conditionals.


Pre-Requisites

For this workbook, you should have your own environment with login credentials.

If you are using a Production environment, please take care with any existing processes.

You may also elect to use 30-day free Trial Org by visiting: https://azuqua.com/sign-up

Because this is an Integration product, we will encourage you to use freely-available applications within this material. Tools such as Twitter, Slack, and others are great products and typically allow you to sign-up for free!


Exercise 108-1 - If/Else

Say that your Sales Team tracks deals for new and existing customers in Salesforce. The Project Management team manages their work in Workfront.

There are also different actions which need to happen if the new opportunity is for a new customer vs an existing customer.

  • If it’s a new customer
    • We need to create a new project in Workfront
    • Create the onboarding and training task on that project
  • If it’s an existing customer
    • a Workfront project already exists, so we need to find it by searching for it
    • Then create the task that the customer will need follow up training on the new product they purchased.

NOTE: For this example we will focus on just the If/Else logic and skip connections

  • Create a new FLO (+New FLO)
    • Use a Child FLO for this
  • Add a Control >> Assign Card
    • Change the name of the variable to “Type” (which is a String)
    • Type “New Customer” into that field
  • Add a new Control >> If/Else card
    • For Options set the left-operand to “Type” by dragging the Type Output from the Assign Card
    • Set the operator to “equal to”
    • Set the right-operand to “New Customer”
  • Within the True (Yellow) section
    • Add a String Compose
    • Type “This is a new customer”
  • Within the False (Blue) section
    • Add another String Compose
  • Test the FLOs

This simply shows - without using the connectors - how FLO logic works. If you have completed this correctly, the “true” path for the If/Else will execute and give you the “This is a new customer” message!

Exercise 108-2 - If/Elseif

For this example, let’s again - without using connectors - emulate the logic required for the following:

  • When the Sales team moves an opportunity to Closed Won
    • a new task is created in Workfront so the PM team can begin their work
  • If “Closed Lost”
    • Send an email is sent to the Sales Director
  • If set to “Contract Negotiation/Review”
    • Send a Slack message is sent to the PM team’s Slack channel so they are aware that this Project is coming down the pipeline

For this we have three conditions - so If/Else/If is what we’ll need to use.

  • Create a new FLO (+New FLO)
    • Use a Child FLO for this
  • Add a Control >> Assign Card
    • Change the name of the variable to “Stage Name” (which is a String)
  • Add a new Control >> If/Elseif card
  • The If/Elseif card will expand to meet all our conditions
    • For the first If section
    • left-operand => Drag “Stage Name” into the field
    • right-operand = “Closed Won”
    • Click “Done”For the first if
    • Click “+” and add an “Else If”
    • left-operand => Drag “Stage Name” into the field
    • right-operand = “Closed Lost”
    • Click “Done”
    • Click “+” and add a second “Else If”
    • left-operand => Drag “Stage Name” into the field
    • right-operand = “Contract Negotiation/Review”
    • Click “Done”

Now Edit the Conditions:

  • Observe the “Edit Conditions” dropdown on the top of the If/Elseif card
  • Select “If Stage Name == “Closed Won”
    • This will change the screen to allow you to place steps within the If/Elseif card
    • Add a “Compose” card and type “Account is Closed Won! Start a new project”
  • Select “If Stage Name == “Closed Lost”
    • Add a “Compose” card and type “Deal lost - Send an email is sent to the Sales Director”
  • Select “If Stage Name == “Contract Negotiation/Review”
    • Add a “Compose” card and type “Send Slack Message to PM Team - Project Coming Soon!”

Save and test the FLO. Try testing each option by setting the Stage Name in the Assign card!

Exercise 108-3 - Continue If

The Continue If card - simply put - halts a FLO based on a single condition.

For the example in 108-2, do the following:

  • After the “Assign” card, add a “Continue If”
  • Drag the Stage Name to the left operand
  • Set the right-operand field to the same as the Stage Name (set in the Assign card)
  • Run the FLO - if you have a match, it should halt execution

Try experimenting with placing the Continue If.