Date and age-based alerts: SugarBPM or scheduled job?

Hello Sugar lovers!

We're getting more and more requirements to perform actions after a date or age has been reached: sleeping opportunities, renewal reminders, escalate accounts without activity... These generally cannot be solved by a report (dashboard or scheduled) since the reporting engine does not allow calculations (eg days before renewal, age since last contact...). 

My first intuition sent me towards a simple BPM with an event-based gateway and/or wait event (no dependency on a developer resource, easily maintainable), but: 

  1. Once the process has started and is "waiting", a priori you can't change the "alert" date, for instance if a contract start date changes (for whatever reason), the delay is recalculated, or any other criteria changes. Can you? 
  2. This will create a waiting process instance for each and every record until it is "closed". AFAIK these processes are polled every minute, which could take a massive hit on performance after a while. Is that correct? 

So what we generally do is:

  1. Develop a daily scheduled job that loops through the records and sets a flag if the criteria are met
  2. Design a BPM that is triggered on the flag change and that performs the necessary actions (sending an email etc)

This works, but any change in the criteria requires code-level modifications (+packaging, deployment...). 

I'd live to read your view on this!

Cheers,

Damien

Parents
  • Hi Damien,

    we often faced the same issue with many of our customers.

    According to your BPM question, 

    1. in order to solve this, you must define a race between the waiting event AND the trigger field is updated
    2. not really because Sugar will evaluate only the processes with the "next action date" that is reached.

    To improve / facilitate the BPM time management processes but also bring in the possibility to trigger event based on "anniversary", we developped a custom module to trigger date-based events.

    The idea is quite simple : you create as many date trigger definition that will identify the matching records, according to the time based comparison you defined (and if required additionnal SQL filters). Then, when the condition is met, you update the data in a record field of your own (custom or core field), to display the info or to use inside your BPM (and simplify the wait / date field is updated race with a basic wait for a value in this field condition).

    Here is a sample of the configuration screen.

    As for the Sugar BPM, a cron job will then evaluate the actives date trigger definition to identify the corresponding records (so low charge for the server).

    This add-on is also useful when you need to apply a date-based process on existing records.

    If you want more detailled, contact me and we can scheduled a quick demo.

    Have a good day.

    Fred 

Reply
  • Hi Damien,

    we often faced the same issue with many of our customers.

    According to your BPM question, 

    1. in order to solve this, you must define a race between the waiting event AND the trigger field is updated
    2. not really because Sugar will evaluate only the processes with the "next action date" that is reached.

    To improve / facilitate the BPM time management processes but also bring in the possibility to trigger event based on "anniversary", we developped a custom module to trigger date-based events.

    The idea is quite simple : you create as many date trigger definition that will identify the matching records, according to the time based comparison you defined (and if required additionnal SQL filters). Then, when the condition is met, you update the data in a record field of your own (custom or core field), to display the info or to use inside your BPM (and simplify the wait / date field is updated race with a basic wait for a value in this field condition).

    Here is a sample of the configuration screen.

    As for the Sugar BPM, a cron job will then evaluate the actives date trigger definition to identify the corresponding records (so low charge for the server).

    This add-on is also useful when you need to apply a date-based process on existing records.

    If you want more detailled, contact me and we can scheduled a quick demo.

    Have a good day.

    Fred 

Children