Ignoring Saturdays and Sundays

Hi all,

I created a Process and I would like to put a Wait event with a duration of 3 days but I would like to ignore the week-end in this 3 days.

If the wait event start the Friday I would like that it stops wednesday.

Do you have a solution to do that?

Thank you for your help.

Best regards,

Parents
  • Hi Jerome

    Can you be little bit clear on your question so that i can help you. Sugar version you are working on, what Process you have created and what actually you want to do.

    Best Regards

    S Ramana Raju

  • Hello Jerome,

    I have not tested this but I think it will work for you...

    1. Create a custom field in the module called 'thisday' that has a calculated value of dayofweek(today()). This will return an integer value from 1 to 7 where 1=Monday. When a record is updated, the custom field will recalculate to the current day's number.
    2. In the process, put a gateway that reads the value of this field as follows.
      • Day= 1 or 2 >> Wait 3 days
      • Day= 7 >> Wait 4 days
      • outcome 3: (set this as the default flow, no criteria needed) >> Wait 5 days

    Note: Make sure in your process that the evaluation of 'thisday' occurs on the same day that the process begins

     {SugarClub Administrator Edit: We're sorry, but this image is no longer available}  

    Please let me know if this works for your use case.

    Best Regards,

    Jill

  • For anyone that may be looking for the solution to this, there is now a help article published that walks through this exact scenario in detail: Ignoring Weekends During Wait Events in SugarBPM. It includes .bpm files that you can import to a test instance to try out for yourself.


    -Brenda

  •  I think now you can just use the BusinessCentre capability - I have used it in BPM for Follow Up Dates on Cases.

  • Hi Greg, good point! You're right; business centers address most use cases dealing with business hours and are certainly a better option if they work for your use case, which they should for most. However, I can think of a few scenarios where you may not be able to use them:

    1. You aren't a Sell or Serve user.
    2. Your SLAs are defined in terms of business days, not business hours, and your business is open different hours every day. As a result, you can't do the calculations in terms of business hours (e.g. 1 business day = 8 business hours).
    3. Your use case is to count business days in the universal sense for typical business communications (i.e. Monday to Friday), not to count SLAs in terms of your service hours as defined by the particular record’s (e.g. the case's) assigned business center.

    With that said, it is a good point. The Overview section of the article has been updated to mention that business centers may be the preferred option if they work for your use case. Thanks for bringing it up!

Reply
  • Hi Greg, good point! You're right; business centers address most use cases dealing with business hours and are certainly a better option if they work for your use case, which they should for most. However, I can think of a few scenarios where you may not be able to use them:

    1. You aren't a Sell or Serve user.
    2. Your SLAs are defined in terms of business days, not business hours, and your business is open different hours every day. As a result, you can't do the calculations in terms of business hours (e.g. 1 business day = 8 business hours).
    3. Your use case is to count business days in the universal sense for typical business communications (i.e. Monday to Friday), not to count SLAs in terms of your service hours as defined by the particular record’s (e.g. the case's) assigned business center.

    With that said, it is a good point. The Overview section of the article has been updated to mention that business centers may be the preferred option if they work for your use case. Thanks for bringing it up!

Children