Transformation of text from one value to another

  • 1
  • Problem
  • Updated 11 hours ago
  • Solved
I feel I am missing something basic.  I have a rule to pull in contact data from an outside source with a field called "Alternative Email Address". Now, we want to use that so the field is of type 'EMail address", but if the customer leaves it blank on our Customer Portal, we add "--" in the field as a placeholder (it can't be null the way we have it submitting".  

Now, reading "--" into Gainsight to load into an email address won't work so I'd like to replace or blank out that text so the rest of the record gets read in.  Right now, those fail and are excluded from the load.

I have two data sets and a merge, and it seems all I need to do is transform the text.  However, what is the best way to replace text "--" with "" or null?
Photo of Tim Harper

Tim Harper

  • 206 Points 100 badge 2x thumb

Posted 1 month ago

  • 1
Photo of Jitin Mehndiratta

Jitin Mehndiratta, Product Manager

  • 3,254 Points 3k badge 2x thumb
Hi Tim,

In the rules engine actions, you have an option to set any field in the target object to null.
You can set the email id to null using action criteria "Email = "--"



Let me know if that helps.

Regards,
Jitin
Photo of Tim Harper

Tim Harper

  • 206 Points 100 badge 2x thumb
Yes, I had not considered using "Criteria" to split into two actions.  I will do different actions, but there are other instances where I wonder if I can transform or replace text.  Are you aware if this is possible?
Photo of Matthew Lind

Matthew Lind, Champion

  • 3,758 Points 3k badge 2x thumb
Bionic Rules *might* have a solution for you.

I don't know that you can truly transform and/or replace in Bionic Rules, but a carefully-written Bionic Rule would allow you to generate a new value within the Rule Tasks, which we might call "Email Address Plus". Then you can write logic to populate that new value with Email address, where it exists, or -- when that exists.

Not a true transform, but it might get you there.

I had a use case where I needed to concatenate the values from two fields into a third field, and used Bionic Rules to handle this. When my Bionic Rule was complete, I had three fields: the original two plus a third one with the concat, which I could take into the Actions. I didn't truly replace anything, but I got the transformed value I needed.

That said, in this context I think I would lean toward a simpler Bionic Rule and two actions, each with Criteria.
Photo of Tim Harper

Tim Harper

  • 206 Points 100 badge 2x thumb
Agreed and thank you. 

If I may learn the limits, when you concatenate, how do you avoid getting "Matthew" and "Lind" into "MatthewLind" when you want "Matthew Lind"?
Photo of Sai Ram Pulluri

Sai Ram Pulluri, Official Rep

  • 12,626 Points 10k badge 2x thumb
Hi Tim, 

This is possible, please refer below screenshot