Using 7.10.7
Test case: Case update notification
setup :
- create 5 users with different email address: contact, modified, created, assigned, and admin
- create work flow call it “case update” with run : only on save, no repeat runs, workflow module:case updates, run on:new records, no conditions, 5 actions with
action:send email, with each action use different email:
to email:admin,
to related field:contacts:contact,
to related field:users: created by,
to related field: users:modified by,
to related field: assigned to.
Action:
- login as “created”, create account called “account”, create case under account “account”, assigned it to user “assigned”, logout
- login as “modified” user, update the same case created in step 1.
Results:
- received 3 emails to “modified” email
- received email to “admin”
- email failed to send to “contact”
Expected:
- receive email to user “modified”
- receive email to user “assigned”
- received email to user “created”
- received email to user “admin”
- receive email to user “contact”
1 & 4 worked, 5 failed, 2 & 3 sent to wrong email address
Wow, that is confusing :huh:
I don’t think your user names are a good idea. You don’t need to send to users, so you don’t need users with those names. You can simply send to the different emails. Users are people, not email addresses.
You don’t get anything for “Contact” if you don’t associate the Case with a Contact.
If you don’t tick “Repeated runs”, this will only send once for each case.
I think what you really want is this:
5 workflows, each has a condition on to differentiate whether the event done on the Case is a change, a creation, etc. Then each workflow sends only one email to the right mailbox.
Tried it again.
Using 7.10.7
Test case name: Case update notification emails
Test case description: A major feature of CRM is email notifications when a case is updated. The stakeholders of a case are: who created it, assigned to it, it’s contact, who modifed it, and system admin.
CRM requirement: A case update should result in emails sent to users:
- The user who modified it
- The user who created it on the first place
- The user who assigned to the case
- The user who case contact
- The admin
setup :
-
create 5 users with different email addresses: user_contact, user_modifier, user_creator, user_assigned, and user_admin
-
create 5 workflows, all with run:only on save, no repeat runs, workflow module:case updates, run on:new records, no conditions, same email template, and 1 action.
action:send email, with each action use different to selection:
workflow_modifier : to related field: users:modified by name,
workflow_created : to related field: users:created by,
workflow_assigned : to related field: users:assigned to.
workflow_contact : to related field: contacts:contact,
workflow_admin : to email:admin,
-
login as “user_creator”, create account called “account”, create case “case” under account “account”, then associated the case with contact by creating contact under the case “case” use user_contact email as default primary email, now assigned it to user “user_assigned”, logout
Action
- login as “user_modifer” user, update the same case created in step 1 with text “hello” and press submit.
Results:
- CRM sent 3 emails to “user_modifier” email
- CRM sent email to “user_admin”
- CRM failed to send to “user_contact”
Expected:
- receive email to user_modifier
- receive email to user_assigned
- received email to user_creator
- received email to user_admin
- receive email to user_contact
1 & 4 worked, 5 failed, 2 & 3 sent to wrong email address
Workflows audit:
Workflow_modifier, process audit: Record:hello, status:complete, Assigned to: user_modifier
Workflow_creator, process audit: Record:hello, status:complete, Assigned to: user_modifier
Workflow_assigned, process audit: Record:hello, status:complete, Assigned to: user_modifier
Workflow_contact, process audit: Record:hello, status:failed, Assigned to: user_modifier
Case history:
Email sent to user_admin
Email sent to modifier
Email sent to modifier
Email sent to modifier
Email sent to modifier
You’re sending to the user who created or modified the Workflow, not the Case!
- don’t create these special users at all
- when you’re sending the email in the workflow, use email addresses directly like joe@gmail.com
- log in with a normal user when doing your changes, this shouldn’t matter
- turn on repeated runs for all workflows
- unless you want 5 emails for every state change, each workflow should have a condition so that it runs only for the appropriate state change. So the assignment would be sent out only to the assignments email (if this is what you want).
Note that there is a checkbox to turn on/off assigment emails in Admin / Email settings, one of your emails could be coming from this, not from the Wrokflow.
I am not sure I follow your comments.
You’re sending to the user who created or modified the Workflow, not the Case!
Below is the user manual definition of workflow “related field”, are you saying Related Field is about the workflow and not the module (case update)?
Related Field – This will send an email to the primary email address specified on a related modules record. In this case you must specify the related module (From a drop down list) and the email template.
- don’t create these special users at all
- when you’re sending the email in the workflow, use email addresses directly like joe@gmail.com
If you use direct emails in workflow then how that will work with other records with same module (case updates)? Are suggesting creating on workflow per each case?
- log in with a normal user when doing your changes, this shouldn’t matter
- turn on repeated runs for all workflows
- unless you want 5 emails for every state change, each workflow should have a condition so that it runs only for the appropriate state change. So the assignment would be sent out only to the assignments email (if this is what you want).
We do want these 5 emails sent to correct emails every time case is updated (that is the test case we are testing)
Note that there is a checkbox to turn on/off assigment emails in Admin / Email settings, one of your emails could be coming from this, not from the Wrokflow.
I believe that is for when a case is assigned not when updated, right?
Sorry, it is probably me, I think was misunderstanding your requirement. Let me think about this tomorrow.