Overview

While adding a new bot the wizard will first ask what type of bot should be created. This particular step can't be changed at a later point in time without deleting and recreating the bot.

Agent Bots

This is the standard type for bots running on Third-Party Bots. The bot will be online and available for conversations routed to it directly or through the skills assigned to it.

In case of an agent bot there are two additional steps that must be configured.

Conversation Type

This step allows for the selection of the general conversation type the bot is listening on where Messaging should be the default choice. Dependent on the selection additional features can be configured.

Engagement Attributes

Third-Party bots allow the collection of engagement attributes (documentation) if this option is enabled. These attributes are collected only at the start of every conversation. These attributes are then passed alongside every message as contextual information. Third-Party bots leverage the LivePerson Visit Information API to collect these engagement attributes.

Further information on the Visit Information API can be found here. Additionally, the original LivePerson event from the chat or messaging API used to start the conversation and send messages is sent along with each request to allow further customization and information.

Example lpSdes object for Chat conversations

The authenticated SDEs for Chat conversations have the same format as described here.

const lpSdes = {
  unauthenticatedSdes: {
    customerInfo: {
      serverTimeStamp: 1571770965040,
      customerInfo: {
        customerStatus: "cancelled",
        customerType: "vip",
        balance: -400.99,
        currency: "USD",
        customerId: "138766AC",
        lastPaymentDate: {
          year: 2014,
          month: 10,
          day: 15,
        },
        registrationDate: {
          year: 2013,
          month: 5,
          day: 23,
        },
        loginStatus: null,
        companyBranch: null,
        socialId: "11256324780",
        imei: "3543546543545688",
        userName: "user000",
        companySize: 500,
        accountName: "bank corp",
        role: "broker",
        storeZipCode: "20505",
        storeNumber: "123865",
      },
      contexts: {
        page: {
          id: "561554049",
        },
      },
    },
    cartStatus: {
      serverTimeStamp: 1571770965040,
      total: 11.7,
      currency: "USD",
      contexts: {
        page: {
          id: "561554049",
        },
      },
      numItems: 6,
      products: [
        {
          product: {
            name: "prod1",
            category: "category",
            sku: "sku",
            price: 7.8,
          },
          quantity: 1,
        },
      ],
    },
    purchase: {
      serverTimeStamp: 1571770965040,
      total: 11.7,
      orderId: "DRV1534XC",
      currency: "USD",
      contexts: {
        page: {
          id: "561554049",
        },
      },
      cart: {
        serverTimeStamp: 0,
        total: null,
        currency: null,
        contexts: {},
        numItems: null,
        products: [
          {
            product: {
              name: "antivirus pro plan",
              category: "software",
              sku: "xyz001",
              price: 7.8,
            },
            quantity: 3,
          },
        ],
      },
    },
    viewedProduct: {
      serverTimeStamp: 1571770965040,
      currency: "USD",
      contexts: {
        page: {
          id: "561554049",
        },
      },
      products: [
        {
          product: {
            name: "red high heel shoe",
            category: "women shoes",
            sku: "xyz567",
            price: 77.8,
          },
        },
      ],
    },
    marketingCampaignInfo: {
      serverTimeStamp: 1571770965040,
      contexts: {
        page: {
          id: "561554049",
        },
      },
      marketingCampaignInfo: {
        originatingChannel: 1,
        affiliate: "Yahoo",
        campaignId: "US coupon campaign",
      },
    },
    personalInfo: {
      serverTimeStamp: 1571770965040,
      personalInfo: {
        name: "John",
        surname: "Doe",
        customerAge: {
          customerAgeInYears: 34,
          customerYearOfBirth: 1980,
          customerMonthOfBirth: 4,
          customerDateOfBirth: 15,
        },
        contacts: [
          {
            email: "myname@example.com",
            phone: "+1 212-788-8877",
            phoneType: null,
            address: null,
            preferredContactMethod: null,
          },
        ],
        gender: "MALE",
        company: "company",
        language: "en-US",
      },
      contexts: {
        page: {
          id: "561554049",
        },
      },
    },
    lead: {
      serverTimeStamp: 1571770965040,
      contexts: {
        page: {
          id: "561554049",
        },
      },
      lead: {
        topic: "luxury car test drive 2015",
        value: 22.22,
        ticketId: null,
        leadId: "xyz123",
        currency: "USD",
      },
    },
    serviceActivity: {
      serverTimeStamp: 1571770965040,
      serviceActivity: {
        topic: "order checkbook",
        status: 0,
        category: "finance",
        serviceId: "service12",
      },
      contexts: {
        page: {
          id: "561554049",
        },
      },
    },
    visitorError: {
      serverTimeStamp: 1571770965040,
      contexts: {
        page: {
          id: "561554049",
        },
      },
      visitorError: {
        contextId: null,
        message: "Expiration date missing",
        code: "er100004",
        level: null,
        resolved: null,
      },
    },
  },
  authenticatedSdes: {
    authenticatedParticipantInfo: {
      isUserAuthenticated: true,
      participantId: "55fc1779-83b0-4e8b-8eea-503a8eaf8822",
      balance: -400.99,
      registrationDate: {
        year: 2013,
        month: 5,
        day: 23,
      },
      lastPaymentDate: {
        year: 2014,
        month: 10,
        day: 15,
      },
      customerId: "57ac-072a-5d10-4506-721f-9ebf",
      customerStatus: "cancelled",
      customerType: "vip",
      socialId: "11256324780",
      imei: "3543546543545688",
      userName: "testuser",
      companySize: 500,
      accountName: "bank corp",
      role: "broker",
    },
    authenticatedPersonalInfo: {
      name: "Test",
      surname: "User",
      contacts: [
        {
          email: "testuser@liveperson.com",
          phone: "+1-10-344-3765333",
        },
      ],
    },
  },
};
Example lpSdes object for Messaging conversations
const lpSdes = {
  unauthenticatedSdes: {
    customerInfo: {
      serverTimeStamp: 1571770965040,
      customerInfo: {
        customerStatus: "cancelled",
        customerType: "vip",
        balance: -400.99,
        currency: "USD",
        customerId: "138766AC",
        lastPaymentDate: {
          year: 2014,
          month: 10,
          day: 15,
        },
        registrationDate: {
          year: 2013,
          month: 5,
          day: 23,
        },
        loginStatus: null,
        companyBranch: null,
        socialId: "11256324780",
        imei: "3543546543545688",
        userName: "user000",
        companySize: 500,
        accountName: "bank corp",
        role: "broker",
        storeZipCode: "20505",
        storeNumber: "123865",
      },
      contexts: {
        page: {
          id: "561554049",
        },
      },
    },
    cartStatus: {
      serverTimeStamp: 1571770965040,
      total: 11.7,
      currency: "USD",
      contexts: {
        page: {
          id: "561554049",
        },
      },
      numItems: 6,
      products: [
        {
          product: {
            name: "prod1",
            category: "category",
            sku: "sku",
            price: 7.8,
          },
          quantity: 1,
        },
      ],
    },
    purchase: {
      serverTimeStamp: 1571770965040,
      total: 11.7,
      orderId: "DRV1534XC",
      currency: "USD",
      contexts: {
        page: {
          id: "561554049",
        },
      },
      cart: {
        serverTimeStamp: 0,
        total: null,
        currency: null,
        contexts: {},
        numItems: null,
        products: [
          {
            product: {
              name: "antivirus pro plan",
              category: "software",
              sku: "xyz001",
              price: 7.8,
            },
            quantity: 3,
          },
        ],
      },
    },
    viewedProduct: {
      serverTimeStamp: 1571770965040,
      currency: "USD",
      contexts: {
        page: {
          id: "561554049",
        },
      },
      products: [
        {
          product: {
            name: "red high heel shoe",
            category: "women shoes",
            sku: "xyz567",
            price: 77.8,
          },
        },
      ],
    },
    marketingCampaignInfo: {
      serverTimeStamp: 1571770965040,
      contexts: {
        page: {
          id: "561554049",
        },
      },
      marketingCampaignInfo: {
        originatingChannel: 1,
        affiliate: "Yahoo",
        campaignId: "US coupon campaign",
      },
    },
    personalInfo: {
      serverTimeStamp: 1571770965040,
      personalInfo: {
        name: "John",
        surname: "Doe",
        customerAge: {
          customerAgeInYears: 34,
          customerYearOfBirth: 1980,
          customerMonthOfBirth: 4,
          customerDateOfBirth: 15,
        },
        contacts: [
          {
            email: "myname@example.com",
            phone: "+1 212-788-8877",
            phoneType: null,
            address: null,
            preferredContactMethod: null,
          },
        ],
        gender: "MALE",
        company: "company",
        language: "en-US",
      },
      contexts: {
        page: {
          id: "561554049",
        },
      },
    },
    lead: {
      serverTimeStamp: 1571770965040,
      contexts: {
        page: {
          id: "561554049",
        },
      },
      lead: {
        topic: "luxury car test drive 2015",
        value: 22.22,
        ticketId: null,
        leadId: "xyz123",
        currency: "USD",
      },
    },
    serviceActivity: {
      serverTimeStamp: 1571770965040,
      serviceActivity: {
        topic: "order checkbook",
        status: 0,
        category: "finance",
        serviceId: "service12",
      },
      contexts: {
        page: {
          id: "561554049",
        },
      },
    },
    visitorError: {
      serverTimeStamp: 1571770965040,
      contexts: {
        page: {
          id: "561554049",
        },
      },
      visitorError: {
        contextId: null,
        message: "Expiration date missing",
        code: "er100004",
        level: null,
        resolved: null,
      },
    },
  },
  authenticatedSdes: {
    customerInfo: {
      type: "ctmrinfo",
      acr: "loa1",
      iss: "https://customerWebSite.com",
      customerInfo: {
        customerStatus: "cancelled",
        customerType: "vip",
        balance: -400.99,
        currency: "USD",
        customerId: "138766AC",
        lastPaymentDate: {
          year: 2014,
          month: 10,
          day: 15,
        },
        registrationDate: {
          year: 2013,
          month: 5,
          day: 23,
        },
        loginStatus: null,
        companyBranch: null,
        socialId: "11256324780",
        imei: "3543546543545688",
        userName: "user000",
        companySize: 500,
        accountName: "bank corp",
        role: "broker",
        storeZipCode: "20505",
        storeNumber: "123865",
      },
      auth: {},
    },
    personalInfo: {
      type: "personal",
      acr: "loa1",
      iss: "https://customerWebSite.com",
      personalInfo: {
        name: "John",
        surname: "Doe",
        customerAge: {
          customerAgeInYears: 34,
          customerYearOfBirth: 1980,
          customerMonthOfBirth: 4,
          customerDateOfBirth: 15,
        },
        contacts: [
          {
            email: "myname@example.com",
            phone: "+1 212-788-8877",
            phoneType: null,
            address: null,
            preferredContactMethod: null,
          },
        ],
        gender: "MALE",
        company: "company",
        language: "en-US",
      },
      auth: {},
    },
  },
};
Example lpEvent object of Messaging API
const lpEvent = {
  sequence: 0,
  originatorClientProperties: {
    type: ".ClientProperties",
    appId: "webAsync",
    ipAddress: "192.168.226.81",
    deviceFamily: "DESKTOP",
    os: "OSX",
    osVersion: "10.14.6",
    integration: "WEB_SDK",
    integrationVersion: "3.0.29",
    browser: "CHROME",
    browserVersion: "72.0.3626.121",
    features: [
      "PHOTO_SHARING",
      "CO_BROWSE",
      "QUICK_REPLIES",
      "AUTO_MESSAGES",
      "MULTI_DIALOG",
      "FILE_SHARING",
      "RICH_CONTENT",
    ],
  },
  originatorId:
    "32f23bf295b1420b3a2f3f2f96c54bb2d8455699e5b6edc8add6c27b7b0b50fb",
  originatorMetadata: {
    id: "32f23bf295b1420b3a2f3f2f96c54bb2d8455699e5b6edc8add6c27b7b0b50fb",
    role: "CONSUMER",
    clientProperties: {
      type: ".ClientProperties",
      appId: "webAsync",
      ipAddress: "192.168.226.81",
      deviceFamily: "DESKTOP",
      os: "OSX",
      osVersion: "10.14.6",
      integration: "WEB_SDK",
      integrationVersion: "3.0.29",
      browser: "CHROME",
      browserVersion: "72.0.3626.121",
      features: [
        "PHOTO_SHARING",
        "CO_BROWSE",
        "QUICK_REPLIES",
        "AUTO_MESSAGES",
        "MULTI_DIALOG",
        "FILE_SHARING",
        "RICH_CONTENT",
      ],
    },
  },
  serverTimestamp: 1571816583661,
  event: {
    type: "ContentEvent",
    message: "hi",
    contentType: "text/plain",
  },
  dialogId: "93d1b226-da30-48ca-a04b-dbe071ebd23c",
  __isMe: false,
  conversationContext: {
    skillId: "3417641010",
    campaignId: 3417641610,
    engagementId: 3417642010,
    type: "MESSAGING",
    visitor: {
      sharkVisitorId: "Y4NWRmZTYwZmQ1MjM3YTA2",
      sharkSessionId: "FstLzrE6SvC5NrseUHi48g",
      ipAddress: "192.168.226.81",
      browser: "CHROME",
      os: "OSX",
      osVersion: "10.14.6",
      integration: "WEB_SDK",
      integrationVersion: "3.0.29",
      browserVersion: "72.0.3626.121",
      language: "en-US",
      features: [
        "PHOTO_SHARING",
        "CO_BROWSE",
        "QUICK_REPLIES",
        "AUTO_MESSAGES",
        "MULTI_DIALOG",
        "FILE_SHARING",
        "RICH_CONTENT",
      ],
      deviceFamily: "DESKTOP",
    },
  },
};
Example lpEvent object of the Chat API
const lpEvent = {
  "@id": "3",
  "@type": "line",
  time: "2019-10-23T03:46:00.062-04:00",
  textType: "plain",
  text: "You are now chatting with dialogflow_v2_chat.",
  by: "info",
  source: "system",
  systemMessageId: "3",
  subType: "REGULAR",
  sequenceId: "2",
  state: "chatting",
  chatSessionKey:
    "H4127499448709883677-2ea2cecce74a45218dc3e911d25361f2K8404910",
  skillName: "dialogflow_v2_chat",
  skillId: "3417640810",
  agentName: "dialogflow_v2_chat",
  agentId: "3417640910",
  startTime: "2019-10-23T03:45:58.344-04:00",
  duration: "0",
  lastUpdate: "2019-10-23T03:45:59.978-04:00",
  chatTimeout: "40",
  visitorId: "2611108340074",
  agentTyping: "not-typing",
  visitorTyping: "not-typing",
  visitorName: "visitor",
  rtSessionId: "4294983598",
  sharkVisitorId: "Y4NWRmZTYwZmQ1MjM3YTA2",
  sharkSessionId: "FstLzrE6SvC5NrseUHi48g",
  sharkContextId: "4",
  engagementId: "3417641910",
  campaignId: "3417641610",
  language: "en-US",
  participantId: "a2fe6e1e-ab38-47a6-b8b3-f38d573d3603",
  link: [
    {
      "@href":
        "https://XXXXX/api/account/le61911979/agentSession/593497449/chat/H4127499448709883677-2ea2cecce74a45218dc3e911d25361f2K8404910/info",
      "@rel": "self",
    },
    {
      "@href":
        "https://XXXXX/api/account/le61911979/agentSession/593497449/chat/H4127499448709883677-2ea2cecce74a45218dc3e911d25361f2K8404910/info/visitorName",
      "@rel": "visitor-name",
    },
    {
      "@href":
        "https://XXXXX/api/account/le61911979/agentSession/593497449/chat/H4127499448709883677-2ea2cecce74a45218dc3e911d25361f2K8404910/info/visitorTyping",
      "@rel": "visitor-typing",
    },
    {
      "@href":
        "https://XXXXX/api/account/le61911979/agentSession/593497449/chat/H4127499448709883677-2ea2cecce74a45218dc3e911d25361f2K8404910/info/agentTyping",
      "@rel": "agent-typing",
    },
    {
      "@href":
        "https://XXXXX/api/account/le61911979/agentSession/593497449/participantInfo/a2fe6e1e-ab38-47a6-b8b3-f38d573d3603",
      "@rel": "participant-info",
    },
    {
      "@href":
        "https://XXXXX/api/account/le61911979/agentSession/593497449/participantExtendedInfo/a2fe6e1e-ab38-47a6-b8b3-f38d573d3603",
      "@rel": "participant-extended-info",
    },
  ],
  isWelcomeEvent: true,
  conversationContext: {
    skillId: "3417640810",
    campaignId: "3417641610",
    engagementId: "3417641910",
    type: "CHAT",
    visitor: {
      sharkVisitorId: "Y4NWRmZTYwZmQ1MjM3YTA2",
      sharkSessionId: "FstLzrE6SvC5NrseUHi48g",
      ipAddress: null,
      browser: null,
      os: null,
      osVersion: null,
      integration: null,
      integrationVersion: null,
      browserVersion: null,
      language: "en-US",
      features: null,
      deviceFamily: null,
    },
  },
};
Chat

