Notifications
Overview
Chat, email, internal, push and sms messages are different types of notifications. A notification can contain multiple channels at the same time.
For example, using the sendNotification
mutation, you can send an email message and sms message at the same time; and this notification would have the same timestamp but contain an email message and sms message.
Examples
Example query of fetching list of emails and sms messages sent
Query:
query notifications($where: notificationWhere) {
notifications(where: $where) {
list {
emailMessage {
from
to
bccs
ccs
subject
}
smsMessage {
to
from
}
timestamp
status
}
}
}
Variables to filter notifications send to specific Entity using id of entity:
{"where": {"toEntityId": "<Id of Entity>"}}
Example result:
{
"data": {
"notifications": {
"list": [
{
"emailMessage": {
"from": "[email protected]",
"to": "[email protected]",
"bccs": null,
"ccs": ["[email protected]"],
"subject": "Application Confirmation"
},
"smsMessage": null,
"timestamp": "2020-05-21T09:26:57.833Z",
"status": null
}
]
}
}
}
For a more detailed list of fields please visit our Playground.