Menu
Welcome, Guest
Username: Password: Remember me
Support for Advanced Open Workflow, Sales, Portal for SugarCRM Community Edition
  • Page:
  • 1
  • 2

TOPIC: Create task reminder with workflow 1 minute before duedate & duetime

Create task reminder with workflow 1 minute before duedate & duetime 3 years 8 months ago #26588

  • stephanie32
  • stephanie32's Avatar
  • Offline
  • Junior Member
  • Posts: 28
  • Karma: 0
* I would like to get an email notification 1 minute before de task is due. I don't seem to get this what am I doing wrong? See attachement.

It works only when I put the date on today. Then I get notifications about all taks due for today at the same time. But this is not what I want.


* Furthermore I would like to put a link in the notification-mail, so people can immediately click the link and go to that task directly.

Really appreciate it if someone can help me with this!

Regards, Stephanie
Attachments:
The administrator has disabled public write access.

Create task reminder with workflow 1 minute before duedate & duetime 3 years 8 months ago #26642

  • stephanie32
  • stephanie32's Avatar
  • Offline
  • Junior Member
  • Posts: 28
  • Karma: 0
Anyone can help me with this?
The administrator has disabled public write access.

Create task reminder with workflow 1 minute before duedate & duetime 3 years 8 months ago #26656

  • amariussi
  • amariussi's Avatar
  • Offline
  • SuiteCRM Is My Life
  • Posts: 1313
  • Thank you received: 290
  • Karma: 66
Have a look at the following post and read the examples I posted to understand the logic behind.
suitecrm.com/forum/suitecrm-7-0-discussi...-date-now-mean#20710

Basically you should have only one condition and it should be something like:

due date <= now + 1 minute
However this may not work perfectly depending on the interval at which yoiu have set your cron jobs: if the interval is more that 1 minute (for example 5 minutes), the workflow may fire up to 4 minutes after the moment you were expecting it to fire!



To make it easier to go straight to the point, this is the part I refer to in that post:



a. We have a field called Due_Date and it is set at an imaginary date 15
b. Today is day 0
c. We want to create a workflow to send a reminder 10 days before Due_Date
d. We want to create a workflow to send a message 3 days after Due_Date

For Workflow c. we set our condition: Due_Date <= now + 10 days
. Since today is 0 the condition will evaluate to Due_Date (=15) <= now (=0) + 10 (=10). This statement (15 <= 0+10) evaluates to false so the action is not activated
Tomorrow now will be equal to 1 so the condition will evaluate to 15<= 1+ 10 which is FALSE
The day after tomorrow now will be equal to 2 so the condition will evaluate to 15<= 2 + 10 which is FALSE
After one more day now will be equal to 3 so the condition will evaluate to 15<= 3 + 10 which is FALSE
After one more day now will be equal to 4 so the condition will evaluate to 15<= 4 + 10 which is FALSE
After one more day now will be equal to 5 so the condition will evaluate to 15<= 5 + 10 which is TRUE so our workflow will trigger the action!

For Workflow d. we set our condition: Due_Date <= now - 3 days
We start over from the beginning so today is back to 0 so the condition will evaluate to Due_Date (=15) <= now (=0) - 3 (=3). This statement (15 <= 0 - 3) evaluates to FALSE so the action is not activated
Tomorrow now will be equal to 1 so the condition will evaluate to 15 <= 1 - 3 (=-2) which is FALSE
The day after tomorrow now will be equal to 2 so the condition will evaluate to 15 <= 2 - 3 (=-1) which is FALSE
After one more day now will be equal to 3 so the condition will evaluate to 15<= 3 - 3 (=0) which is FALSE
After one more day now will be equal to 4 so the condition will evaluate to 15<= 4 - 3 (=1) which is FALSE
After one more day now will be equal to 5 so the condition will evaluate to 15<= 5 - 3 (=2) which is FALSE
After one more day now will be equal to 6 so the condition will evaluate to 15<= 6 - 3 (=3) which is FALSE
After one more day now will be equal to 7 so the condition will evaluate to 15<= 7 - 3 (=4) which is FALSE
After one more day now will be equal to 8 so the condition will evaluate to 15<= 8 - 3 (=5) which is FALSE
After one more day now will be equal to 9 so the condition will evaluate to 15<= 9 - 3 (=6) which is FALSE
After one more day now will be equal to 10 so the condition will evaluate to 15<= 10 - 3 (=7) which is FALSE
After one more day now will be equal to 11 so the condition will evaluate to 15<= 11 - 3 (=8 ) which is FALSE
After one more day now will be equal to 12 so the condition will evaluate to 15<= 12- 3 (=9) which is FALSE
After one more day now will be equal to 13 so the condition will evaluate to 15<= 13- 3 (=10) which is FALSE
After one more day now will be equal to 14 so the condition will evaluate to 15<= 14- 3 (=11) which is FALSE
After one more day now will be equal to 15 so the condition will evaluate to 15<= 15 - 3 (=12) which is FALSE (by the way this is the Due_Date but the workflow is not activated yet!)
After one more day now will be equal to 16 so the condition will evaluate to 15<= 16 - 3 (=13) which is FALSE
After one more day now will be equal to 17 so the condition will evaluate to 15<= 17 - 3 (=14) which is FALSE
After one more day now will be equal to 18 so the condition will evaluate to 15<= 18 - 3 (=15) which is TRUE so the worflow will trigger the action

Sorry for being so long but I hope you understood the logic of using Now and a due date.
Now obviously refers to the date in which the workflow is run. This happens everytime the cronjob runs the workflow task.

I hope this was useful to clarify your purpose.
The administrator has disabled public write access.

Create task reminder with workflow 1 minute before duedate & duetime 3 years 8 months ago #26657

  • stephanie32
  • stephanie32's Avatar
  • Offline
  • Junior Member
  • Posts: 28
  • Karma: 0
