Transfer of Conversation from ODA to Helpdesk Operator

When ODA is not trained to answer any specific quires, the conversation can be transferred to a human helpdesk operator. This will be shared as a new chat in that helpdesk. When a helpdesk operator accepts this chat ODA will leave the conversation, the operator can view previous chat messages between field tech and ODA to get the context of the conversation and can continue the conversation.

While defining the skill, you should make sure that the logic of transfer is implemented in the skill-based on the business requirement.

Transfer chat sample custom component:

TransferChat:
  component: "OFS.Collaboration"
  properties:
      action: "helpDeskTransfer"

Field Collaboration expects a payload in below format in case of the transfer request from a custom component

Sample Payload for Transfer chat to helpdesk

{ "messagePayload": { "payload": { "action": "helpDeskTransfer" }, "type": "raw" }, "userId": "ad3jgo7s79dddgadffdasf9"}

Sample Custom Component for attachment and transfer of conversation

Sample Custom Component

'use strict';
const { MessageModel } = require('@oracle/bots-node-sdk/lib');
module.exports = {
 metadata: () => ({
 name: "OFS.Collaboration",
 properties: {
 action: { required: true, type: 'string' },
 metaData: { required: false, type: 'object' }
 },
 supportedActions: []
 }),
 invoke: (conversation, done) => {
 conversation.logger().debug("OFS.Collaboration component invoked");
 conversation.logger().debug(this.conversation.properties());
 const message = MessageModel.rawConversationMessage(this.conversation.properties());
 conversation.reply(message);
 done();
 conversation.logger().debug("OFS.Collaboration action finished");
 }
}