Conversation Between Mobile Worker and ODA

Mobile Worker can search for a helpdesk (Enabled with ODA) in field collaboration and can initiate a conversation with that helpdesk, on receiving a new chat message ODA can proactively address the question and keep the mobile worker engaged by initiating interaction based on the skills defined in the ODA. Skills are treated as individual chatbots in ODA and each chatbot is designed to interact with users and fulfill the specific type of task such as rescheduling a job for field tech or sharing service history of the job. For more details about skills, see Using Oracle Digital Assistant documentation.

For this, you must follow these steps:
  • Request payload from field collaboration
  • Sharing of inventory, activity or resource details as an attachment

Request Payload from Field Collaboration

This is a sample payload from OFS to ODA skill.

While developing skills at ODA side, you can expect a similar request format from field collaboration.

Payload Schema:

{
  "userId": (String | mandatory | unique conversation id to maintain the session),
  "messagePayload": {
      "type": (String | mandatory | type of message from ODA),
      "text": (String | mandatory | response message from ODA)
  },
  "userLoginName": (String | mandatory | unique user login identifier)
}

The above code includes:

  • userLoginName will share the current chat user, which can be used to query OFS REST APIs from the custom component level.
  • User information: OFS Collaboration payload sends only the user login name to ODA. Customer can make use of OFS REST endpoints /rest/ofscCore/v1/users/{login} to get the resource ID and more information about the resource.
  • Custom Component: Field Collaboration expects these components in the response from skill/DA:
  • System.Output
  • System.Text

    Field collaboration will not process responses from components other than these custom components. You must use them while developing skills for connecting with field collaboration.

  • Helpcard: Collaboration will not process DA-level help card, hence, you must use custom skills to manage use cases with help cards.

Sharing of Inventory, Activity or Resource Details as an Attachment

You can develop skills to share activity/inventory/resource information as an attachment in collaboration.

Sending attachment from the skill. You can send attachments by using custom components within the skill. Here is a Sample custom component invocation:

Sample Custom Component for Inventor, activity or Image:
ShowMyActivity:
  component: "OFS.Collaboration"
  properties:
      action: "share"
      metaData:
          type: "activity"
          id: "4545454"
          desc: "Upgrade"

Field Collaboration expects a payload in the below format for attachments (Inventory / Activity/ User). This table displays the properties of the payload:

Properties

Key Value Description Required
Action Share

tell what kind of action should be done at collaboration.

supported values: share, helpDeskTransfer

Mandatory
metaData Object only required for share action Optional
This table displays the metadata of the payload:

metaData

metaData

Key Value Description Required
type Activity type of attachments supported values: activity, inventory, resource Mandatory
id ID of the activity, resource OR inventory unique ID of the respective entity Mandatory
desc description or note description or note Mandatory
Field Collaboration expects a payload in below format for attachments (Inventory / Activity/ User)

Payload for Inventory , activity or resource share:

{"messagePayload":{"payload": {                   "action": "share",     "metaData": {
         "type": "activity"                             "id": 4545454,                             "desc": "Upgrade",                         }                   },                     "type": "raw"                     },                     "userId": "ad3jgo7s79dddgadffdasf9"