Skip to main content

Hi there , 

I am trying to figure out the best way to keep users from putting any internal mailbox addresses in the to/cc field when they are replying to the client or forwarding the new email cases to other internal teams. We have separate process to transfer cases to the other teams (Via screen flow). However, I am still seeing the examples where users are putting the mailbox addresses in the to/cc fields. 

 

There is now a flow that throw out the custom error when users put any internal team address in the field. The starting object is Email Message. All the email-to-case mailbox addresses are baked into Custom metadata (field: Transfer mailbox address) that flow fetches to show error if it finds one.   

 

Issues with email addresses string in the flow.

However,  it is not triggering when users are typing multiple email addresses (that also includes internal mailbox addresses) in to/cc field as this condition is not passing because whatever custom metadata record flow is finding it only matching to one email address and the to/cc field is represented as string (with multiple emails address, when present such as : 123@abc.com;675@abc.com,ourmailbox@xyz.com). I can't use CONTAINS in below Get Records condition direction [Transfer email address CONTAINS Record>toadderess) as I need to find a way to reverse to  [Record>toadderess CONTAINS Transfer email address ). OR find another way to find the mailbox adderss value from the to/cc address string. I think formula would help. Any help is greatly appreciated. Thank you, Mit  

 

email addresses.png

 

#Flow  #Formulas  #Salesforce Developer  #Automation  #Validation Rule

2 answers
  1. Michael Brown (Salesforce) Forum Ambassador
    Jun 21, 2024, 6:23 PM

    Hey Mit, 

     

    I wonder if you could do something that checks to see if the To Address and CC Address contains a ;. If so, that would indicate there are multiple addresses. 

     

    You could then have the flow essentially "loop" through that string, parse out each email address and check those individually. I've shared a response here that details how you can use flow to cycle through a comma separated string, or in this case semi-colon separated: https://trailhead.salesforce.com/de/trailblazer-community/feed/0D54V00007BID5hSAH

     

    Thanks,

    Mikey

0/9000