Stella Platform Documentation

Stella Platform Documentation

  • Docs
  • API
  • FAQ
  • Languages iconEnglish
    • 中文

›Context Reference

Get Started

  • Introduction

Context Reference

  • Message Event
  • Member
  • Channel
  • Integrations
  • Agenda Meta
  • Group
  • Methods

REST API

  • Introduction and Prerequisite
  • Errors
  • Meta Object
  • API Methods

Message Event

Message event is an object provided by the platforms which contains the information about the message, which can be access by this.messageEvent.

Example

this.messageEvent.data.text
// => "TEXT"

Facebook

PropertyTypeDescription
dataobjectMessage data
fromstringPSID of the user
messageIdstringOptional Message ID
originstringOptional Message origin. Values include: CUSTOMER_CHAT_PLUGIN, and MESSENGER
timestampstringUnique identifier for this specific action occurrence generated
tostringPage ID

data object

PropertyTypeDescription
accountLinkingobjectACCOUNT_LINKING. Information about the link account or unlink account are clicked
app_idstringECHO TYPE ONLY. ID of the app from which the message was sent
appRolesobjectAPP_ROLES TYPE ONLY. Contains Page ID
attachmentsarray<object>Available only when there is an attachment
deliveryobjectDELIVERY TYPE ONLY. Information about delivered message of a Facebook page
metadatastringECHO TYPE ONLY. Custom string
passThreadControlobjectPASS_THREAD_CONTROL TYPE ONLY. Information about passing the control of one conversation from one app to another
payloadstringPAYLOAD TYPE ONLY. Custom data provided by the app
policyEnforcementobjectPOLICY_ENFORCEMENT TYPE ONLY. Information about policy enforcement
referralobjectPAYLOAD AND REFERRAL TYPE ONLY. Referral information.
requestThreadControlobjectREQUEST_THREAD_CONTROL TYPE ONLY. Information about requesting control of one conversation of one app
readobjectREAD TYPE ONLY. Information about read message of a Facebook page
takeThreadControlobjectTAKE_THREAD_CONTROL ONLY. Information about taking control of one conversation from a secondary app
textstringTEXT TYPE ONLY. Message text
titlestringTitle of the call-to-action button
typestringMessage type. Values include TEXT, PAYLOAD, REFERRAL, DELIVERY, ECHO, READ, OPTIN, ACCOUNT_LINKING, PASS_THREAD_CONTROL, REQUEST_THREAD_CONTROL, TAKE_THREAD_CONTROL, APP_ROLES, POLICY_ENFORCEMENT, and MISC.

For further reference of type TEXT, PAYLOAD, REFERRAL, DELIVERY, ECHO, READ, OPTIN, ACCOUNT_LINKING, POLICY_ENFORCEMENT and MISC, please see the Facebook documentation.

For further reference of type PASS_THREAD_CONTROL, REQUEST_THREAD_CONTROL, TAKE_THREAD_CONTROL, APP_ROLES, please see the Facebook documentation.

attachment object

PropertyTypeDescription
typestringAttachment type. Values include IMAGE, VIDEO, AUDIO, LOCATION, FILE, FALLBACK, and TEMPLATE
urlstringAttachment URL. Available only on IMAGE, VIDEO, AUDIO, and FILE type.

Slack

In Slack, there are 3 different webhook events and will compose different messageEvent objects.

Slash command webhook

PropertyTypeDescription
dataobjectMessage content
fromstringSender ID
response_urlstringURL can be used to post responses to dialog submissions
teamIdstringSlack team ID
timestampstringUnique identifier for this specific action occurrence generated
toSlack channel ID
typestringSlack event type

data object

PropertyTypeDescription
payloadstringSlash event command
textstringMessage text content

Action webhook

PropertyTypeDescription
dataobjectMessage content
fromstringSender ID
response_urlstringURL can be used to post responses to dialog submissions
teamIdstringSlack team ID
timestampstringUnique identifier for this specific action occurrence generated
toSlack channel ID
typestringSlack event type

data object

PropertyTypeDescription
callback_idstringAn identifier strictly for you to recognize submissions of this conversation
originalMessagestringMessage text content
payloadstringIf there is a JSON value of in the first action, it is a Javascript object. Otherwise, it will return the original value.
trigger_idstringShort-lived pointer, which expired in 3 seconds, to interaction's who, what, where, and when

Event webhook

PropertyTypeDescription
bot_idstringOptional Slack bot ID
dataobjectMessage content
eventobjectMessage event in a more detailed manner
fromstring(bot_id AND isBot) Slack bot ID
(default) sender ID
isBotbooleanOptional Status of whether the conversation is conducted by bot
teamIdstringSlack team ID
timestampstringUnique identifier for this specific action occurrence generated
tostringSlack channel ID
typestringMessage type. Values include: TEXT, MISC, IMAGE

data object

PropertyTypeDescription
attachmentsobjectAttachment information inside data
textstringMessage text content

attachments object

PropertyTypeDescription
downloadUrlstringDownload URL of the file
typestringAttachment type. Values include: IMAGE, VIDEO, FILE, and TEXT

event object

PropertyTypeDescription
subtypestringMessage subtype. Values include bot_message and file_share

Teamwork

Coming soon...

Whatsapp

PropertyTypeDescription
dataobjectMessage data
fromstringWhatsapp ID of the sender of the original message
mentionsarray<string>List of mentioned IDs
timestampstringMessage received timestamp
tostringWhatsapp ID of the receiver of the original message
typestringMessage type. Values include: TEXT, MISC, and SYSTEM

data object

PropertyTypeDescription
attachmentsarray<object>Message attachments. This field will not be available when the type of the message is TEXT or SYSTEM
systemobjectSystem message information. Please see the Facebook documentation for further reference
textstringMessage text content. This field is available only the message type is TEXT

attachements object

PropertyTypeDescription
captionstringCaption of the attachment
opusbooleanAudio format. Available only for the 1st item in the attachments array
typestringAttachment type. Values include: IMAGE, VIDEO, AUDIO, and FILE
waMediaIdstringWhatsapp media ID

Wechat

Coming soon...

← IntroductionMember →
  • Facebook
  • Slack
    • Slash command webhook
    • Action webhook
    • Event webhook
  • Teamwork
  • Whatsapp
  • Wechat
Stella Platform Documentation
Docs
Get StartedBest PracticesAPI Reference
Community
FAQUser ShowcaseChat with Us
Copyright © 2020 Sanuker Inc. Limited