Print this page

Update Count of Email Messages sent and Received on Cases

Knowledge Article Number 000213985
Description To updates case object fields based on Email Messages sent or received, we would need to create 2 workflow rules using the object "Email Message".
Resolution
  • Create 2 fields on Cases.
  1. ​"Number of Messages Sent" - This will store the number of emails sent on a particular case.
  2. ​"Number of Messages Received" - This will store the number of emails received on a particular case.
  • ​Create two separate workflow rules :
    • ​For an Email Message sent from the Case record:
       
      1. Create workflow rule selecting the following object "Email Message".
      2. Rule Name i.e:"Email message sent".
      3. Evaluation Criteria "Evaluate the rule when a record is created, and any time it’s edited to subsequently meet criteria".
      4. Rule Criteria: "Email Message Status - EQUALS - Sent.
      5. Create an Immediate Workflow Actions with the Field Update Detail set as:
      - "Object:Email Message".
      -"Field to Update: Case: Number of Messages Sent".
      -Use a formula to update this field : 
      IF(ISBLANK(Parent.Number_of_Messages_Sent), 1, Parent.Number_of_Messages_Sent+1)
  • For an Email Message received (Reply from Customer)
     
    1. Create workflow rule selecting the following object "Email Message".
    2. Rule Name i.e:"Email message received".
    3. Evaluation Criteria"Evaluate the rule when a record is created, and any time it’s edited to subsequently meet criteria".
    4. Rule Criteria: (Email Message: Is Incoming - EQUALS - True) AND (Email Message: Status - EQUALS - New)
    5. Create an Immediate Workflow Actions with the Field Update Detail set as:
    - "Object:Email Message".
    -"Field to Update: Case: Number of Messages Received".
    -Use a formula to update this field : 
    IF(ISBLANK(Parent.Number_of_Messages_Received), 1, Parent.Number_of_Messages_Received+1)

     
  • Note: Email Message object will only appear on Workflows if Email-to-Case or On-Demand Email-to-Case is enabled. This is applicable to Case object only




promote demote