Understand the steps to ask a user and set personal information in Conversation Management so that an agent can access and reach a user when is active on chat.
Use case
When a user sends a message to Conversation Management via a web widget or any multichannel platform, a dummy name is stored in the chat window for an agent with no information as shown here:
In such a case, an agent then needs to ask for the user's information and add then to the chat manually. With Quickwork and Set user details action, you can set these details automatically. A user just needs to answer a few automated questions and the work is done.
What you'll need:
Skill level: Intermediate
Time required: 15 minutes
- A web widget inbox in Conversation Management
- Trigger:
- New text message - Conversation Management
- Actions:
- Ask question - Conversation Management by Quickwork
- Set user details - Conversation Management by Quickwork
- Send text message - Conversation Management by Quickwork
- Business logic:
- If Condition
Prerequisite
Before proceeding with journey configuration, let's create a web widget inbox in Conversation Management named Set user details via a widget. Set an introduction heading and body text for the widget for a better approach to a user:
Click here to know how to create a web widget and open it in a web browser.
Note: Ensure you create a website widget and not a multichannel widget.
Configuring the trigger
- In the Event section, search the Conversation Management by Quickwork app from the drop-down menu in the Apps field present right below the New Trigger button.
- Select the trigger event New text message from the drop-down menu in the Triggers field.
- Click the Link account button to connect Set user details via a widget with Quickwork.
- Connect to Conversation Management by Quickwork window will pop up. Enter the API key and Inbox ID of the web widget. Click here to know how to get the API key and Inbox ID:
- Click the Link account button to make a successful connection.
- Next, specify a sample name in the Event input field. As soon as you complete specifying all the input, Quickwork returns a webhook URL:
- Copy this URL and go to the Webhook tab of the inbox whose API key and Inbox ID we connected i.e. Set user details via a widget inbox. Paste the URL in the Webhook field:
- Click the Save Changes button.
- The New text message trigger is now successfully configured and is now ready to listen to an incoming message.
Configuring the Ask question action
Before asking for the personal details of a user, let us make aware a user for what this widget does and get consent to provide personal information. To do so, follow these steps:
- In the Steps section, click on the Simple Action button and choose the Conversation Management by Quickwork app from the drop-down menu in the Apps field.
- Select the Action as Ask question from the drop-down menu.
- The connection gets established automatically as we connected previously for the trigger.
- In the question field, specify a question you want to ask. E.g., You are here to update your personal information so that our agent can reach you when you are inactive. Tap "OK" to continue.
- Select Answer type as Quick Replies.
- In the Conversation Id field, drag and drop the Conversation Id data pill from the
Conversation Management by Quickwork | New text message Trigger under Data Tree Output: - In the Retry help field, specify a suggestion in case an invalid input is provided. E.g., Please enter a valid option!
- Scroll down to the Elements object. Select Postback in the Type field. Specify OK in the Title field:
Configuring the If Condition
This IF Condition validates for the user's consent. If the OK button is tapped, then the series of questions will appear to capture the user's personal information.
- Click the + icon, click on Business Logic, and choose the If Condition.
- In the Left Value field, drag and drop the Quick Reply Title data pill from the
Conversation Management by Quickwork | Ask question Step 1 under Data Tree Output. - Select Equals in the Condition field.
- Enter OK in the Right Value field:
Configuring a series of Ask question actions under If Condition
Now let us configure a series of Ask question actions that can ask a user to enter first name, last name, country, email address, and phone number.
Ask the first name of a user
- Click the indented action bar of the If Condition. Select Conversation Management by Quickwork in the App drop-down menu.
- Select Ask question from the Action drop-down menu.
- Enter the question or a text in the Question field. E.g., What is your first name?
- Select Text in the Answer type field.
- In the Conversation ID field, drag and drop the Conversation Id data pill from the
Conversation Management by Quickwork | New text message Trigger under Data Tree Output. - Specify a help text in the Retry help field. E.g., Please enter a valid first name!
- Skip the rest of the input fields.
- Now clone this step to configure other actions down the line. Refer to the following table:
Step 4: Ask the last name of a user | |
Input field | Value |
Question | What is your last name? |
Answer type | Text |
Conversation ID | Conversation ID data pill from trigger output |
Retry help | Please enter a valid last name! |
Step 5: Ask the country name of a user | |
Input field | Value |
Question | Which country do you belong to? |
Answer type | Text |
Conversation ID | Conversation ID data pill from trigger output |
Retry help | Please enter a valid country name! |
Step 6: Ask for an email address of a user | |
Input field | Value |
Question | May I know your email address, please? |
Answer type | |
Conversation ID | Conversation ID data pill from trigger output |
Retry help | Please enter a valid email address! |
Step 7: Ask for a phone number of a user | |
Input field | Value |
Question | What is your contact number? |
Answer type | Number |
Conversation ID | Conversation ID data pill from trigger output |
Retry help | Please enter a valid and active contact number! |
Configuring the Set user details action
Now let us pass the appropriate data pills in the input fields of this action to store the user information automatically. Ensure you use the data pills of appropriate Steps.
- Select the Action as Set user details from the drop-down menu.
- In the Conversation Id field, drag and drop the Conversation Id data pill from the
Conversation Management by Quickwork | New text message Trigger under Data Tree Output: - In the Name field, drag and drop the Answer data pill from Step 3 and Step 4 under Data Tree Output.
- In the Email address field, drag and drop the Answer data pill from Step 6 under Data Tree Output.
- In the Phone number field, drag and drop the Answer data pill from Step 7 under Data Tree Output.
Configuring the Send text message action
The purpose of the action is to acknowledge to a user that the information has been stored successfully:
- Select Send text message from the Action drop-down menu.
- Enter a text in the Message field. E.g., Your personal information has been updated successfully.
- In the Conversation ID field, drag and drop the Conversation Id data pill from the
Conversation Management by Quickwork | New text message Trigger under Data Tree Output: - The journey configuration is completed and the below image represents the complete flow of a journey:
Executing the journey
Now, open Set user details via a widget in a web browser and send Hi. Refer to the following GIF and understand the journey execution:
Now go to your Conversation Management account and check this conversation. You will see that the details entered by a user have been updated in the Personal Information section:
Comments
0 comments
Please sign in to leave a comment.