Implement a "watchlist" feature

A Score Level 1

Hello everyone,

Our client asked for a requirement where we should allow our users to subscribe to a "watchlist", allowing a user to click and be aware of any kind of changes that occur on a specific object and receive a notification (email, mobile...) whenever the object suffers any change.

What would be the best way to accomplish this? Does Appian support this function OOTB? I couldn't find any information regarding this process.

Kind regards

  Discussion posts and replies are publicly visible

  • When you say 'specific object' are you referring to an Appian object or something such as a row in the database?

  • 0
    A Score Level 1
    in reply to Danny Verb

    Hello Danny,

    In this case, we will be working with data from the database.

    Let's say for example that I have an Appian Site that allows a user to see All Orders created in our database.

    Our goal is to allow a user to click on a button and to watch/unwatch all changes made to that specific order.

    For example, let's say that user A creates the order, while user B changes the order status. We want to be able for User " to be a watcher of all changes made into this order and to un-watch whenever the user desires to.

    Do you think this is possible to implement in Appian? Kind regards

  • +1
    Certified Lead Developer
    in reply to Marta

    It shouldn't be too hard to implement something like this, but it will need to be done manually i.e. via your own custom business logic, process models, and helper DB tables.  I don't know of any out-of-box functionality or pre-built templates that would help you in avoiding any of this manual development, though.

  • Yea, nothing really OOTB that will handle the requirement fully, natively, but it is definitely doable with OOTB components.  Really only need one global "watchers" record that is populated/unpopulated via related actions, containing the record type and ID being watched, and the employee account identifier.  Then during edits, you check this for any watchers of that record type/ID, and notify them. 

    Additionally, in case you haven't utilized the CDT Diff Utilities plugin yet, I've used the plugin's cdtdifference() function to build a "Change Log" that we use in our environment across different records.  It has proven to be much much easier (almost infinitely) to use this function and populate a change log table, than to manually calculate on each edit form, which fields have been updated one by one, yadda yadda.  Then users will have a view of what changed when, by who, what the old and new values were/are, etc.  And you can build this to be shared across your other records for future use.

  • 0
    Certified Lead Developer

    I think that this could be easily implemented if your "Object" happens to be a record.  You just have to include a "Follow" and "Unfollow" related action on records, and then make sure all of your Record Related Actions that modify the record also send an email (MNI that) for each user on the "followers" list for that record.

    In the backend, I think the best way to implement that would be a FOLLOWERS lookup table that has a user ID foreign key and a record ID foreign key, exactly as Chris said.  You can either have a different FOLLOWERS for each record you want to be followed, or you'd have to go through a few shenanigans to use one global table to join to all the different tables, though after so many you'd have to do it that way to keep your sanity.