Yes , I already saw that post but it didn't help me. The cronjob is installed for every minute and as you can see I already set a condition like you said. When you look at my screenshot. :(
The administrator has disabled public write access.

Create task reminder with workflow 1 minute before duedate & duetime 3 years 8 months ago #26658

  • stephanie32
  • stephanie32's Avatar
  • Offline
  • Junior Member
  • Posts: 28
  • Karma: 0
Do you maybe have teamviewer? Than you can see it.

Regards, Stephanie
The administrator has disabled public write access.

Create task reminder with workflow 1 minute before duedate & duetime 3 years 8 months ago #26676

  • amariussi
  • amariussi's Avatar
  • Offline
  • SuiteCRM Is My Life
  • Posts: 1313
  • Thank you received: 290
  • Karma: 66
Your conditions are not correct. you have minus (-) one minute while you should have plus (+) one minute.

You also have a second condition, which I assume is there because you don't want to trigger the action on old items
The administrator has disabled public write access.

Create task reminder with workflow 1 minute before duedate & duetime 3 years 8 months ago #26677

  • amariussi
  • amariussi's Avatar
  • Offline
  • SuiteCRM Is My Life
  • Posts: 1313
  • Thank you received: 290
  • Karma: 66
TeamViewer: if necessary I can install the free version!
The administrator has disabled public write access.

Create task reminder with workflow 1 minute before duedate & duetime 3 years 8 months ago #26679

  • stephanie32
  • stephanie32's Avatar
  • Offline
  • Junior Member
  • Posts: 28
  • Karma: 0
Yes I also have the free version! If you can do that then I would really appreciate it! How do we keep contact?
The administrator has disabled public write access.

Create task reminder with workflow 1 minute before duedate & duetime 3 years 8 months ago #26680

  • stephanie32
  • stephanie32's Avatar
  • Offline
  • Junior Member
  • Posts: 28
  • Karma: 0
I did it now with +1 minute. But I already tried that many times I think.

Yes the second condition is because I don't want to receive all notifications of the whole last year.
Attachments:
The administrator has disabled public write access.

Create task reminder with workflow 1 minute before duedate & duetime 3 years 8 months ago #26681

  • stephanie32
  • stephanie32's Avatar
  • Offline
  • Junior Member
  • Posts: 28
  • Karma: 0
When I create a taks I immediately get a notification. That is not what I want. I want to receive the notification only 1 minute before the due-time.
The administrator has disabled public write access.

Create task reminder with workflow 1 minute before duedate & duetime 3 years 8 months ago #26688

  • amariussi
  • amariussi's Avatar
  • Offline
  • SuiteCRM Is My Life
  • Posts: 1313
  • Thank you received: 290
  • Karma: 66
I am not sure if the two conditions are evaluated with an OR, or an AND.

If it's OR the Workflow will always fire. So, just for testing purposes, you could try removing the condition in which you test the fixed past date (Due Date > 16/12) I think that's where the problem is!. However this will fire on all records that meet the 1 minute condition (all those for which the due date has already occurred) so you should send the message to a dummy email.
The administrator has disabled public write access.

Create task reminder with workflow 1 minute before duedate & duetime 3 years 8 months ago #26689

  • stephanie32
  • stephanie32's Avatar
  • Offline
  • Junior Member
  • Posts: 28
  • Karma: 0
I understand what you are saying. When you try this workflow (1 minute before due-time) does it work with you?
I don't know how to send it to a dummy email.
It will send all notifications then to all the users that are related to the record.

Thank you for helping!
The administrator has disabled public write access.

Create task reminder with workflow 1 minute before duedate & duetime 3 years 8 months ago #26698

  • mikebeck
  • mikebeck's Avatar
  • Offline
  • SuiteCRM Is My Life
  • Posts: 1078
  • Thank you received: 207
  • Karma: 40
I've tested too this feature withut success, even I messed arround with time zones if that was an issue, because remember that every time and date is stored in UTC and according to your time zone it shows differently.

If this is fixed, for your second question you just need to make an email template and add this line of code in the body of the email
http://{yourdomain}/index.php?module=Tasks&action=DetailView&record=$task_id

where the variable $task_id is the ID of the current task that you're sending mail from, and that link is to open it.

regards

mikebeck
Check your logs and permissions
The administrator has disabled public write access.

Create task reminder with workflow 1 minute before duedate & duetime 3 years 8 months ago #26752

  • amariussi
  • amariussi's Avatar
  • Offline
  • SuiteCRM Is My Life
  • Posts: 1313
  • Thank you received: 290
  • Karma: 66
Hi Stephanie,

I did a test with only one condition and it works fine for me.

To test with a dummy email you may enter a specific email address in the action. In this way you can check at least if your workflow is triggered correctly.

If it works you have to update the workflow and put the correct email. However, when you do this, I am not sure waht will happen (will it send for only the new tasks or also for past tasks even though it has sent it to the dummy email address?)

Alternatively you could create a scheduler that runs continuously, but to do this you need to have programming knowledge (not very complicated though).

You can start having a look here:
github.com/audoxcl/SugarCRMSchedulers

If you need help let me know
The administrator has disabled public write access.

Create task reminder with workflow 1 minute before duedate & duetime 3 years 7 months ago #26775

  • stephanie32
  • stephanie32's Avatar
  • Offline
  • Junior Member
  • Posts: 28
  • Karma: 0
Hi Karma,

Thank you so much for helping me and make time for it! I really appreciate it!
Can you make a screenshot how it looks like in your workflow? Then I know for sure how you put in the dummy mail.

I am going to try it now!


Have a nice evening!

Regards,
Stephanie
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.040 seconds
Powered by Kunena Forum