Setting name Description
Time until warning Set up the time span after which the consumer will get an inactivity warning.
Warning message The warning message the chat consumer gets if he reaches the threshold.
Time until conversation close Set up the time duration after which the consumer chat conversation will be closed if the customer is inactive
Close message The message which the consumer will receive prior to closing the conversation
Messaging

Combine Messages

By enabling the Combine Messages settings you can combine a certain amount of messages into one, before sending it to the bot. If this feature is enabled, the bot only responds to all of the messages once, instead of handling every message as a single intent. Below is a GIF that clarifies the difference between enabled and disabled Combined Messages Feature.

  • Max messages to combine: The maximum amount of messaged that will be connected to one message.
  • Time frame to combine: The time in seconds the system will wait for another message to add before sending it to the bot. If the user types something into that time frame the time will be replaced by the "Time frame after typing", see below.
  • Time frame after typing: The time in seconds the system will wait for another message to add, after the visitor typed something in the text box.
Left: Enabled Combined Messages, Right: Disabled Combined Messages


Welcome Message

By enabling the Welcome Messages option in our Wizard, Brands will receive a welcome message by the bot immediately after transfer. User will be greeted by the bot. With this feature. It means that the bot will be enabled to greet customers directly after the transfer action.

Send chat state events

This Feature requires UMS 4.9

