Dynamic Label for Flow Interviews
Overview: This hidden gem is from the Spring ’15 Release.
Have you ever felt like banging your head against the wall when testing Salesforce Visual Workflows that pause? Then this goes out to you.
Without Dynamic Labels, you ONLY get visibility into what the name/version of the flow is and when it paused. Dynamic Labels let you pass along additional values (like record name, ID, or when it’s supposed to unpause) into the Interview Label that you define within your Flow as a Text Template. Out of great need I created it. Below I will outline how to set this up for yourself.
How to set Dynamic Label up in your Salesforce Visual Workflow
It wasn’t immediately clear from the release notes on this, so I detailed out below and gave an example you could use to set this up.
STEP 1: Create a Formula Field to capture the Wait time for your element.
This could be very different depending on what your wait time is based upon. In my case, I have an offset of 2 hours which translates to adding the value of 2/24 to the current date/time.
STEP 2: Create a Text Template with the elements you want to see in the Interview Label
Here we’ll display the Name of the Flow, the Opportunity ID, and the time to be updated.
STEP 3: Update the Interview Label to reference your text template, not the default value
STEP 4: Eureka! A Shiny new Interview Label for our Paused Salesforce Visual Workflow
Now I know what Opportunity ID initiated the Waiting and what time it’s expected to resume actions. I’m longer in the dark; no longer banging my head against the wall!