Between the Curly Brackets is where we'll live in this module!
We'll connect the data produced from other activities and steps in your workflow together! Data exports are the "glue" that ties workflow actions & activities together. In this module, we break down the basics of recalling and usingattached the information and provide some basic tips to help you learn!
To help with today's lesson, please download the attach PopFlow as a reference! It will help you and show you how we accomplished everything in the lesson!
PopFlow has references to different types of data:
InteractionData: The variables that came with the interaction
TempData: Variables created during the Popflow Runtime.
Harmony: The variables inside of harmony (note: these are a filtered data set)
CRM Context: The variables exposed by the crm.
We'll be using a lot of examples to pass data!
{Property_Name}
Each data reference can pass information to/from activities and other PopFlows.
These interpolations are wrapped in {}, such as {var.value}.
The interpolation syntax is powerful and allows you to reference variables, attributes of resources, properties, and more in PopFlow.
Let's break down our example by the “Pins” listed in the PopFlow template associated to our module.
Allow you to organize the PopFlow into easier-to-manage and navigate sections.
Creating Pins is simple; you right-click on the activity you wish to Pin and select Pin.
The following steps are based on the “Pins/Tabs” associated with our PopFlow Example. Expand each section to go deep into the details.
In the first step, “Initial Activity”, we provide a note using a “Javascript” activity to call out what we are attempting to accomplish within the “Tab” in view. We'll do this for each of the Pins/Tabs to show you how you can add some basic notes using nothing more than a Javascript Comment! It's super helpful for anything you want to note!
Set Value Activity
We set the message body as well as the message title above.
The fun part, you can edit and test as you would like. If you ever run into an issue where things are broken or not working. Re-Download the PopFlow, Re-Import, And Test!
Let's get super basic! We'll create two items and set information into
them.
We are going to use the data set in the Set Value activity above to display information in a Dynamic UI.
In all of these examples, feel free to make changes on your own and re-test.
With the information set above, let's display those values in a Dynamic UI:
The Dynamic UI provides the end user with two options:
The content of the message body shows the first example of returning data values back into activity. Example: {item.1} & {item.2}
As we progress in Step 3, we'll show how to use more logical values often displayed in production scenarios.
Keep an eye on the “Property” values' name as the information is used to return data!
2. Once the information is setup, we'll pass the data into a ScreenPop to show how to display
the values set.
Note we provide “Continue” and “Stop” options:
3. These values are logged to the browser's console using a logging step.
4. We'll alert the user about the information below using a “Run Javascript” activity.
The next logic of our PopFlow will be to show you how this is done with random information coming inbound to PopFlow.
In the examples above, we've statically set information into properties that are passed back into the PopFlow. In Step 4, we'll use an example of assigning random/dynamic information returned from a data source. The example here is a very common use case where data is pulled from a source, assigned into values, and then displayed to users.
To use the example, you must configure an App Connector with the following information:
App Connector Settings:
HTTPS Activity Settings:
The information returned will be saved into a variable named: inboundUserData
2. Display all the information returned from the Random User API request.
To simplify life, we've already created a dynamic UI displaying all the data results returned from our Random User API.
3. Pass the information into a User Card using a Dynamic UI.
Example of data returned into Dynamic UI
With the key values selected in our example, we show another screen pop with some of the user's information.
The Dynamic UI is in HTML and we are using the data from our API request to populate its details. You do not need to modify or touch any of the code listed in this activity step. However, if you wish to test/play around, go for it!
Note we provide “Continue” and “Stop” options:
Awesome, we've done a few neat tricks to display data from one activity into another!
Let's re-set values from the Random User API data source (inboundUserData) into our original customer information from Step 3. Before we do that, we should save the older information into a new set of variables! It's a good tip to always save information for use at another time in the “interactions” life.
2. Re-Assign the Customer Information using the "Set Value" activity. Customer Name, City, and Phone are now assigned to the information returned via the Random User API call. Note the value names are directly from the information pulled.
Note: HTML is used in the Dynamic UI & does not need to be touched or modified.
3. Pass the information into a ScreenPop to show how to display the values set. An important note, we are displaying BOTH current and past values we have assigned before this activity.
Creating a contact within the CRM is our last step. We'll use the data returned to pass information directly into the CRM and create a new contact!
The Create Contact Activity allows us to create a new contact and pass data into contact fields.
With the data returned in our test/example, we can associate the required information to save into a new contact.
Once we save the information, we can also automate what occurs next:
Examples of Events that can be set.