cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Andreas4
Level: Powered On

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
v-zhos-msft
Level 10

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.

 

Andreas4
Level: Powered On

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.

 

v-zhos-msft
Level 10

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (6,029)