# How to Create and Use a Coupon/Promo Code - One Step Form

Using Coupon/Promo codes with your audience can generate more sales and allow you to offer specific products and deals to specific leads or customers. This article quickly explains how to use a Promo code within the One Step Order Form in the Funnel Builder.

***NOTE:*** This article assumes that you have already created a funnel, associated product(s) and have a One Step Order Form in the funnel. If you haven't done these items, we highly recommend that you check out the other videos in the Funnel Builder section first.&#x20;

**Part 1: Organizing Products**

**Step 1:** You will need to have two products added to your funnel. The first product will be the full price product and the second one will be the discounted product. The second product will be hidden initially and will be revealed as the discount option when the code is entered. This will also hide the full price product.&#x20;

***NOTE:*** This will only work with one full price product and one discount product. The code is for the One Step Order Form products only. It is not for Bump or Upsell products.&#x20;

<br>

**Part 2: Custom Code for Promo Code**

**Step 1:** Edit the Funnel Step where the One Step Order form resides

**Step 2:** In Settings, click on Tracking Code

<figure><img src="https://lh4.googleusercontent.com/EcRpWHGFHxvbzsyCnUR8rhKmt56AGG17ccCTrRRYZ7udJ8zs5q3Px3CZkqgs6PR_RKu2AdZ-4-BPG03e3aU1DoMbIbF_6n8m32Vok5XT1XArsWUZSxKbdYDzyUrZK_yYnceEsJw=s0" alt=""><figcaption></figcaption></figure>

**Step 3:** Select Footer Code

**Step 4:** Paste in Copied Code (from the bottom of this article)

<figure><img src="https://lh6.googleusercontent.com/TIWvh4rKFHMS-TfvKsgGqL5sRGR23O66_CZ9u--WnSLob0nYgwubelEBKPYr0BOYgpnGkydlwPnN_I-HZjFJwQhHU0m75l95hIo_EHaWzfT178Te1WBeFJ2pcootRYEjDqsWK44=s0" alt=""><figcaption></figcaption></figure>

**Part 3: Customize Your Coupon Code**

<figure><img src="https://lh3.googleusercontent.com/ffwyIpZ05q0iy5og0YKfxh9qsUj-4U2CLQNB1mKq6C9dRjfb9dVcFA2GI-P3v2C6nT1HCyq9yYs94BiPUy3CIaYttH_Glv5pBMVRO1w9QLGOguTA-2pF4aAdhZnS3yPDjzxImvk=s0" alt=""><figcaption></figcaption></figure>

**Step 1:** Before saving, scroll up to the top of the code

**Step 2:** Type in the Coupon Code you wish to use. You should type over the examples 'TESTCODE' , 'tcode' , 'twenty20'  &#x20;

***NOTE:*** If you want to use more than one coupon code, you can enter multiple separated by commas. This is the default setting in the code you copied in.&#x20;

**Step 3:** Click Yes, Save

<br>

**Part 4: Test Your Code**

**Step 1:** Preview your page.

**Step 2:** Enter in details for the first step.

**Step 3:** Enter in your promo code for second step and watch your discount product offer appear!

```
<style>
  .d-none_0x4e4858 {
  	display: none !important;
  }
</style>
<script src="" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script>
	window.hlpt = window.hlpt || {};
	window.hlpt.mycodes = [
		/DO NOT EDIT ANYTHING ABOVE THIS LINE/
		"TESTCODE", "DISCOUNT", "PROMO" /Enter your desired promo codes here, similarly as shown/
		/DO NOT EDIT ANYTHING BELOW THIS LINE/
	];
	function hlpt_apply_coupon_code(product_regular, product_offer, form_base, product_description) {
		window.hlpt.mycodes = window.hlpt.mycodes.map(function (a) {
			return a.toUpperCase();
		});
		if ($("#promo_code").length == 0) {
			var coupon_input = '<input type=\'text\' id=\'promo_code\' name=\'promo_code\' placeholder=\'Enter promo code...\' class=\'form-input\'/>';
			$('.product-cost-total').last().append(coupon_input);
		}
		$(form_base + ' [id=' + product_offer + ']').closest(product_description).addClass("d-none_0x4e4858");
		$('body').on('keyup', '#promo_code', function (e) {
			if (window.hlpt.mycodes.indexOf($('#promo_code').val().toUpperCase()) == -1) {
				$(form_base + ' [id=' + product_regular + ']').click();
				$(form_base + ' [id=' + product_offer + ']').closest(product_description).addClass("d-none_0x4e4858");
				$(form_base + ' [id=' + product_regular + ']').closest(product_description).removeClass("d-none_0x4e4858");
			} else {
				$(form_base + ' [id=' + product_offer + ']').click();
				$(form_base + ' [id=' + product_regular + ']').closest(product_description).addClass("d-none_0x4e4858");
				$(form_base + ' [id=' + product_offer + ']').closest(product_description).removeClass("d-none_0x4e4858");
			}
		});
	}
	function hlpt_handle_products_description() {
		var product_regular = 'regularprod';
		var product_offer = 'offerprod';
		var form_base = ".form-payment .product-detail .product-description";
		var product_description = ".product-description";
		if ($(form_base).length == 0) {
			form_base = ".form-payment .product-detail .--mobile-product-description";
			product_description = ".--mobile-product-description";
		}
		var all_pds = $(form_base);
		if (all_pds.length > 1){
			$(all_pds[0]).find('input[type=radio]').attr('id', product_regular);
			$(all_pds[1]).find('input[type=radio]').attr('id', product_offer);
		}
		hlpt_apply_coupon_code(product_regular, product_offer, form_base, product_description);
	}
	$(function () {
		var notGloballyApplied = true;
		if (Array.isArray(window.hlpt.mycodes)) {
			var observe = new MutationObserver(function (mutations) {
				if ($('.product-cost-total').length != 0 && notGloballyApplied) {
					notGloballyApplied = false;
					hlpt_handle_products_description();
				}
			});
			observe.observe(document.body, {
				childList: true,
				subtree: true
			});
		}
	});
</script>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.mypipeline.co.in/site-builder/how-to-create-and-use-a-coupon-promo-code-one-step-form.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
