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

contentTable

The following describes persistentMenu.data.contentTable.

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

keywords

The following describes keywords.

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

Response status codes

For response status codes common to all CLOVA Chatbot Custom APIs, see Common CLOVA Chatbot Custom API 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"
}