Flex

Prev Next

Available in Classic and VPC

This document describes the Flex component of the response components of a chatbot answer.

The Flex component consists of the following four basic components.

These components allow you to set the chatbot's response to each feature in Chatbot Builder, and return the response results in JSON format.

Note

The Flex component supports all JSON object formats, and defines its own JSON specification as needed.
<e.g.> FlexMessageContainerObject

Flex component

This section describes the Flex component.

Flex component response body

The following is the response body of the Flex component.

Field Type Required Description
type String - Component type
  • Only flex is available for the Flex component
title String - Component title
  • Short bold text displayed on the button
  • Used as alternate text in chat lists and push notifications
subTitle String - Subcomponent title
  • Not used
data String - Flex component configuration information
  • Arbitrary JSON object files are allowed
  • <e.g.> LINE Flex messages can be copied to JSON in Flex Message Simulator

Flex component response example

The following is a sample response of the Flex component.

{
"type": "flex",
"title": "not used",
"subTitle": "required, alternative text",
"data" : {} // any json object 
}

Special Messenger component

The Special Messenger component is utilized by external messengers that CLOVA Chatbot can integrate with, such as LineFlex, LineSticker, and LineWorksSticker.

LineFlex component

This section describes the LineFlex component.

LineFlex component response body

The following is the response body of the LineFlex component.

Field Type Required Description
type String - Component type
  • Only flex is available for the Flex component
title String - Component title
  • Short bold text displayed on the button
  • Used as alternate text in chat lists and push notifications
subTitle String - Subcomponent title
  • Not used
data String - Flex component configuration information
  • Arbitrary JSON object files are allowed
  • <e.g.> LINE Flex messages can be copied to JSON in Flex Message Simulator
Note

The LineFlex feature supported by the LINE messenger has been changed to a common Flex component format, but the components are the same.

LineFlex component response example

The following is a sample response of the LineFlex component.

{
"type": "flex",
"title": "not used",
"subTitle": "required, alternative text",
"data" : {} // any json object 
}

LineSticker component

The LineSticker component can set a sticker message according to the format of the Line Sticker sticker list supported by the LINE messenger.

LineSticker component response body

The following is the response body of the LineSticker component.

Field Type Required Description
type String - Component type
  • Only line_sticker is available for the LineSticker component
data Object - LineSticker component information
data.packageId String - LINE Sticker package ID
data.stickerId String - LINE Sticker sticker ID

LineSticker component response example

The following is a sample response of the LineSticker component.

{
    "type": "line_sticker",
    "data" : 
    {  
        "packageId": "packageId of LINE",
        "stickerId": "stickerId of LINE"
    }
}

LineWorksSticker component

The LineWorksSticker component can set a sticker message according to the format of the LineWorksSticker sticker list supported by the LINE WORKS messenger.

LineWorksSticker component response body

The following is the response body of the LineWorksSticker component.

Field Type Required Description
type String - Component type
  • Only lineworks_sticker is available for the LineWorksSticker component
data Object - LineWorksSticker component information
data.packageId String - LINEWORKS Sticker package ID
data.stickerId String - LINEWORKS Sticker sticker ID

LineWorksSticker component response example

The following is a sample response of the LineWorksSticker component.

{
    "type": "lineworks_sticker",
    "data" : 
    {
        "packageId": "packageId of LINEWORKS",
        "stickerId": "stickerId of LINEWORKS"
    }
}