---
title: Personalize with optional content
slug: data-platform/docs/legacy-personalize-with-optional-content
docTags: 
createdAt: 2026-08-10T12:05:20.000Z
---

:::hint{type="info"}
**Note**

The terms *audiences* and *segments* are interchangeable. Optimizely has updated all *segments* to *audiences* on the **Audiences** page and is updating the UI on other pages. See  [Understand audiences](docId\:v-gHiL9jfINBey-4QNtFM) to get information on audiences.
:::

Optional content lets you present information to customers based on their attributes or their behaviors. These sections can be a powerful personalization technique and allow for varied content without the creation of additional audiences or campaigns.

## Create optional content

:::hint{type="info"}
**Note**

Email and SMS channels are legacy features and not offered to new customers.
:::

1. Go to **Activations > Overview**. 
2. Create or edit a [campaign](docId\:DKxtgWwkAXLkkLOufg8mT).
3. Add or edit an email touchpoint.
4. Select the element, column, or section you want to make optional.
5. Set the condition under **Details > Scripting** that determines whether the content is shown.
6. Click **Save**.

## Optional content examples

The following examples serve as an introduction to how you can use optional content. More advanced logic is possible [through the use of custom Shopify liquid.](https://shopify.github.io/liquid/) Contact your customer success manager before proceeding with advanced personalization.

### Birthday month

The following example is based on a default **Customers** field and only displays if it is the customer's birthday month.

1. Select a **Section** in your email content.
2. Click **Setup** in the **Scripting** section of the **Details** tab.

   ::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/IgcakbPmcWM-3cO7Cxh2o-20260720-145715.png" size="100" isUploading="false" showCaption="false" width="294" height="163" darkWidth="294" darkHeight="163"}
3. Create a variable called `current_month`, then click **Save**.

```javascript
{% assign current_month = now | date: “%m” %}
```

4. Click **Condition**, enter the following code snippet to determine if the `current_month` is the same as the customer's birthday month, then click **Save**.

```javascript
customer.dob_month == current_month
```

5. (Optional) Create a different section for customers whose birthday is not the current month by using the following code snippet in **Condition** instead:

```javascript
customer.dob_month != current_month
```

### VIP status

The following example is based on a custom customer field and only displays if the customer is considered a VIP.

1. Create a custom True/False [customer field](docId\:xSe13VUhsS-w2QE-GUxIZ) called *VIP*.
2. Reference the VIP attribute in **Condition** to determine if the customer has the VIP value.

```javascript
customer.vip == true
```

3. (Optional) Create a different section for customers who are not considered VIPs.

```javascript
customer.vip != false
```

### Rating system

The following example is based on a custom product field and displays when a product is associated with a certain rating.

1. Create a custom [product field](docId\:xSe13VUhsS-w2QE-GUxIZ) called *Rating* using the **Number Field Type**. For this example, the rating system is from 1 to 5 stars.
2. Add an additional image element to the dynamic product grid of your touchpoint. Position and resize accordingly. For this example, the rating is shown as a collection of stars.
3. Set the **Image URL** of the additional image element. In this case, it is .
4. Upload the images that represent your ratings to an accessible source.
5. Add the Liquid from the following code snippet to the **Setup** block of the dynamic grid (in the **Element Scripting** section of the **Details** tab). Replace the generic example titles and links with references to your images.

```javascript
{% assign rating = product.rating %} 
{% if rating == 3 %} 
{% assign star_image = 'https://url_to_my_asset/3_star_image.gif' %}
{% elsif rating == 4 %}  
{% assign star_image = 'https://url_to_my_asset/4_star_image.gif' %}
{% elsif rating == 5 %}   
{% assign star_image = 'https://url_to_my_asset/5_star_image.gif' %}
{% else %}   
{% assign star_image = 'https://url_to_my_asset/less_than_2_star_image.gif' %}
{% endif %}
```

6. **Save** and **Go Live** with the campaign.
