Creating Flows by Mapping Tasks

This topic describes how you can map a task from your Bot to another task from your Bot, or a task from a different Bot to create a flow. One of the most unique features of the Kore messaging platform is the ability to link a task in response to a notification message from another task.

Tasks and Bots

The task that you map to a task can be from any Bot. For example, if you define an alert task to provide notification from Zendesk whenever a new customer ticket is created, you can map related tasks for Zendesk, such as Add a Comment, Assign a Ticket, and so forth, to the alert task. In addition, you could also map tasks from other Bots for the same Zendesk alert task to, for example, Create a Jira Issue in the Bot for JIRA, or Send Tweet in the Bot for Twitter.

When one task is mapped to another task, it is called a flow and is displayed in Bot Builder in the Flows section as shown in the following illustration.

In the preceding illustration, the Bot has a flow with one task mapped to another task for the same Bot.

When a Bot message is sent to an end-user, the end-user can click the task icon located to the right of the message to display the tasks mapped to the alert task as a flow as shown in the following example for CNN mapped tasks. The user can use the Twitter Tweet task to tweet the alert message, or post to their Linked In account using the Share Post task. 

For the CNN alert task shown in the previous illustration, there are two mapped tasks available. To view the mapped tasks, the end-user clicks the Task icon to open the Task dialog, selects a task, and then defines the parameters for the task.

You can use parameters from the payload of the first task, to pre-populate fields in the mapped task. For example, in a Twitter alert task payload response, the New Follower Name can be pre-populated in the Salesforce Create Contact  task.

Creating a New Flow

To create a new flow, you must already have defined a Bot, with at least one task to map to another task. For more information, see About Alert Tasks and About Action Tasks.

To begin creating a flow, in Bot Builder in the YOUR BOTS section, click an existing Bot and then click the Create Flow  icon as shown in the following illustration. 

When you click the Create Flow  icon, the Task Mapping page for the selected Bot is displayed as shown in the following illustration.

In the When this Task is triggered column on the left, click Click to select a Task to display the tasks available, as shown in the following illustration for the Kore Pinterest Bot.

Select a task, for example, New Home Decoration Tips, to display a list of available data fields from the task that you can use to map to a task Field.

Then, in the Take this Task column, click Click to select a Bot and choose a Bot for the task that you will map to, for example, My Pinterest.

For the My Pinterest Bot, click Click to select a Task to display the action tasks available for the Kore Pinterest Bot. For this example, select My Task for Pinterest.

When you get a Pinterest message notification, you can populate the Name field of the My Task for Pinterest task using the tickets[0].id of the alert task payload using drag-and-drop as shown in the following illustration.

After you map a parameter from one task to the next task, select one of the following options shown in the previous illustration for each Field displayed:

  • Editable - The mapped value is displayed and editable by the end-user.
  • Hidden - The Field is not displayed to the end-user. For example, you may need to pass a User ID to the Bot, but only display the User Name drop-down to the end-user.
  • Read Only - The Field and mapped valued is displayed, but not editable by the end-user. For example, for the Assign Task task for Asana, you need the Task Id and Workspace, which can be mapped from the Asana Task Updates alert task, but are read-only because the end-user only needs to select which user to assign the  task to.

Click Next Step to display the Mapping Name section. 

Enter the name of the mapping used in Bot Builder to identify this mapping for the flow.

Optionally, select Mark this Task as Suggested Task to show the task on the Suggested Tasks tab for the alert task.

If all mandatory fields for the task are defined, you can also optionally select Allow flow automation. When selected, the end-user can enable this task to run automatically. For example, when an alert message for Crashlytics indicates a server is down, using the predefined mapped fields, a JIRA ticket can be automatically created without end-user input.

The following illustration is an example of the mapping options for a flow.

 

Click Save & Exit to save the flow and close the Task Mapping page.

Next Steps

The flow is immediately available for any users that add the task to their account when the flow is saved.  

Comments