How to: Create a workflow that sends a card to guest when the session is resolved
This article will take you through the setup steps for creating a new workflow with the purpose of sending an adaptive card to the guest user after an agent marks the session as resolved.
Create A Workflow
- Navigate to the Chime Advanced > Workflows page on the Admin menu.
- Select the Create Workflow Button in the top right.
- Name the Workflow and select save.
Add Session Metadata Updated Event
- From the Workflow editor page select the Add Event button.
- From the available events displayed in the pop up window either scroll to or search for Session Metadata Updated.
- Select the Add button for the event.
- Name the Event and select save.
- Uncheck the 'Execute on every metadata change' toggle
- Under the 'Selected Metadata Keys' field insert: Session.Status.IsResolved
Add If/Else Task
- From the Workflow editor page select the Add Task button.
- From the available tasks displayed in the pop up window either scroll to or search for If/Else.
- Select the Add button for the event.
- Name the task and input the condition expression and select save.
Condition Expression: input("ChangedMetadata").find((element) => element.Key == "Session.Status.IsResolved").Value == "True"
Add Send Adaptive Card Task
- From the Workflow editor page select the Add Task button.
- From the available tasks displayed in the pop up window either scroll to or search for Send AdaptiveCard.
- Select the Add button for the event.
- Name the task and input the Adaptive Card json and select save.
Adapitve Card Json:
{
"type": "AdaptiveCard",
"version": "1.3",
"$schema": "https://adaptivecards.io/chemas/adaptive-card.json",
"body": [
{
"type": "TextBlock",
"text": "Your issue is resolved: ${Session.Status.IsResolved}",
"wrap": true
}
]
}
Connect the Event and Task Modules
- From within the Workflow editor select the blue dot on the event onto the if/else task. This will connect the two modules together and after the event has completed It will move onto the if/else task.
- Next select one of the green dots on the if/else task and drag it to the send adaptive card task. Make sure that you have connected the dot labeled 'True' as this reflects that path if the condition expression is true.
Enable/Startup the Event and Task Modules
- Select each of the modules and select the power icon to startup the event or task
- After the modules are all enabled and display as green select the save button at the bottom of the screen to save the workflow
Chat Experience
- Start Up a chat session and connect with an Agent
- Mark the session as resolved within the Agent UI
- View the card sent to the guest user
Related Content
- A Guide to Setting up Automated Adaptive Card Notifications for Resolved Sessions in Chime - Chime V5 Site Blog Post
- How to: Send custom HTML emails using the send email pipeline item or send email workflow task - FAQ Article
- How to: Use workflows to send emails when content is created, deleted, published, updated etc… - FAQ Article
Adaptive Cards,
workflow,
Metadata
bmorris