How to check if contact's email address is not empty in process definition?

Hello devs,


I have a process definition to send an automated email to the specified contacts if certain conditions are fulfilled. I have been receiving a lot of exceptions in my sugar log regarding the email address missing while attempting to send an email. I need to know a way to eliminate contacts without an email address. I couldn't find the email field for selection in the process definition. Please help.


Regards.
Hatim

Parents
  • Hello  

    To address the situation, you could implement a flag system to indicate whether a Contact possesses an email address.
    Here's a step-by-step approach to achieve this:

    1 - Create a Checkbox Field:

    In Studio, create a calculated checkbox field in the Contacts module named "hasemailaddress_c"  with the following formula 

    Fullscreen
    1
    not(equal(related($email_addresses,"email_address"),""))
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    2 - Utilize the Checkbox in Your Process Definition:

    After saving the checkbox field, incorporate it within your Process Definition.
    Specifically, you can use it in an exclusive gateway to filter out Contacts that do not have an email address.




    Let me know if this helps. 

    André 

  • Thank you  .

    Is there no OOTB way without creating a custom field? Please let me know.

  • Hello  , 

    Thanks for the challenging reply. 

    There is actually another approach that might be better without creating a custom field. 
    You could create a Business Rule to evaluate the Email Address of the Contact and then place it before your Exclusive Gateway: 


    Let me know if this one works for you. 

    Cheers, 

    André 

  • Hi  ,

    This is amazing. I didn't know about it (Business Rules) and it would surely make my CS team happier.

    Thanks.

Reply Children
No Data