Here it is possible to enable SIGNALED events from customer side to be forwarded to the bot. SIGNALED events are a custom solution that as of now need to be manually send by a channel e.g. via the lp-messaging-sdk. No other chat state events are supported at the moment. Please refer to the specific vendor page on how to process such events on bot side. A signal event can be created in the following way:

const request = {
  type: 'ms.PublishEvent',
  body: {
    dialogId: '<conversation id>',
    event: {
      type: 'ChatStateEvent',
      chatState: 'SIGNALED'
    }
  },
  metadata: [
    {
      type: 'Signal',
      payload: '{"key1" : "value1","key2" : "value2"}'
    }
  ]
};

Error Handling

Configure how the agent bot behaves in the event of an error.

Setting name Description
Transfer message to Customer Default escalation message to the consumer in case the bot encounters an error.
Transfer message to Agent Message to the Agent from the escalating bot which will be provided together with the conversation when it is transferred </li>.
Transfer failure message Message to the customer in case the escalation to the default escalation skill did not work.
Transfer to skill Default escalation skill the bot should escalate to in case of any error.
Enable error-hook LivePerson Function which gets triggered when a bot is having an issue .

If no other skills are configured, it might be that the bot will escalate the conversation to itself. In this case only new messages will be processed.

Survey Bots

This bot type will be listening to new post-conversation surveys (PCS) matching the defined filters and then send the consumer a series of questions on this survey dialog.

There are several prerequisites which must be fulfilled before the bot will start a survey.

  • The account must be configured to support post-conversation surveys
  • A profile based on the agent role must exist with the required permissions (View agents' conversations in group)
  • The conversation must apply to the filters defined in the bot configuration, namely the Application Installation that has triggered this survey and the conversation skill that was assigned to the conversation at this moment.

In case of a survey bot the following additional settings must be configured.

Survey Configuration

Item Description Example
Survey App ID ID of the Application Installation that triggers a PCS survey a22a6ba2-7a75-412b-b71a-03a8786fe407
Skills List of skills that have the Survey App ID assigned should be handled by this bot survey_test
Error Message Message that is shown to the consumer in case of an error before the survey is ended Unable to complete the survey due to an error. Goodbye

Currently the only supported vendor for Survey Bots is Medallia

Survey Bots are only supported for messaging

If an error occurs during a survey the bot will end the survey. Details about the error can then be found under conversation errors in the Bot Status Dashboard.