Skip to content

Subscribing

System users can subscribe and unsubscribe to topics using the exposed GraphQL endpoints.

GraphQL
mutation {
    subscribeToTopic(
        input: {
            cascade: true
            topicPath: "claim/updated"
            contactIds: ["f1000000-ac11-0242-0610-08dd51b0e3a6"]
            channels: ["email"]
        }
    )

    unsubscribeFromTopic(
        input: {
            contactIds: ["f1000000-ac11-0242-0610-08dd51b0e3a6"]
            topicPath: "claim/updated"
        }
    )
}

Here the concept of a Contact is introduced. A contact is any entity in the suite ecosystem that is reachable for communication by any of the methods described as channels. Of course, users are considered contactable, among many other entities.

When subscribing to a topic you can choose to override the channels used for delivery, as long as the specified topic supports such channel. The contact's defined methods will be used as fallback if no channel is specified.

A particular type of contact is a contact group. A group can have its own contact methods (say an email address that is defined for a user group) and so can the group members. Setting cascade to true will ensure whenever a contact group receives a subscription event, its members will receive it too.