Supported activities and events

Activities

  1. GetAvailableOperators
  2. GetAvailableGroups
  3. Forward
  4. GetCallParams
  5. SetCallParams
  6. SendGuestOfflineEmail
  7. ChatbotOpenFileUploadPrompt
  8. GetGuestIdentity
  9. EnableGuestUpload
  10. DisableGuestUpload
  11. Text
  12. GetHeroCards
  13. SendHeroCard

Events

  1. GuestFileUpload
  2. Text

GetAvailableOperators

Acquires a list of registered operators. Returns only operators from the groups defined in routing, which meet the routing conditions.

Supported mluvii channels: chat, facebook, whatsapp

Request JSON:

{
    "Activity": "GetAvailableOperators"
}

Response:

{
    "Activity": "GetAvailableOperatorsResponse",
    "AvailableOperators": [
      {
          "DisplayName":"Katka",
          "UserId":1
      },
      {
          "DisplayName":"Tomáš",
          "UserId":2
      }
    ]
}

GetAvailableGroups

Acquires a list of created groups. Returns only groups defined in routing, which meet the routing conditions.

Supported mluvii channels: chat, facebook, whatsapp

Request JSON:

{
    "Activity": "GetAvailableGroups"
}

Response:

{
    "Activity": "GetAvailableGroupsResponse",
    "AvailableGroups": [
      {
          "DisplayName":"Group one",
          "GroupId":1
      },
      {
          "DisplayName":"Group two",
          "GroupId":2
      }
    ]
}

Forward

Redirects interaction for a live operator. If neither the target operator nor the group is defined, the group is automatically selected according to the settings of routing commands.

Supported mluvii channels: chat, facebook, whatsapp

Request JSON:

{
    "Activity": "Forward",
    "OperatorGroupId": <integer:optional>,
    "UserId": <integer:optional>
}

GetCallParams

Acquires CallParams associated with an active session.

Supported mluvii channels: chat, facebook, whatsapp

Request JSON:

{
    "Activity": "GetCallParams"
}

Response:

{
    "Activity": "GetCallParamsResponse",
    "CallParams": <dictionary>
}

SetCallParams

Set CallParams to active session.

Supported mluvii channels: chat, facebook, whatsapp

Request JSON:

{
    "Activity": "SetCallParams",
    "CallParams": <dictionary>
}

Response:

{
    "Activity": "SetCallParamsResponse",
    "Success": <boolean>,
    "ErrorMessage": <string>
}

SendGuestOfflineEmail

Sends an email to an address for messages from an offline form.

Supported mluvii channels: chat

Request JSON:

{
    "Activity": "SendGuestOfflineEmail",
    "Subject": <string>,
    "Message": <string>,
    "Location": <string> (message source for resolution, e.g.: "Chatbot Mluviik")
}

ChatbotOpenFileUploadPrompt

Opens a dialog box to allow the user to upload the file.

Supported mluvii channels: chat

Request JSON:

{
    "Activity": "ChatbotOpenFileUploadPrompt"
}

Response:

{
    "Activity": "ChatbotOpenFileUploadPromptResponse",
    "FileUrl": <string>, (file URL uploaded by guest)
}

GetGuestIdentity

Gets properties from customer identity.

Supported mluvii channels: chat, facebook, whatsapp

Request JSON:

{
    "Activity": "GetGuestIdentity"
}

Response:

{
    "Activity": "GetGuestIdentityResponse",
    "TrackedGuestGuid": <Guid>, (uniq identifier from cookie)
    "PhoneCallerId": <string>, (phone number)
    "FacebookPSID": <string>, (facebook identifier)
    "FacebookPageId": <string>, (facebook page identifier)
    "whatsAppContactId": <string>, (whatsapp identifier)
}

EnableGuestUpload

Enable functions that allow user file upload.

Supported mluvii channels: chat

Request JSON:

{
    "Activity": "EnableGuestUpload"
}

Response:

{
    "Activity": "EnableGuestUploadResponse",
    "Success": <boolean>,
    "ErrorMessage": <string>
}

DisableGuestUpload

Disable functions that allow user file upload.

Supported mluvii channels: chat

Request JSON:

{
    "Activity": "DisableGuestUpload"
}

Response:

{
    "Activity": "DisableGuestUploadResponse",
    "Success": <boolean>,
    "ErrorMessage": <string>
}

GuestFileUpload

If client loads file through pin in chat input, Activity in this format will be send to chatbot.

Supported mluvii channels: chat

Response:

{
    "Activity": "GuestFileUpload",
    "FileUrl": <string>, (URL of file loaded by user)
}

Text

Send text.

This activity is supported only in chatbot API

Supported mluvii channels: chat, facebook, whatsapp

Request JSON:

