NewSmsEvent

Notification Object
      ↪ NewSmsEvent


Notification when a new SMS message is sent or received.

Subscribing

Subscribe to the newSmsEvent notification type.
The event is sent in the following situations:

  • Outgoing SMS: when an SMS is created and its send date is reached, at the moment the message is actually sent.

  • Incoming SMS: when a new SMS message is received.

How to process

When this event is received, a new SMS message has been sent or received.
If the field silent is set to true, do not show a notification, only refresh the active communication screen(s).
If silent is false, process this as a new SMS notification: warn the user that a new SMS is received, or only refresh the screen if the user is already viewing this communication.

Use the incoming field to determine whether the SMS was received or sent.

If the SMS could not be delivered after sending (for example because the number does not exist), a SmsSendStateChangedEvent is sent afterwards with the updated send state.

Fields

Name Type Notes

date

String

The date of the SMS in UTC.

errorInfo

String

Information about why the SMS could not be sent, if applicable.

contents

String

The contents of the SMS message.

communication

Entity

Reference to the Communication object of the SMS.

from

Entity

Reference to the sender of the SMS.

to

Entity

Reference to the recipient of the SMS.

phoneLine

Entity

Reference to the Phone Line used to send or receive the SMS.

silent

Boolean

If true, do not show a notification, only refresh the active communication screens.

incoming

Boolean

If true, the SMS is incoming, else it is outgoing.

sendState

String

The send state of the SMS at the moment of the notification.