7. IMPORTANT! Dealing With New Contacts (Setting Up an HTTP Post)

Whenever a new contact is added to your Infusionsoft database, you need to be sure that the EmailAddress2 field has been populated before you send any emails (broadcast or campaign mail) to the new contact using their EmailAddress2 field.

Whenever you import a new list, be sure to go back to the WeDeliver.Email admin console and re-run the “Update Contacts” process as shown in section 3.

The only way to set up the EmailAddress2 field automatically when a new contact opts in via a web form is to insert an additional sequence immediately after each web form in every campaign that you’re setting up to use EmailAddress2.

The most reliable way to do this is to create a sequence containing an HTTP Post that’s connected immediately after your opt-in form:

Web form + HTTP post

The HTTP Post needs to be configured as follows:

POST URL: http://wdem.wedeliver.email/setup_email2.php

Name/Value Pairs:

contactId: ~Contact.Id~
email: ~Contact.Email~
app: your app name (in our example, rc135)
auth: the first six characters of your API key
callName: an API goal name of your choice (see below)

HTTP post

The callName value is used to trigger an API goal immediately after the HTTP Post sequence, which will only be triggered when the EmailAddress2 field has successfully been set up. This ensures that the campaign will never continue without an EmailAddress2 value being set.

IMPORTANT: The callName needs to be unique to this sequence and the subsequent API goal. Otherwise, you will find multiple sequences being started all at the same time, which is almost certainly not what you want!

Please see an additional explanation below, after the API Goal)

Because there is a small risk that an HTTP Post might fail, we strongly recommend that a looping sequence is set up that will continue to run until the HTTP Post succeeds.

To do this, a tag will need to be created to trigger the loop (we recommend the use of a category called Trigger Tags for all tags that cause goals to be achieved). When this tag is applied, it will remove the contact from the sequence and then immediately re-add them.

In our example, the tag is called Trigger Tags -> Email2 NOT set up – Webform1 Opt In. We recommend you set this up in CRM -> Settings -> Tags, so that you can put it into the category Trigger Tags.

Looping Tag

The tag applied goal needs to be set up twice (you can create a copy) and then connected to the HTTP Post sequence both BEFORE and AFTER the sequence. The one AFTER the sequence removes contacts from the sequence when it’s applied, i.e. after the HTTP post failed for whatever reason. The one BEFORE the sequence then immediately puts the contact back into the sequence to try again.

set-email-2-campaign-new

Inside the sequence, you need to first remove the trigger tag, so that it can be re-applied at the end of the sequence if necessary.

HTTP post sequence

 

Immediately after the HTTP post sequence, you need to set up an API Call goal with the following details:

Integration: wdem (this MUST be changed from the default)
Call Name: (this must exactly match the callName field in the HTTP Post that you just set up)
(in our example, this would be email2SetupWebform1OptIn)

configure-api-goal-new

 

WARNING!

The Integration name MUST BE SET TO wdem and the Call Name MUST MATCH EXACTLY the callName set in the HTTP Post. UNLESS THIS IS FOLLOWED EXACTLY, the API goal will never fire!

The reason for the API goal and unique callName is so that we can be 100% certain that the Email2 field has been updated before the campaign moves on, and by having a unique callName in every HTTP Post with a matching callName in the subsequent API goal, it allows HTTP Posts to be replicated in different sequences and campaigns without interfering with each other.