|
How to Configure Parsing |
Top Previous Next |
|
Parsing functionality is accessible through the button labeled “Form/Parsing”. The button is available on the following tabs: “Reply” (autoresponder), “Opt-In” and “Opt-Out” (mailing list).
Use the “Add” button to configure parsing of a piece of text. The buttons labeled “Delete” and “Edit” let you remove and edit the selected parsing rule.
Hint: To learn how to view a sample message you want to parse, read: Downloading Sample Messages
Now you have a choice between simple parsing that will work in most cases and advanced parsing for the tough ones.
Parsing Simple Form Fields
Parsing form fields that occupy a single line is very simple. Here's an example of think kind of field:
Name: John Smith
To extract "John Smith" from this field, enter "Name" without quotes in the "Starts with" text box. Below you can see what it should look like.
Note: I downloaded a sample message to make it easier to set up parsing; you can see it in the text box labeled "Sample message" (the program marked the matching text with green color). To learn how to download a sample message, read: Downloading Sample Messages
Parsing Fields Spanning Multiple Lines
Let's suppose you want to extract the address from the message below:
Name: John Smith Email Address: john@somedomain.xxx
Phone: 12345 12345
Address:
25 Random Drive 9999 Chattanooga Tennessee
IP: 123.123.123.123
You need to specify the beginning and the end of the address. It starts with "Address:" and there's "IP:" right after the postal address so let's enter "Address" (without a colon) in the "Starts with" text box and "IP:" (with a colon) in "Ends with".
FollowUpExpert automatically removes the unnecessary empty lines.
Note: I downloaded a sample message to make it easier to set up parsing; you can see it in the text box labeled "Sample message" (the program marked the matching text with green color). To learn how to download a sample message, read: Downloading Sample Messages
Advanced Parsing with Regular Expressions
Sometimes you may come across some text you cannot parse using the simple methods described above. For example, there may be two "Name" fields in the message and you may want to parse the second one. The simple parsing won't work here because the program always uses the first field it can find (in this case that would be the top-most "Name" field). Let's use it as an example. Here's the sample message:
============================= = Company details:
Name: ABC Corp. City: Washington DC
============================= = Deliver to:
Name: Joe Public Email: joe@joesdomain.com
Phone: 12345678900
Because you need the name of the person our product is going to be delivered to, you need to use a regular expression that will pick the second field instead of the first one. Here's how you can do it:
Below you can see how the window looks like after your perform the steps.
I downloaded a sample message to make it easier to set up parsing; you can see it in the text box labeled "Sample message" (see Downloading Sample Messages). You can also copy & paste the sample message above into the text box. If you do that, the "Extracted text" box will contain the extracted text. This lets you check if the expression actually works.
The regular expression itself may look a "bit" mysterious; to find out more please read Regular Expressions and Format Expressions.
Default value
You can specify the default text you want FollowUpExpert to use in case the regular expression does not match anything. Type the default text in the “Default” text box. You can also leave the text box empty.
Saving Extracted Text
You can choose a subscriber field to save the extracted text using the "Save as" text box or you can type a custom field name there. You can use the field in your messages, with the $(...) syntax.
Example:
$(Phone)
|