Tuesday’s Tip: Start an Infusionsoft campaign sequence based on the time of day

Have you ever wanted to run a certain campaign sequence but only if the contact enters a campaign during a specific time period? Perhaps not, but there are some interesting things you could do with this capability.

For example, you may want to email a new lead to let them know that your office is closed for the day, and they can expect to hear from you on the next business day. This email should only go out if the contact requests information after your office is closed for the day. Postponing the sequence won’t work, because that will just guarantee that every contact will eventually get an after hours email. Instead, we only want to send the email if the contact enters a campaign during a specific time period. If they enter the campaign during business hours, we never want the email to get sent.

If you are handling support for your products through your Infusionsoft app, you could do something similar. If someone fills out your support web form after hours, you could send them an email letting them know not only that you got their request but also an estimate of when it will be handled.

Follow below for instructions on how to set this up.

Get the free script

I haven’t been able to figure out a way to accomplish this without using the API. If you know how, please let me know! It’d be great to cut the API out of this process.

Until a better way is discovered, I’ve written a simple script and included it with the examples in the Novak Solutions Infusionsoft SDK.

Get a copy of the SDK, configure your API key, and place the script (examples/time-based_campaign.php) in a location that is publicly accessible.

Create the entry points and empty sequences

Create your lead capture entry point. For example, a web form.

Your lead capture entry point will lead to a sequence that does an HTTP post. This will then lead to another sequence that performs the normal tasks you’d perform with a new lead, such as creating an opportunity.

Create a second entry point that is set to be achieved when an API call is made. This entry point leads to a sequence that will send an email if the contact enters the other entry point during a specific time period.

campaign-overview

Configure the API call entry point

Edit the API call entry point. Set an integration and call name. These values are arbitrary, but should be unique to this campaign.

api-entry-point

Configure the sequence after the API entry point

Add anything you’d like to happen if the contact enters the campaign during your selected time period. For example, you might send an email letting them know that your office is closed for the day but you’ll get back to them on the next business day.

Configure the HTTP post

Open your Check time sequence. Drag a Process→Send HTTP Post item into it.

http-post

Edit the Send HTTP Post. You’ll need several parameters.

The startTime and stopTime define the time period you want to restrict your API calls to. The API call entry point will only be entered if the contact enters the lead capture part of the campaign during this time period. Use 24-hour HHMM format with leading zeros. For example, 4:30 PM would be 1630. The time zone will match whatever time zone your server is set to.

The integration and callName need to match the values you picked when configuring the API call entry point.

http-post-config

Test the campaign

As always, test to make sure everything is working. You can always use the campaign tab to run the HTTP post multiple times without having to create multiple contacts.

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.