getPersistentMenu

Prev Next

Available in Classic and VPC

Get the list of persistent menus for a chatbot.

Note

The following three types of response components are available for chatbot answers.

Request

The following describes the request format for the endpoint. The request format is as follows:

Method URI
POST API Gateway's unique invoke URL created in CLOVA Chatbot Builder

Request headers

For headers common to all CLOVA Chatbot APIs, see CLOVA Chatbot request headers.

Request body

The following describes the request body.

  • If persistent menus are enabled in the console, the PersistentMenu component will respond to the persistMenu field when requested, even if no local cache exists.
Field Type Required Description
version String Optional Chatbot version
  • v1 | v2 (default)
    • Set to v1 when not entered
userId String Required Unique chatbot user ID
  • Any input up to 256 characters
userIp String Optional User IP address
timestamp Long Required Arbitrary timestamp value (timestamp)
bubbles Array Required Set to an empty array value
  • <e.g.> []
event String Required Event value
  • Set to getPersistentMenu

Request example

The following is a sample request.

{
"version": "v2",
"userId": "{userId}",
"userIp": "{userIp}",
"timestamp": 12345678,
"bubbles": [],
"event": "getPersistentMenu"
}

Response

The following describes the response format.

Response body

The following describes the response body.

Field Type Required Description
version String - Chatbot version
userId String - Unique chatbot user ID
  • Same as the value set on request
timestamp Long - Timestamp value (timestamp)
bubbles Array - Empty array value
  • <e.g.> []
entities Array - Chatbot entity analysis results that matched the user's query
persistentMenu Object - Persistent menu configuration information
persistentMenu.type String - Persistent menu type
persistentMenu.title String - Fixed menu name
persistentMenu.data Object - Persistent menu configuration information
persistentMenu.data.contentTable Array - contentTable details: content
keywords Array - keywords details: keywords
  • exactMatch | contain
    • exactMatch: User input matches keywords exactly
    • contain: User input contains keywords
conversation Object - Conversation information
conversation.scenarioName String - Scenario name
conversation.chatUtteranceSetId String - Conversation utterance ID
conversation.types Array - Conversation type
slotNormalizer Array - System entity that matched the user's query
  • Date, Time, People, Name
normalizer String - System entity that matched the user's query
event String - Event value

contentTable

The following describes contentTable.

Field Type Required Description
rowSpan Integer - Number of rows occupied by cells in the table (span)
colSpan Integer - Number of columns occupied by cells in the table (span)
data Object - Component configuration information
data.type String - Component type
data.title String - Component name
data.subTitle String - Subcomponent name
data.data Object - Subcomponent configuration information
data.data.type String - Subcomponent type
data.data.iconUrl String - Icon URL address
data.data.action Object - Component action information
data.data.action.type String - Component action type
data.data.action.data Object - Component action details
data.data.action.data.utteranceId Long - Utterance ID
data.data.action.data.text String - Text that appears as user input in the chat
data.data.action.data.postback String - Postback text to send to the chatbot

keywords

The following describes keywords.

Field Type Required Description
keyword String - Keywords
group String - Keyword group
type String - Keyword type

Response status codes

For response status codes common to all CLOVA Chatbot APIs, see CLOVA Chatbot response status codes.

Response example

The following is a sample example.

{
  "version": "v2",
  "userId": "{userId}",
  "timestamp": 1665041597003,
  "bubbles": [],
  "persistentMenu": {
    "type": "template",
    "title": "3by2",
    "data": {
      "contentTable": [
        [
          {
            "rowSpan": 1,
            "colSpan": 1,
            "data": {
              "type": "button",
              "title": "",
              "subTitle": "",
              "data": {
                "type": "imageButton",
                "iconUrl": "https://clovachatbot.ncloud.com/i48103278ci6f6-9f51-4d08-a947-1c8acc992629",
                "action": {
                  "type": "link",
                  "data": {
                    "url": "https://ncloud.com",
                    "mobileUrl": "https://ncloud.com"
                  }
                }
              }
            }
          }
        ]
      ]
    }
  },
  "keywords": [],
  "conversation": {
    "scenarioName": null,
    "chatUtteranceSetId": null,
    "types": []
  },
  "slotNormalizer": {},
  "normalizer": "",
  "event": "send"
}