Skip to Content Skip to Menu

Auto action to create notification usecase

  • liaskas
  • liaskas
  • OFFLINE
  • Posts: 382
  • Thanks: 36
  • Karma: 2
  • Add-ons
6 years 9 months ago #300672 by liaskas
Hello and my best wishes for a happy new year.

We are trying to find a way, so that the receiver of a connection request, to have a notification.

Currently the sender of the connection request is receiving a notification (globe menu item modal), when the connection is accepted.

Global Tab:
Triggers: "onAfterAcceptConnection" "onAfterAddConnection"

Conditions Tab:
Value: [cb:if trigger="onAfterAcceptConnection"]0[cb:else][var3][/cb:else][/cb:if]
Operator: Not Equal To
Value: 1

Action Tab:
Mode: Notification
Method: Create
Published:
Asset: profile.[var2].connection
Owner: [var1]
Date: now
Load: By asset and Owner

The above works fine when connection request is accepted!

But what we need is... the connection request receiver to be notified about the request like it works on facebook.

Please be so kind to give us a solution.

Thank you in advance.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 9 months ago #300680 by krileon
Replied by krileon on topic Auto action to create notification usecase
There's no notification handling for connection requests. Meaning the title/message won't dynamically generate and output at time of display based off the status of the connection request. That'll be added in a future build release of CB Activity as noted below.

forge.joomlapolis.com/issues/6950

You can use the below to try and be compatible with the future implementation of this.

Global
Triggers: onAfterAddConnection
Type: CB Activity
User: Automatic
Access: Everybody
Action
Mode: Notification
Method: Create
Asset: profile.[var1].connection.[var2][cb:if var3="1"].pending[/cb:if]
Title: [cb:if var3="1"]has sent you a connection request[/cb:if]
Owner: [var1]
User: [var2]
Date: now
Load: By Asset, Owner, and User

Global
Triggers: onAfterAcceptConnection
Type: CB Activity
User: Automatic
Access: Everybody
Action
Mode: Notification
Method: Create
Asset: profile.[var1].connection.[var2].accepted
Title: has accepted your connection request
Owner: [var1]
User: [var2]
Date: now
Load: By Asset, Owner, and User

Global
Triggers: onAfterDenyConnection
Type: CB Activity
User: Automatic
Access: Everybody
Action
Mode: Notification
Method: Create
Asset: profile.[var1].connection.[var2].rejected
Title: has rejected your connection request
Owner: [var1]
User: [var2]
Date: now
Load: By Asset, Owner, and User

That should handle creating notifications either accepted or pending state. It's likely the core activity parsing will override the title though since that parsing doesn't handle the various states of connection requests at this time. New builds for CB Activity, GJ, and CB Gallery are planned ASAP to improve their notification parsing though. I may have var1 and var2 backwards in either of the above. I don't know at this time as I have yet to test implementation of those notifications.


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 or Create an account to join the conversation.

  • liaskas
  • liaskas
  • OFFLINE
  • Posts: 382
  • Thanks: 36
  • Karma: 2
  • Add-ons
6 years 9 months ago #300689 by liaskas
Replied by liaskas on topic Auto action to create notification usecase
Thank you Krileon for your reply.

Just tested the following...

Global
Triggers: onAfterAddConnection
Type: CB Activity
User: Automatic
Access: Everybody
Action
Mode: Notification
Method: Create
Asset: profile.[var1].connection.[var2][cb:if var3="1"].pending[/cb:if]
Title: [cb:if var3="1"]has sent you a connection request[/cb:if]
Owner: [var1]
User: [var2]
Date: now
Load: By Asset, Owner, and User


And what i get on the receiver notification modal is...

(connection request sender user username)
is now connected with
(connection request sender user username)
6 minutes ago

Yes... both are (connection request sender user).

Please advise.

Thank you again

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 9 months ago #300702 by krileon
Replied by krileon on topic Auto action to create notification usecase
I don't have anything further to suggest. The core activity parsing for connections does not handle the connection state yet. You'd have to use an entirely different asset, which will not be compatible with the core activity connection state handling once implemented. For example the below will skip the core activity parsing.

profile.[var1].conn.[var2][cb:if var3="1"].pending[/cb:if]
profile.[var1].conn.[var2].accepted
profile.[var1].conn.[var2].rejected


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum