App code of the URL’s target (the app’s code).
ID of the URL’s target.
Link target namespace (the code of the app's workspace).
The method assigns a bot to a session.
The method assigns an operator to a session.
The method assigns a group of operators to a session.
The method is used to close an active session.
Note that the script should be executed on behalf of the operator or bot assigned to the sessions. Other users cannot close the session.
await Context.data.session.close();
Request complete data of a reference object.
The method returns all messages in a session.
The method returns the last message in a session.
const lastMessage = await Context.data.session. getLastMessage();
The method marks a session as spam.
The data (metrics) of a session marked as spam are not taken into account when generating reports. The method is not available for the following types of channels: internal and support (see LineChannelType).
internal
support
await Context.data.session.markAsSpam();
The method sends a system message to a session.
The method is used to set a session’s priority.
await Context.data.session.setPriority(LineSessionPriority. Low);
The method deletes a session from spam.
The session is assigned to the operator who previously worked on it or added to the queue.
await Context.data.session.unmarkAsSpam();
Your review is successfully sent!
Feedback sent successfully
Link to the Live Chat session object
Type parameters
I: Item<ItemData>
Hierarchy
Properties
Readonly code
App code of the URL’s target (the app’s code).
Readonly id
ID of the URL’s target.
Readonly namespace
Link target namespace (the code of the app's workspace).
Methods
assignToBot
The method assigns a bot to a session.
Parameters
Optional silent: undefined | false | true
Returns Promise<void>
assignToOperator
The method assigns an operator to a session.
Parameters
operator: UserItemRef
Returns Promise<void>
assignToOperatorGroup
The method assigns a group of operators to a session.
Parameters
userGroup: UserGroupItemRef
Returns Promise<void>
close
The method is used to close an active session.
Note that the script should be executed on behalf of the operator or bot assigned to the sessions. Other users cannot close the session.
await Context.data.session.close();Returns Promise<void>
fetch
Request complete data of a reference object.
Returns Promise<LineSessionItem>
getAllMessages
The method returns all messages in a session.
Parameters
Optional from: undefined | number
Optional size: undefined | number
Returns Promise<LineMessageItem[]>
getLastMessage
The method returns the last message in a session.
const lastMessage = await Context.data.session. getLastMessage();Returns Promise<LineMessageItem>
markAsSpam
The method marks a session as spam.
The data (metrics) of a session marked as spam are not taken into account when generating reports. The method is not available for the following types of channels:
internalandsupport(see LineChannelType).await Context.data.session.markAsSpam();Returns Promise<void>
sendSystemMessage
The method sends a system message to a session.
Parameters
message: string
Returns Promise<LineMessageItem>
setPriority
The method is used to set a session’s priority.
await Context.data.session.setPriority(LineSessionPriority. Low);Parameters
Optional priority: LineSessionPriorityEnumBase
Returns Promise<void>
unmarkAsSpam
The method deletes a session from spam.
The session is assigned to the operator who previously worked on it or added to the queue.
await Context.data.session.unmarkAsSpam();Returns Promise<void>
Feedback sent successfully
Thank you for your input