Configure your Welcome Message
You can implement a welcome message in your ODA skill to avoid providing an empty chat window when the user clicks on the chat icon. Use a hidden message ‘Hi’ which is auto-generated by Where is My Technician and sent to ODA to imitate the first message by end-user.
-
Add some utterances and 'Hi' among them to the intent so that the 'Hi' message is understood.
-
Initiate your intent in Dialog flow and set an action.
metadata: Version: "1.0" main: true name: "YourName" context: variables: ... states: ... getIntent: component: "System.Intent" properties: variable: "iResult" transitions: actions: Greeting: "YourAction"
How to identify the hidden message sent by WMT
metadata:
Version: "1.0"
main: true
name: "YourName"
context:
variables:
...
checkActivityId:
component: "System.ConditionEquals"
properties:
variable: "profile.activityId"
value: "null"
transitions:
actions:
equal: "NonWhereIsMyTechnician"
notequal: "IntegrationWithWhereIsMyTechnician"
states:
...
IntegrationWithWhereIsMyTechnician:
component: "System.Output"
properties:
text: "Hi ${profile.customerName}! Your technician is ${profile.resourceName}"
keepTurn: true
transitions:
next: "done"
NonWhereIsMyTechnician:
component: "System.Output"
properties:
text: "Hello! I am not Where Is My Technician assistant."
keepTurn: true
transitions:
next: "done"
Chat Notifications to Users
The Where is My Technician page allows you to initiate a chat with end-users. A notification badge is shown on the chat icon to the end-users. You can develop ODA skill which can send messages to end-user to suggest any help with the order (additional order details, promo codes, etc.) or ask for the feedback (if a customer does not want to enable feedback for the Where is My Technician page and wants to implement their custom survey).
Response:
component: "System.Text"
properties:
prompt: "Hi, I'm your assistant. Do you need help with the appointment scheduled for ${activity.value.date.date?number_to_date?string[dateFormat]}?"