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.

The hidden message is not visible on the page and matches the user's first message. The hidden message is sent only once in the 'Where is my technician' session and it doesn’t matter whether the message is changed during the session or to which page ( Scheduled, Days before, On the way, Arrived or Feedback) it is sent. The message can be sent twice in the Feedback flow page. Refresh the browser page or open the 'Where is my technician' link on a new page to interrupt a session. If it is true, and the user opens the chat with the same 'Where is my technician' link, and a hidden message is sent again. You can configure the ODA skill with intents that can understand the message (that is, Hi) and perform actions.
  1. Add intent to your skill.

  2. Add some utterances and 'Hi' among them to the intent so that the 'Hi' message is understood.

  3. 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"
  4. Train your skill.

How to identify the hidden message sent by WMT

Since WMT sends different parameters used for Skill configuration in ODA (which is described in the Add the Channel URI and ID on the Where is My Technician Theme topic), you must add a condition based on the 'activityId' value to the Dialog flow before OBotML part known as 'states' to identify the source of the hidden message (in our case, 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).

Example of chat initiation skill
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]}?"