Maven Email to CRM: Populating Date Fields in Infusionsoft From Dates Contained in Your Email Notification

Today I will be showing you how to extract the date from an email and populate it into a date field inside Infusionsoft.

Step 1:

The first thing you will want to do is log into your Infusionsoft and create the date field. If you do not know how to create a custom field click this link Here. Make sure to select Date as the field type.

Once you have the date field created log into your Mavens Membership account. Go to the date extraction that you would like to change. Inside the extraction change the Field Type to Date from the drop-down menu. Another field labeled Date Format should appear. We will take care of this field later, but for now, lets go to the next step.

Step 2:

In order to determine the proper format of the date we must first go into the email history of the Email to CRM account that you want to change. Find the email that you would like to base the date off of and click View Content under the Plain Content column.

Inside the email, look for the date. For this example the date is Thursday, October 3, 2013. Lets come back to this later.

Step 3:

Now go to www.php.net/manual/en/function.date.php. You might want to bookmark this site because you'll be going to it a lot. I'll walk you through the example date that we have set up right now, and then give a few more examples of other dates at the end of this article.

Now look at the date format inside the email. As you can see, Thursday is spelled out.

Now go back to the PHP page and look for the Day section. Look for the description that reads A full textual representation of the day of the week. Over on the left-hand side you will see the Character that represents the day. In this case it is l (lowercase "L").

This is where you need to start following the format of the email exactly otherwise it will NOT work. So far we have l. But, if you look at the email, there is a comma AND a space after Thursday. You must include that comma and space after the day.

This is what our date looks like so far: l,

Step 4:

Now we will move on to the month. For this example, we have October fully spelled out.

So go to the Month section and look for A full textual representation of a month, such as January or March. On the left you can see that it is represented by a capitol F.

Now place that F immediately after the previous space in our date.

This is what our date looks like so far: l, F

Step 5:

Next is the actual calendar day of the month. In this example it is 3.

Now go back to the PHP page. 3 is a Day of the month without leading zeros so find that in the description of the Day section. Next to it, you'll see that it is represented by a lowercase j. Add that to the date, but make sure you include the comma and space after it.

This is what our date looks like so far: l, F j,

Step 6:

Last but not least we have the year. In this example it is 2013.

On the PHP page, scroll down to the Year section. Our date is A full numeric representation of a year, 4 digits so look for that in the description. You should see that the character it equates to is a capitol Y. Since this is the end of our date, when you place it into the date format, it doesn't need to be followed by any commas or spaces.

Here is what our final format looks like: l, F j, Y

Step 7:

Now all you have to do is type that format into the Date Format field and hit save!

More examples: January 20th, 1973 = F S, Y Jan 20, 73 = M j, y Monday, Jan 20th, 1973 = l, F S, Y

Congratulations! The dates in your emails should now populate the date fields in your Infusionsoft!