Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Digital Data filtering Rules for Email

    Posted 2 days ago

    Hi,

    Could you please advise how I can configure an Email Digital Rule to mask the entire statement below, including the "click here" hyperlink?

    "If you'd like to unsubscribe and stop receiving these emails click here."

    The URL contains a dynamic value after upn=, so I would like the rule to mask the entire statement regardless of the URL value.

    Thank you!

    Best Regards,

    Seow Leng


    #Architect

    ------------------------------
    Seow Leng
    Principal PS Consultant
    ------------------------------


  • 2.  RE: Digital Data filtering Rules for Email

    Posted 2 days ago
    Edited by Gabriel Garcia 2 days ago

    Hi Seow,

    Yes, this can be handled with a Custom Digital Data Filter configured for Inbound Email.

    Genesys Cloud allows custom inbound filters to use regular expressions against digital message bodies and email subjects. When a string matches, Genesys replaces the matching content with X characters at ingestion time, before it is further stored or processed.

    For your requirement, I would avoid matching the dynamic value after upn=. Instead, match the fixed unsubscribe text and, if the email body presented to the filter contains the HTML anchor, consume the entire <a> element regardless of its href value.

    A pattern I would test is:

    If you(?:'|'|&#39;)d like to unsubscribe and stop receiving these emails\s*(?:<a\b[^>]*>\s*click here\s*</a>|click here)\.?

    This does not depend on the dynamic upn value.

    If the body is represented as HTML, the <a\b[^>]*> portion matches the opening anchor tag including the complete dynamic href, while click here and </a> complete the match.

    One important point is that Genesys documents filtering against the email message body, but does not explicitly guarantee that the custom filter always receives the raw HTML representation including the href attribute.

    Because of that, I would use the Run Test function in the Data Filter configuration with a sample of the actual email body before enabling the rule.

    Configure it under:

    Digital Data Filtering → Custom Filter → Inbound → Email

    This is preferable to an Architect email rule because Architect email rules are intended to evaluate email content for flow decisions/routing, whereas Digital Data Filtering is the feature designed to redact the matched content.

    Also keep in mind that inbound filtering is irreversible: once the content is matched and redacted, Genesys cannot restore or use the original value later in the platform.



    ------------------------------
    Gabriel
    NA
    ------------------------------