Kick off alerts for other users

Hello

I’m trying to play around with the MyAlerts! plugin by @ZeroqodeSupport and I’d like to know if it is possible to kick off an alert for more than just the current user?

For example, I have a two market place tech support app. I’d like for customers and freelancers to both receive an alert whenever an open ticket that they’ve either submitted or that they are assigned to is updated with a new message or closed.

Is something like this possible with this alert plugin?

Thank you

Create a workflow to search for the ticket’s last message - whenever the last message’s creation date is current date/time - trigger a workflow to send a notification.

4 Likes

Thank you for responding.

Unfortunately this solution doesnt quite work the way I’d like it to. It only seems to trigger one time and never again after that unless I close the browser and restart. However, for the first time it did have the intended affect of letting the receiving user be alerted that one of their tickets has a new message.

I will continue to play around with this expression and find a way to get it so that the alert shows up for the receiving user every time. If you have any more pointers, please let me know.

Thank you

Maybe this will do it.

Hey, @randreas

Have you tried adding the “Only when” constraint to the plugin action? Like, "Current user is logged in, Current user’s Admin is “yes”, Current user’s Customer/Freelancer is “yes”/“no”?
image

It should help :slightly_smiling_face:

Regards,
Zeroqode Team

I’m not sure if my objective is the same as @randreas but it sounds similar. I’m looking for a way for one user to trigger an alert to a different user. Basically a messaging system.

@ZeroqodeSupport’s response - if I understand it correctly - shows how you might add a filter to determine in what circumstances the alert would show, but it doesn’t explain how the trigger process would work. How does an app know to show an alert to a user if they have not hit a button for example?

@gavin1,

Correct. The constraint, added to the plugin action, will determine when to show the alert when the condition = True. For the messaging functionality, you can set the following Event (example):
image

There can be quite a lot of different events, not necessarily on-click, to which you can “pin” the constraint “Only when” and then add the MyAlerts action.

I hope it helps :pray:
Zeroqode Team

1 Like

Thank you everyone for replying to this thread.

I will attempt to apply these methods and come back if I have any questions.

Thank you so much.

1 Like

Thanks @ZeroqodeSupport for this. I know it’s not directly related to your plugin, but I don’t quite understand the expression you’ve got in the ‘only when’ field.

I’ve not seen :first item used at the end of the ‘only when’. How does that expression give you a true or false to drive the actioning of the event?

Do you see what I mean? I would understand if it ended in ‘is yes’, but what does :first item do?

Will that trigger an alert to show if there is a new message created?

A Search for always returns a list - in this case, a list of booleans (yes/no data type). Even if there’s only 1 item in the list, it must be referenced explicitly. In this case, :first item refers to the first item in the list.

I get that. Sorry, this is so hard to explain in text.

My understanding is that an ‘only when’ expression needs to be boolean, so that it will trigger when true and not trigger when false.

in your screenshot, it looks to me like the expression is returning the first Message where the messageNew field is “Yes”. I don’t get how that gives a boolean result. Surely that results in a message not a true/false.

I would understand it if it was Search for Messagess’:first item’s messageNew is “yes”, assuming that messageNew was a yes/no field.

Would you be able to help me understand the difference, or am I completely misunderstanding?

Once again, I know this is bubble logic, not directly related to the plugin, but if I can work this out it will solve what I’ve been trying to do for weeks.

Thanks in advance.

Exactly. messageNew is a field of type Boolean in the Messages data type.

IOW, the search is looking up the value of the messageNew field for the first Message.

Correct. This “yes/no” in the messageNew is needed for displaying the notification “New message”. So, when the new message is read, it’s boolean changes to “no” and the notification disappears.
image

Regards,
Zeroqode Team

Ok. I think I get it. Thanks for your patience. Last question. Could you please show how the ‘Search for Messagess’ is composed. Are there any constraints or sorting?

@gavin1,

There is some sorting. If you’re interested, what the source of these screenshots - it’s our Linky template. :slightly_smiling_face:

I hope it will be useful for you.
Regards,
Zeroqode Team

Thanks

1 Like

I have not yet used the database change triggers but my understanding is that when data in the database changes you can set conditional logic to trigger a workflow. If that is the case then the following idea and logic should work to accomplish the goals set out by @gavin1 and @randreas

  1. When there is a new message created, in the same workflow that you are creating the new message, create a event to send the alert with conditional logic set so it fires if the intended recipient is logged in.

  2. On the user data type you should create a data field of boolean (yes/no) which will change from no to yes when they log in, and yes to no when they log out. Please note, this is not to check if they are logged in or not for the part 1…that is built into bubble by doing “current user is logged in” (however, your conditional will need to check based on message recipient and not current user). This part is to set up a workflow to trigger based on a database change.

Because if the user is not logged in for part 1 to occur, you need to send the message the next time they do log in, which is why you need the user data type to have the yes/no field for when they login and log out.

So the next time they login the field will change from no to yes, which you should use to trigger the workflow based on database change. That way the moment they log in the workflows are triggered and the alerts are sent.

I have not tested this, but it should work if you set up your conditionals correctly. I will try to remember to implement this idea in an app tomorrow and report if it works or not, but give it a try regardless of my reply or lack of.

1 Like