{
    "id": "d65b8d77-4afc-4c39-b274-2795e745c164",
    "type": "message",
    "timestamp": "12.06.2020 12:44:31",
    "text": "Sample text",
    "conversation": { }
}

GetHeroCards

Returns available Hero cards.

Supported mluvii channels: chat

Request JSON:

{
    "activity": "GetHeroCards"
}

Response:

{
   "activity": "GetHeroCardsResponse",
   "heroCards": [
      {
         "DisplayName":"Hero card one",
         "HeroCardId":1
      },
      {
         "DisplayName":"Hero card two",
         "HeroCardId":2
      }
   ]
}

SendHeroCard

Send selected hero card to client chat.

Supported mluvii channels: chat

Request JSON:

{
    "activity": "SendHeroCard",
  "heroCardId": <integer:required>
}

Response:

{
   "activity": "SendHeroCardResponse",
   "success": <boolean>,
   "errorMessage": <string>
}

Examples of general activities

Text

Send a text message

Supported mluvii channels: chat

Request JSON:

{
    "id": "d65b8d77-4afc-4c39-b274-2795e745c164",
    "type": "message",
    "timestamp": "12.06.2020 12:44:31",
    "text": "Sample text",
    "conversation": { }
}

Buttons

Buttons can be sent using adaptive cards.

Supported mluvii channels: chat

Request JSON:

{
    "id": "e688601c-37e2-4d7b-a39c-ece0a6c372df",
    "type": "message",
    "timestamp": "pátek 12. června 2020",
    "conversation": { },
    "attachments": [
      {
        "contentType": "application/vnd.microsoft.card.hero",
        "content": {
          "title": "Test buttons",
          "buttons": [
            {
              "type": "imBack",
              "title": "Button 1",
              "value": "Button 1"
            },
            {
              "type": "imBack",
              "title": "Button 2",
              "value": "Button 2"
            }
          ]
        }
      }
    ]
}

AdaptiveCards

Api supports message formatting according to the standard https://adaptivecards.io.

Supported mluvii channels: chat

Example of using an adaptive card carousel.

{
      "id": "5fc5bdc9-fe52-4348-8508-7f2ae271240b",
      "type": "message",
      "timestamp": "2020-06-12T12:13:39.7593384+02:00",
      "attachmentLayout": "carousel",
      "conversation": { },
      "attachments": [
        {
          "contentType": "application/vnd.microsoft.card.hero",
          "content": {
            "subtitle": "1. Street Foo 254 Czechia",
            "images": [
              {
                "url": "https://dev.virtualearth.net/REST/V1/Imagery/Map/Road?form=BTCTRL&mapArea=49.7463607788086,13.1083498001099,49.7932815551758,13.1951398849487&mapSize=500,280&pp=49.7616882324219,13.1491804122925;1;1&dpi=1&logo=always&key=ApBn8xoItlENbFx-rr1kzt_JakWdFTH24taCasYxQCgit15NtDeYrztO4chDtrg5"
              }
            ],
            "buttons": [
              {
                "type": "imBack",
                "title": "Street Foo 254",
                "value": 1
              }
            ]
          }
        },
        {
          "contentType": "application/vnd.microsoft.card.hero",
          "content": {
            "subtitle": "1. Úlice, Plzeň, Czechia",
            "images": [
              {
                "url": "https://dev.virtualearth.net/REST/V1/Imagery/Map/Road?form=BTCTRL&mapArea=49.7463607788086,13.1083498001099,49.7932815551758,13.1951398849487&mapSize=500,280&pp=49.7616882324219,13.1491804122925;1;1&dpi=1&logo=always&key=ApBn8xoItlENbFx-rr1kzt_JakWdFTH24taCasYxQCgit15NtDeYrztO4chDtrg5"
              }
            ],
            "buttons": [
              {
                "type": "imBack",
                "title": "Úlice, Plzeň, Czechia",
                "value": 1
              }
            ]
          }
        },
        {
          "contentType": "application/vnd.microsoft.card.hero",
          "content": {
            "subtitle": "1. Úlice, Plzeň, Czechia",
            "images": [
              {
                "url": "https://dev.virtualearth.net/REST/V1/Imagery/Map/Road?form=BTCTRL&mapArea=49.7463607788086,13.1083498001099,49.7932815551758,13.1951398849487&mapSize=500,280&pp=49.7616882324219,13.1491804122925;1;1&dpi=1&logo=always&key=ApBn8xoItlENbFx-rr1kzt_JakWdFTH24taCasYxQCgit15NtDeYrztO4chDtrg5"
              }
            ],
            "buttons": [
              {
                "type": "imBack",
                "title": "Úlice, Plzeň, Czechia",
                "value": 1
              }
            ]
          }
        }
      ]
    }

results matching ""

    No results matching ""