What we are trying to achieve is provide an App where the end user can choose from different channels in order to receive push notifications from the service provider and not all, since there are going to be like 40 different channels sending push notifications every now and then.
as an example for just tree channels:
So what I decided to use are check boxes from the UI
collapsable block group name=mobilecollapsibleset_70
collapsable block = mobilecollapsblock_71
(the user will see on the dashboard this 3 checkboxes, and will have the option to choose all of them, one, two or none)
checkbox item = OpBIIA value 111....channel 1
checkbox item = OpBIIA value 112....channel 2
checkbox item = OpBIIA value 113....channel 3
So I did build this mapping where I do call the service Canal which is a PUT service
Settings
URL https://api.appery.io/rest/push/reg/{...
Request
Default Name
X-Appery-App-Id xxxxx-92e7-c60cbb114320 as a header
Channel blanc
deviceid blanc
Rest as Default
On the Request mapping I enable the local storage
pushNotifiactionDeviceID to the deviceid from the service with the JS:
return encodeURIComponent (value);
and the channel with the JS (no mapping)
return [parseInt('{"$and":[{{' + (Appery("OpBIIA").value) + '},{{' + (Appery("OpBIIB").value) + '},{{' + (Appery("OpBIIC").value) + '}]}')];]
This last JS is the one I think I'm missing something because the channel gets ["null"]
The idea is to have a channel column from Device ID DB kind of this string
[111,112,]
That would mean that I the user only desires to receive info from channel one and two from this short example.
Did my self clear?
Best and thank you for your time and knowledge
CC