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

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

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.

 

Highlighted
Regular Visitor

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

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.

 

Solution Sage
Solution Sage

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

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
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (4,447)