0

I have working to convert the workflow into flow. But am stuck with connecting the parent and child objects which was email and case on while creating the flow.

Am not aware how to connect these two objects to trigger the flow. I tried to lookup with RelatedtoID and ID . But it does not work. Am not sure, where I done the mistake. Could anyone please guide me for the below scenario.

Objects : Case and email message.

Scenario:

The scenario was, whenever the email To address is equals to [email protected] (sample) the case object fields of Owner ID , Source, Mail received dates are need to update automatically.

Condition : (Object : email ) Email message = [email protected]

Update values : ( Object : Case) Owner ID : Sample queue, Source : Letter/mail, Mail received date : Today’s date, Contact Date : NULL

enter image description here enter image description here enter image description here enter image description here

2
  • Your Flow is triggered by EmailMessage. If I understand correctly, you want to update a Case. So why do you fetch an EmailMessage in the GetRecords element? Should you not fetch a Case based on the incoming EmailMessage? If you only want to treat certain email addresses, I'd add this to the "Entry Condition" of the Start element of the Flow, not in the GetRecords element. Finally, don't you lack an UpdateRecords element?! Jun 13, 2022 at 17:54
  • Yes. You are correct. I need to update the case fields. And I have wrongly fetch an GetRecords. Now I have modified that with case and filter with (ID = RecordID ). Also I have add the entry condition to treat certain email address ([email protected]). Additionally I added another GetRecord for get the queue name from the group object to fetch that queue name into Owner ID . Finally I have added decision step with (CaseID does not equal to Empty string (Not Null) ) and Update records to set the values as per requirement. But still my flow was not triggered and am not get the result.
    – ajmal khan
    Jun 13, 2022 at 19:28

1 Answer 1

1

Try with below flow steps.

  1. you need to check the condition the starting element.

Set Entry Conditions

emailToaddress = [email protected]

Optimize the Flow for:

Actions and Related Records

Refer the below screenshot: enter image description here

  1. You can use update records element to update the case fields.

How to Find Records to Update and Set Their Values

Specify conditions to identify records, and set fields individually

Update Records of This Object Type

Case

Filter Case Records:

ID = $Record > Case ID

here $Record means emailMessage record

Set Field Values for the Case Records:

ownerid = queueId

SourceId = $Record

Email Message ID Mail received date = today date

Contact Date = NULL

Refer the below screenshot for your reference. enter image description here

Final flow output screenshot:

enter image description here

1
  • Thanks a lot Ankaiah Bandi for your great guidance. It works now.
    – ajmal khan
    Jun 14, 2022 at 18:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .