ICMessage (Discontinued)

🚧

Note

Please note that we have announced end of sale for Cordova SDK. It is no longer offered as a standard Webex Connect capability.

This JS class exposes message data from In-app and Push channels in a generalized form and is also used to send Real-Time Messages from an app to the Webex Connect platform.

isOutgoing

This method is used to verify whether a message is outgoing or not.

Syntax: boolean isOutgoing()

Return Value: Returns true if the message is outgoing.

getTitle

This method is used to get the message notification title.

Syntax: String getTitle()

Return Value: Returns message notification title.

getCategory

This method is used to get the category of the interactive message.

Syntax: String getCategory()

Return Value: Returns the category of the message.

getChannel

This method is used to get the channel on which the message was received.

Syntax: String getChannel()

Return Value: Returns the channel.

getCustomTags

This method is used to get the custom or developer specified data that was sent as part of the message payload.

Syntax: JSObject getCustomTags()

Return Value: Returns the data that was sent along with the message payload.

getExtras

This method is used to get the supplementary data that was sent as part of the message payload. The format of this data is controlled by the Webex Connect platform.

Syntax: JSObject getExtras()

Return Value: Returns the supplementary data that was sent along with the message payload.

getMessage

This method is used to get the content of the message that is displayed to the end-users.

Syntax: String getMessage()

Return Value: Returns the text message that is displayed to the end-users.

getPriority

This method is used to get the priority set to the message.

Syntax: String getPriority()

Return Value: Returns the priority of the text message.

getReference

This method is used to get the message reference to trigger a rule set in Webex Connect.

Syntax: String getReference()

Return Value: Returns the reference of the message.

getTransactionId

This method is used to get the transaction id that uniquely identifies the message transaction within the Webex Connect platform.

Syntax: String getTransactionId()

Return Value: Returns the transaction id that identifies the message transaction.

getUserId

This method is used to get the user id from which the message is originated. This method is not applicable to Push messaging.

Syntax: String getUserId()

Return Value: Returns the user id from which the message is originated.

setCustomTags

This method is used to set the custom tags object to be sent with an outgoing RTM. This method is not applicable to Push messaging.

Syntax: void setCustomTags(tags)

ParameterTypeDescription
tagsJSObjectSpecifies the JSObject.

setMessage

This method is used to set the content of the text message to be sent with an outgoing RTM. This method is not applicable to Push messaging.

Syntax: void setMessage(message)

ParameterTypeDescription
messageStringSpecifies the content of the text message.

getAttachments

This method is used to get the attachment files that are attached to the message.

Syntax: ICAttachment[] getAttachments()

Return Type: Returns the attachment files attached to the message.

getThread

This method is used to get the thread details specified in the message.

Syntax: ICThread getThread()

Return Type: Returns the thread details that were specified in the message.

getSubmittedAt

This method is used to get the message submitted date to the Connect platform.

Syntax: Date getSubmittedAt()

Return Type: Returns the message submitted date to the Connect platform.

getDeliveredAt

This method is used to get the message delivered date to the device.

Syntax: Date getDeliveredAt()

Return Type: Returns the message delivered date to the device.

getReadAt

This method is used to get the message read the date at the device.

Syntax: Date getReadAt()

Return Type: Returns the message read date at the device.

getType

This method is used to get the message type.

Syntax: ICMessageType getType()

Return Type: Returns the message type.

setAttachments

This method is used to set the media file attachments to be sent with an outgoing Live Chat / In-App Messaging. This method is not applicable to Push messaging.

Syntax: void setAttachments(final ICAttachment[] attachments)

Parameters:

ParametersTypeDescription
attachmentsICAttachmentRefer to ICAttachment class.

setThread

This method is used to set the thread details that needs to be specified in the message.

Syntax: void setThread(final ICThread thread)

ParameterTypeDescription
threadICThreadRefer to ICThread class.

getStatus

This method allows to get the message status such as None/Sent/NotSent/Delivered/Read

Syntax: ICMessageStatus getStatus()

Return Value: Returns the ICMessageStatus class.

setStatus

This method allows to set message status such as None/Sent/NotSent/Delivered/Read

Syntax: void setStatus(ICMessageStatus status)

ParameterTypeDescription
statusICMessageStatusset message status

getQuickReplyData

This method is used to get the quick reply data that have been attached to the message.

Syntax: ICQuickReplyData getQuickReplyData ()

Return Value: Returns the quick reply data of the message.

setQuickReplyData

This method sets the quick reply data to the message.

Syntax: void setQuickReplyData (ICQuickReplyData quickReplyData)

Parameter:

ParameterTypeDescription
quickReplyDataICQuickReplyDataThe quick reply data that have been attached to the message.