Automatically apply promo code on Infusionsoft Order Form

After a long wait, Infusionsoft by Keap finally released a mobile responsive layout for their native order forms.

In the past, you could only have a “One Column” or a “Two Column” layout for your Infusionsoft order forms.

Now you have a third option; “Mobile Responsive” layout.

As you know, you can create various promotions within Infusionsoft for your products or services.

You can have different types of promotions within Infusionsoft. These promotions include:

  • Order Total Discount
  • Product Specific Discount
  • Shipping Discount
  • Subscription Free Trial
  • Category Discount
  • Upsell

All of the above promotions except for Upsell can be triggered by different criteria.

One of the criteria is promo codes.

Promo codes are “text strings” that can be entered by your prospects in your shopping cart or order forms to avail certain promotions created by you.

You can send your promo code to your subscribers in an email, text message, or offer them on your website to make your product more desirable and drum up interest.

They also allow you to keep track of the different promotions used by your prospects to purchase your services.

Sometimes, you want your promo codes to be applied automatically to the order forms so your prospects do not have to enter it themselves.

You can do this by using URL parameters.

simply include the following at the end of your order form link.


Replace ~YOUR-PROMO-CODE~ with the promo code you have created in Infusionsoft for your promotion.


Lets say your Infusionsoft order form link is:

And the promo code you have created in Infusionsoft is “promotest1”.

Your order form link will become:

You are not done yet!

But just including the URL parameter is not enough. You will also need to add a small piece of script in your Infusionsoft order form.

  1. Log in to Infusionsoft and navigate to E-Commerce Setup.
  2. Click on “Order Form Themes”.
  3. Edit your Mobile Responsive theme for your order form.
  4. Click on HTML Areas.
  5. Scroll down to Custom Footer.
  6. Copy the code snippet below and paste it into the custom footer area.
  7. Click Save
window.onload = (function() {

function getUrlVar(key) {

var result = new RegExp(key + "=([^&]*)", "i").exec(;

if (result != null) {

    if (result[1].substring(0,1) != "+") {

        result[1] = result[1].replace(/\+/g," ");

    } else {

        result[1] = "+" + result[1].substring(1).replace(/\+/g," ");



return result && result[1] || "";


jQuery('#orderSummaryPromoEntry a.button.secondary')[0].click();



End Result

All your order forms using this particular theme will now be able to automatically apply promo codes if they are sent in the URL parameter.

You can do some pretty smart things with this. You can include the order form links in your email broadcasts, campaign emails as well as links to your order form from your websites.


You can use the same order form theme and just change the ?promocode= parameter to any promo code you want applied to your order form. As long as the promo code exists in Infusionsoft and the criteria has been set up correctly, your promo code will automatically apply.

Like this article?

Share on Facebook
Share on Twitter
Share on Linkdin
Share on Pinterest

Are You Ready To Start Your Project?

With Info Tech Wizards, you will not be disappointed. Click the button below to complete our project worksheet. Once completed we will go through your requirements, and come back to you with the next steps.​
Zmarak (Zee) Bangash

Zmarak (Zee) Bangash

Network Engineer | Tech Evangilist | Web Developer | Automation Expert | Infusionsoft Consultant | Wordpress Consultant I love the internet and everything that makes it work. Servers, Networks and Web Design / Development just make me tick. I wear many hats and I am very comfortable in all of them. But my obsession for Systems Automation and making every system work together in complete synergy and harmony trumps it all. If something can be automated, it should be. Time saved can be used to create something awesome. An expert in Infusionsoft and a plethora of other automation tools, I simply love to share my knowledge and expertise. I am at your service with over 5 years of experience. You can read my blog here or view some of the other cool things that we do at Info Tech Wizards.

Leave a comment