Advanced Settings

Topics

Our SDK allows you to classify users into different customizable groups. This is very useful for:

  • Implement a preferences screen so that the user can choose the topics for which they want to receive notifications.
  • Label according to the navigation or actions that the user performs.
  • Segment communications according to whether the user has identified or is anonymous.
  • Segment based on language, culture, customer category, or based on any other criteria you need.

Remember that you must first define the groups you want to work with in the indigitall console (Tools> Topics).

  • List groups

Use the topicsList method to get the list of groups that are configured in your indigitall project. The callback of this method receives as a parameter an array of Topics, which contains the information of all the available groups, as well as a flag that indicates whether the user is included in any of them.

window.plugins.indigitallInApp.inAppTopicsList((topics) => {
  //get topics
}, (error) => {
  /print error
});
  • Manage subscription

To manage the device subscription to one or more groups, there are two methods: topicsSubscribe and topicsUnsubscribe.

Optionally, both receive a TopicsCallback object as the third parameter, which will return the list of all Topic in the project.

window.plugins.indigitallInApp.inAppTopicsSubscribe((topics) => {
  //get topics
}, (error) => {
  /print error
});

window.plugins.indigitallInApp.inAppTopicsUnsubscribe((topics) => {
  //get topics
}, (error) => {
  /print error
});