Use CB Auto Action to provide

3 years 3 months ago #322373 by timstohr
Use CB Auto Action to provide was created by timstohr
Hi Kyle,
The plan is to basically duplicate the CB AA that do the notifications and use these to send the variables instead to our push notifications servers that sends it onto our app.

Problem: I need to send the receiver IDs as an array. I had thought that it would be easy since we have as receiver ID (called User in AA) the variable [action_user].

However, I have just seen that this variable is a single user ID... I can also send a single user ID but need to know how I can make it loop.

How could I solve this?

Can I loop something here?

Kind regards,

Tim

Please Log in to join the conversation.

3 years 3 months ago #322376 by krileon
Replied by krileon on topic Use CB Auto Action to provide
Loop what exactly? Loops in CB Auto Actions entirely depend on if Users is an array or not. Ideally you should just be sending data to your app endpoint as JSON.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 years 3 months ago #322397 by timstohr
Replied by timstohr on topic Use CB Auto Action to provide
Hi Kyle,
I have already programmed everything to work with CB Auto Action (pusher and app etc... are quite weird, takes too long to explain and will not help you to understand the current problem).
At the end of the day I need a list of users that a certain notification is going to. You often use [action_user] in your System AA. I now need to know what kind of output comes out of this. Is it a list of user ID (eg: 987, 989, 1001) or what is the output?

Thanks,

Tim

Please Log in to join the conversation.

3 years 3 months ago #322410 by krileon
Replied by krileon on topic Use CB Auto Action to provide
You won't have access to the loop of users unless the trigger you're using sends an array of users as a variable. For User parameter loops the loop is processed before the auto action as it sends the array of users through the auto action as part of its foreach loop.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 years 3 months ago #322421 by timstohr
Replied by timstohr on topic Use CB Auto Action to provide
Perfect, then we can use single triggers.
That means that [action_users] comes out as a single user. Therefore we send one "notification" with each loop.

How do I get the AA to loop around [action_user]? Will it do it automatically?

Please Log in to join the conversation.

3 years 3 months ago #322426 by krileon
Replied by krileon on topic Use CB Auto Action to provide

That means that [action_user] comes out as a single user. Therefore we send one "notification" with each loop.

Correct.

How do I get the AA to loop around [action_user]? Will it do it automatically?

You haven't provided where this will be happening so I don't know what more to advise. The answer significantly depends on what is triggering this auto action.

Basically either the trigger needs to already provide an array of recipients, which many don't but some do, or you need to set Users to Custom and provide your own user parsing code. For example the system action "CB Groupjive - Stream Notification" has custom user parsing to return an array of user ids that are active members of a group.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.218 seconds

Facebook Twitter LinkedIn