Scenario Overview

In this scenario we will show you how to create an email address from a contact's name and their parent account'swebsite URL using regular expressions.

We have a batch of records that contain only the first name and the surname of the contact but they have a parent accountWe will extract the domain name for the email addresses from the parent account's website field and then add them to the first name and last name.

Processing Steps

In this example we are using website URL.

  1. First we remove 'www.' from the website URL if it exists using Replace() function
  2. Next we remove the http:// or https:// if they are on the URL using RegexReplace()
  3. Finally we remove any trailing forward slashes etc. again using RegexReplace()

Start: After the Replace() function: After the first RegexReplace() function: After the second RegexReplace() function:

North52 Decision Suite Solution

The North52 Decision Suite solution works like this,

  • Formula of type 'Save - To Current Record' is created on the Contact entity
  • Source Property is set to 'Firstname, Lastname' and 'Account Name'
  • The Target Property is set to 'Email'

North52 Decision Suite Steps

The following set of steps outline how to create this Formula

  • Create a formula of type 'Save - To Current Record' on the Contact entity
  • Set the Source Properties as 'First Name, Last Name' and 'Account'
  • Set the Target Property as 'Email'
  • Copy and paste the formula below into the formula canvas
  • Save and test!


if(ContainsData([contact.firstname], [contact.lastname], [contact.parentcustomerid.websiteurl.?]) and

  /* True */
  [contact.firstname] + '.' + [contact.lastname] + '@' +
      Replace([contact.parentcustomerid.websiteurl.?], 'www.', ''), /* 1 - remove the www. */
      «^.*:\/\/», ''),                        /* 2 - remove the http:// or https:// */
    «\/.*», '')                           /* 3 - remove any trailing /etc after the domain name */
  /* False */

Wizard - DoesNotContainData

Please see below the wizard you can use to create the DoesNotContainData() function call used in this formula. 

Note you will need to either type or paste in the following. 


Did you know?

North52's Decision Suite can help enhance Dynamics Business Process Flows

Sometimes business processes are more complicated and have significant permutations that are not easily managed with the out-of-the-box Business Process Flow (BPF) functionality. With North52 Decision Tables you can create rule dependent task checklists for each BPF stage and not allow users to progress until your rule criteria has been met. 

Learn how we do it in this knowledge base article