The extraction groups’ option allows us to extract specific information from inbound messages.
For example, we can add a YES / NO selection for a drop down generic field;
Extraction Groups can be accessed and edited by Admin Users. Click on the option = ‘Extraction Groups tab as follows:
Screen displays;
Click on the edit button next to ‘Form Extraction Rules’
To add a New Extraction Group click on the ‘New Extraction Group’ button.
Again, as with the advanced keywords handler these rules are prioritised.
|
|
|
|
|
|
Once all information is entered click on the ‘Save’ button.
Click on the ‘New Extraction Queue’ button.
|
|
|
|
Once all information is entered click on the ‘Save’ button.
Click on the ‘New Extraction Rule’ button.
Enter your extraction rules for validation:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For Example: a regex rule to extract the customer’s first name to the FirstName field and last name to the LastName field when the following message is sent “Rego Fred Fintstone”.
Email that is sent in is as follows:
When the message passes through the extraction rule the first thing it does is applies the Match regex = “Rego*’ – that is the message contains something that has the wording ‘Rego’ in it so this extraction rule is going to be applied.
In order to extract the first name the regex = ^[a-zA-Z]{1,}\s([a-zA-Z]{1,})\s[a-zA-Z]{1,} is applied.
Broken down this says:
^ - beginning of the string
[a-zA-Z]{1,}\s – find the first word in the string
([a-zA-Z]{1,})\s - the data between the to ( ) means find the next word in the string and this is what you will extract in terms of the First Name.
[a-zA-Z]{1,} - find the third word in the string
In order to extract the first name the regex = ^[a-zA-Z]{1,}\s([a-zA-Z]{1,})\s[a-zA-Z]{1,} is applied.
Broken down this says:
^ - beginning of the string of text
[a-zA-Z]{1,}\s – finds the first word in the string
([a-zA-Z]{1,})\s - finds the second word in the string – and in this the data between the to ( ) means this is what will be extracted in terms of the First Name.
[a-zA-Z]{1,} - finds the third word in the string, in fact any text from the third word onwards. If you wanted it to just be the third word adding a \s to the end would mean read up to the next space.
In order to extract the last name the regex = ^[a-zA-Z]{1,}\s[a-zA-Z]{1,}\s([a-zA-Z]{1,}) is applied
[a-zA-Z]{1,}\s – finds the first word in the string
[a-zA-Z]{1,}\s - finds the second word in the string
([a-zA-Z]{1,}) - finds the third word in the string – and in this the data between the to ( ) means this is what will be extracted in terms of the Last Name. in fact any text from the third word onwards. If you wanted it to just be the third word adding a \s to the end would mean read up to the next space.
So this extraction rule will only work correctly if there is Rego followed by a space followed by the person’s firstname (one word only) followed by the person’s last name.
Enter in the Regular Expression rules required then click on update. Some commonly used expressions are listed in the table below.