cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Case creation in Salesforce with related Contact - two Cases are created instead of one

I have setup a Flow that triggers when a email is hitting an inbox folder. (Trying to mimic Email-to-Case)

The email information should be converted into an Case in salesforce.

If the emails sender is a Contact in salesforce, the contact should be associated with the Case.

 

Within the flow, I use the "Get records" to call the Contact object. Next step, I create a case, where I apply the Contact. The Contact should only be applied if the email, is matching a Contact.

 

If the Contact is available, both a Case with the Contact and a Case without the Contact is created. Only one Case should be created. I have tried with an condition after querying the Contact object, but have not been able to avoid this double creation.

 

Flow Configuration.PNG

3 REPLIES 3
Highlighted
Solution Sage
Solution Sage

Hi @Andreas4 ,

From you discription, I am afraid the 'Get records' action has got two records.

Please check the Running result to check whether the action has got two records.

If so, the 'apply to each' action will create two records.

I suggest you use the 'Filter arrary' to get the record you want.

Sorry for that I don't has the permisssion to use 'Salesforce' connector.

I have made a test with a similar action.

Capture5.PNG

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

hi @v-zhos-msft 

Thanks for responding to my question.

It seems like i have old Flow running in the back ground. That creates the duplicate record.

I cannot identify the flow in the backend. Looks like there are one, at the connector level. But I get an error message when I click on it. I might not have the proper permissions to perform the action.

 

Highlighted

Hi @Andreas4 ,

I suggest you check the running result of the flow.

Via the filter, how many records did the flow get?

If the flow return multiple records, in the apply to each the flow will create record multiple times.

Capture7.PNG

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (10,984)