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
  • Develop a daily scheduled job that loops through the records and sets a flag if the criteria are met

    Can a BPM be configured to set the flag instead of a scheduled job?

  • Here is the one example from our Sugar implementation experience:

    1. Create a Note with the subject "Perpetual daily scan"
    a) setup  start operator for Process definition to run on that note is created
    b) add call LB Service in the Process Definition
    c) add with the Wait element workflow, set it to wait for 1 day (hour, month, whatever cycle is needed) and make an infinite loop, so that the Process became perpetual and run according to the cycle 

    2. Draw a Logic Builder flowchart as the implementation of the LB Service was mentioned in the Process Definition
     a) set criterion, e.g. "Check all accounts that have related meetings held within timeframe" - literally express the criteria 
     b) implement data transformation along with data manipulation/external calls etc e.g. "for each account found according to the criteria, calculate smth, make external API call, send Email,  or create related or non-related records"
     c) deploy flowchart implementation zip into Sugar with Module Loader

    This allows to benefit from the perpetual daily/monthly/hourly/ect data scan performed by SugarBPM for processing let's say thousands of accounts in a single operation instead of creating thousands of processes per each account - and that all is achievable no code 

    I'll make an example on ootb sandbox

    Best Regards,
    Dmytro Chupylka

    integroscrm.com
    We make work in Sugar CRM system faster, more convenient and efficient

Reply
  • Here is the one example from our Sugar implementation experience:

    1. Create a Note with the subject "Perpetual daily scan"
    a) setup  start operator for Process definition to run on that note is created
    b) add call LB Service in the Process Definition
    c) add with the Wait element workflow, set it to wait for 1 day (hour, month, whatever cycle is needed) and make an infinite loop, so that the Process became perpetual and run according to the cycle 

    2. Draw a Logic Builder flowchart as the implementation of the LB Service was mentioned in the Process Definition
     a) set criterion, e.g. "Check all accounts that have related meetings held within timeframe" - literally express the criteria 
     b) implement data transformation along with data manipulation/external calls etc e.g. "for each account found according to the criteria, calculate smth, make external API call, send Email,  or create related or non-related records"
     c) deploy flowchart implementation zip into Sugar with Module Loader

    This allows to benefit from the perpetual daily/monthly/hourly/ect data scan performed by SugarBPM for processing let's say thousands of accounts in a single operation instead of creating thousands of processes per each account - and that all is achievable no code 

    I'll make an example on ootb sandbox

    Best Regards,
    Dmytro Chupylka

    integroscrm.com
    We make work in Sugar CRM system faster, more convenient and efficient

Children
No Data