Matching company name when it's different in Autotask and the remote system

I’m actually working on a similar topic. I had instead extracted the org name via RegEx, but your way would have been easier on me.

This works when the email & AT name lines up, but breaks down when it doesn’t.

  • matched string in email is The Gas Company
  • AccountName in AT as TheGas Company
  • matching via CONTAINS doesn’t work, either
  • I am not realistically able to change how the company is named in AT nor the incoming emails

I’ve been trying for a while to use regex to separate out the string and also put each word of the company name (if multiple words) in separate Groups but am falling short. If I could do that, I think it would facilitate an AND CONTAINS situation.

Hi @jcombel

Thanks for the question! I hope you don’t mind… I split your question from where you posted it into a new thread.

I have an idea on how to solve this. Can you tell me the name of the remote system that generates the emails you’re trying to process?

Splitting makes sense.

The emails are coming from Adobe’s licensing renewals. It’s a long medium email about 200 words. The money is in the middle of the email body,

Org name
The Gas Company
VIP number
5sdfasdlkfasdfaakj0A80199A

Your suggestion in the previous thread, and the regex I’ve been able to produce, produce, are getting
The Gas Company. By the way, my regex is a few different variants of (?<=Org name\n)\w.*?(?=\nVIP number)

Unfortuantely when I build my search on my Autotask query ‘Account’
"(`Active` = "1") and (`AccountName` CONTAINS "The Gas Company")",
I can’t get any hits if the Account Name is actually TheGas Company.

Of course it matches if/when the email matches the Account Name exactly.

I’ve been trying to produce a regex that would have each word in its own Group, and I could do my Autotask query to do an AND CONTAINS on the individual groups.

If you’re willing to add a new User-Defined Field to your Organizations in Autotask, you can create a new UDF called “Adobe Licensing Org Name”. Then, you can query like this in MSPintegrations:

This will return the organization if the name matches exactly, OR if the UDF matches exactly. You will need to update the Autotask organizations that aren’t an exact match, but then you will have completely decoupled the Autotask name from the Adobe name.

What do you think of this?

That seems pretty good to me :+1:
Boss will probably approve.

1 Like