N
Novu7mo ago
San

Updating Message CTA Button status using TransactionId

I am sending notifications which contains CTA buttons (Approve and Reject) to multiple subscribers using topic So If one of the subscriber Approve it I want to remove the CTA buttons on other subscribers Can someone let me know how to achieve this behaviour For example: I have two subscribers A and B I sent a leave request notification to both A and B using topic named leave-request A approves the leave request using CTA button provided in the notification Now I want to hide the CTA buttons in B subscriber since the leave request is already been approved by subscriber A
10 Replies
empe
empe7mo ago
We are talking about an In-App notification - right?
San
San7mo ago
Yes @Emil
empe
empe7mo ago
So you are looking for a way to dynamically update the content of the notifications based on the actions taken by the subscribers. Interesting use case, checking.
San
San7mo ago
Yes Because in payroll systems we have admins with different roles and permission For example Admin (subscriber) can give permissions to the manager (subscriber) to approve the leave request So when manager approves the leave request sent by an employee we can hide the cta buttons for manager but I still see them for admin notifications which is not expected TransactionId is the only thing which is in common between them And as per Open Spec I can only delete message dynamically by using transactionId but I cannot update it (for example removing CTA buttons) @Emil
Novu_Bot
Novu_Bot7mo ago
@San, you just advanced to level 1!
San
San7mo ago
Any possible solutions please?
Pawan Jain
Pawan Jain7mo ago
Hi @San In Novu, once a message (step notification) is sent to subscriber (user), it can not be modified. In your case, you have added CTA action buttons, approve and reject. In UI, you will have to handle the click event on these buttons using code. checkout this documentation for this. So if user1 click on the approve button and you update the status of that event using above onActionClick handler in your backend. Again if user2 clicks on approve button, you can show popup saying that this is not allowed. Let me know if you have any questions.
San
San7mo ago
So you were saying we should handle it on our own and notification content cannot be changed based on the actions taken by other subscribers @Pawan Jain ? It would be more beneficial if we could customize notification content dynamically, adjusting it based on the actions of other subscribers within the same topic.
San
San7mo ago
Thanks
Want results from more Discord servers?
Add your server
More Posts
Not able to send subscriber email, first name and last name when using iFrameShould I include the first name, email, and last name in the API request for this issue?https://githAWS s3 self-hosted errorhello i have deployed novu self-hosted with an s3 bucket and i can't upload brand logo ,i get the erGot error after trying to use novu.broadcastI planned to use this method (https://docs.novu.co/api-reference/events/broadcast-event-to-all) to schanging trigger identifier throws workflow_not_found ErrorHello guys, I changed the Trigger Identifier on one of my notifications. When I try to run a testNew notifications not being received by the socket connectionI am using the listenNotificationReceive method from the @novu/headless package with react to listenAvoid subsequent initializations of notification centerHi! We have integrated the notification center in our vue 3 project. The problem we have is that in What do the job statuses mean in practice?Could someone please explain what the various job status mean in practice? E.g. pending, queued, delHow to migrate workflow data from uat-novu to prod-novu?Hey guys! My project has been in development phase, so novu is also deployed in uat environment. NowHow to send silent pushes using APNs provider?Hi everybody, hope you are all doing well! I use APNs provider to send pushes to iOS subscribers. AUpgrade to 0.21.0 via images—migrationsThanks for the new release to everyone involved. There has been other discussions on migrations but