cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Odata filter expression on Customer Asset

Hello Everyone,

 

I need a flow that will validate an email-subject to a customer asset name. 

 

Example : 

 

Email subject : ROUTER ABCD down.

 

I want that Flow check if ABCD is a customer asset and if it is, to open a case on the right account associated to this asset. 

 

Regards!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

In the trigger, you do not want to use subject filter at all for your scenario unless you are getting other email as well, if this mailbox is dedicated to these emails then you would want to process them all.

 

I do something similar to extract an ID out of the email for example my subject is something like this:

 

"subject": "Re: Travel Quote Required #5",
 
i know that the ID is the last thing in the subject, and that it has a # in front of it. This way i can do a simple expression to grab the correct value:
 
last(split(triggerBody()?['Subject'],'#')) put this in a compose and then you can use the outputs in the filter. Are you able to modify the thing sending the email so that you can grab the correct value for the filter?
 
if you list all values without a filter is the value stored in msdyn_name ? I would do this first to make sure you get the correct variable to filter on, then it should be as simple as msdyn_name eq 'ABCD'

 

View solution in original post

7 REPLIES 7
Highlighted
Super User II
Super User II

How far have you gotten?

 

Where are the list of equipment stored? SharePoint list?

 

You can use odata query:

 

Asset eq 'ABCD'

 

you need to grab ABCD from the subject, i suggest you format the email maybe some it has a character around it so that you know 100% you are grabbing the correct value etc.

Highlighted

- The list of equipment is in Dynamic 365 Customer Asset

 

I would like the system to match the email subject defined field to the D365 Customer asset.

 

The Odata asset eq is not existing.

 

Result : "Could not find a property named 'asset' on type 'Microsoft.Dynamics.CRM.msdyn_customerasset'."
Highlighted

Hi,

 

I am sorry i have not done anything with D365 but, the first thing you will need to do is figure out the field name.

 

looks like perhaps it is: msdyn_name

Highlighted

You can view what I am trying to accomplish here.

 

https://youtu.be/DWb0HYHdYOg

Highlighted

In the trigger, you do not want to use subject filter at all for your scenario unless you are getting other email as well, if this mailbox is dedicated to these emails then you would want to process them all.

 

I do something similar to extract an ID out of the email for example my subject is something like this:

 

"subject": "Re: Travel Quote Required #5",
 
i know that the ID is the last thing in the subject, and that it has a # in front of it. This way i can do a simple expression to grab the correct value:
 
last(split(triggerBody()?['Subject'],'#')) put this in a compose and then you can use the outputs in the filter. Are you able to modify the thing sending the email so that you can grab the correct value for the filter?
 
if you list all values without a filter is the value stored in msdyn_name ? I would do this first to make sure you get the correct variable to filter on, then it should be as simple as msdyn_name eq 'ABCD'

 

View solution in original post

Highlighted

Yep that’s what I always do. Works like a charm.

-Josh




Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Highlighted

I guess it would work if my Message Id would increment and not if the subject is always the same. Since I can get the same alert 1000 time, it says "record already exist". therefor Message Id is not right But......................

 

I used your expression into my msdyn_name  expression and it works great. 

 

Thanks alot! 

 

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 (4,722)