# Free shipping to VIP customers

You can use a template to create a free shipping discount for customers with a VIP customer tag.

## In this section

* [Free shipping to VIP customers example](#free-shipping-to-vip-customers-example)
* [Setting up a VIP customer discount](#setting-up-a-vip-customer-discount)

***

## Free shipping to VIP customers example

In this example function, the logged-in customer with a VIP tag receives a free shipping discount even for small orders.&#x20;

#### The result:

The VIP customer gets a free shipping message at checkout.&#x20;

### The function trigger

For the trigger, there is one condition. If the customer has been tagged as `VIP`, then the free shipping discount is applied at checkout.&#x20;

***

## Setting up a VIP customer discount

### Step 1 of 4: Campaign name

1. From the Function Junction dashboard, under **Quick start templates**, click **VIP Free Shipping**.
2. Under **Function name**, give your discount a unique name so you can identify it later.

{% hint style="info" %}
**Note:**

Function names (also called campaign names) need to be unique. Once created, they appear in the **Discounts** section of the Shopify admin.
{% endhint %}

### Step 2 of 4: Function trigger

In this example, the customer needs to be logged into their account and have a VIP tag in order to qualify for the free shipping discount.

1. Set up the condition that customers need to meet to get the discount. In this example, the function needs one condition:
   1. `If` `customer tags` `is any` `VIP`
2. Click **Next**.

### Step 3 of 4: Function action

1. Set up the action (the discount) that is taken when the conditions you set are met. In this example, the customer is rewarded with free shipping if they are tagged with VIP:
   1. `then` `percentage total discount` `is` `100`

### Step 4 of 4: Discount details

1. Under **Discount type**, select if you want the discount to be **Automatic** or **With Discount Code**. In this example, the discount applies automatically.
   1. **Automatic**: Under **Discount message**, if you select **Yes**, then enter the discount message in the field provided below.
   2. **With Discount Code**: Enter the discount code that you want customers to enter at checkout.
2. Under **Combinations**, if you want this discount to be combined with other discounts, then click **Yes**, and check which types of discounts that you want it to be combinable with.&#x20;
3. When you're done, click **Publish**.

When your discount is published, if you want to advertise it, then you can [publish a widget to your store](/creating-and-publishing.md#step-2-publishing-a-widget-to-your-storefront).


---

# 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://support.functionjunctionapp.com/templates/free-shipping-to-vip-customers.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.
