How To Extract Email Body Without Disclaimer

Hi Team,

Currently, I'm working on an Email channel. When customers are sending emails to us, we receive them with their organization's disclaimer. The disclaimer is in English language and but the customer messages are in Spanish, so the detectLanguage() is unable to return the language of the Email Body. May I know how to extract the email body without disclaimer in Architect ?
Please advise on this.

Thanks in advance.

Regards,
Sureshkumar.

Hello,

I think someone answered the question you have raised on the Genesys Cloud Community forum.

As said, there is no distinction in an email between the email text, the signature, the disclaimer (outlook). It is just text (outlook appends the signature and the disclaimer to the email as text - no specific/predefined separator).

So if you know/have a list of possible start of disclaimers (what your customers would use), you could search for them in the Email.Message.body (Architect built-in variable) using the FindString function (in an expression). FindString will return -1 if it doesn't find the search string.
Then use Left or Right functions to extract the email content (Left if the disclaimer is at the end of your email, Right if it is at the beginning), using the index returned by your FindString function (when > -1).

Regards,

1 Like

Awesome explanation, thank you so much.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.