# Message Template Builder

## Message Template Builder

The Message Template Builder in Velora lets you create and customize messages for your campaigns, making it easy to connect with customers. This feature helps you design emails, ads, or notifications that include personalized product suggestions, perfect for supermarkets or other businesses in Tamil Nadu. Learn how to build and use these templates to boost engagement.

### Overview

The Message Template Builder allows you to craft messages with your own words and add special placeholders for product recommendations. These templates work with Velora’s recommendation logics (`items_to_user`, `items_to_item`, and `users_to_item`) to show the right items to the right people. You can set them up in the campaign creation form for emails, homepage banners, or ads.

### How It Works

1. **Create a Template**: Use the builder to write your message and add placeholders like `{product_name}` or `{recommendation_list}`.
2. **Link to Logic**: Choose a recommendation logic (e.g., `items_to_user`) to fill the placeholders with suggested items.
3. **Apply to Campaign**: Add the template to your campaign, and Velora automatically inserts the recommendations for each customer.
4. **Preview and Send**: Check how it looks with sample data before launching.

### Creating Custom Templates

* **Placeholders**: Use simple codes to add dynamic content:
  * `{product_name}`: Shows a product name.
  * `{recommendation_list}`: Lists suggested items.
  * `{customer_name}`: Inserts the customer’s name.
* **Examples**:
  * "Hi {customer\_name}, check out {product\_name} on sale today!"
  * "Dear shopper, try these great deals: {recommendation\_list}."
  * "Hello, your favorites include {product\_name} and more!"

### When to Use Message Templates

* **Supermarket**:
  * Use for "email-promotion" to send a weekly offer: "Hi {customer\_name}, enjoy {product\_name} this week!"
  * Apply in "cross-sell-promotion" at checkout: "Add {recommendation\_list} to your cart!"
  * Try for "audience-targeting" ads: "Love snacks? Try {product\_name} today!"

### Integration with Recommendation Logics

The template works with your chosen logic to fill in the blanks. Example for an email campaign:

* **Template**: "Hi {customer\_name}, we recommend {recommendation\_list} for you!"
* **Campaign Setup**: Select `items_to_user` with a filter like "in\_stock = true."
* **Result**: An email to "Ravi" might say, "Hi Ravi, we recommend milk, bread, and eggs for you!"

### Best Practices

* **Keep It Short**: Use simple sentences that are easy to read.
* **Test Your Template**: Preview it to see how recommendations look.
* **Personalize**: Add {customer\_name} to make it friendly.
* **Update Regularly**: Refresh templates for new promotions or seasons.

### Troubleshooting

* **Blank Spots**: Ensure placeholders match your logic (e.g., use `{recommendation_list}` with `items_to_user`).
* **No Recommendations**: Check if your item data is up to date or adjust filters.
* **Design Issues**: Contact support at <support@mdmtechnologies.in> if the layout looks off.

### Getting Started

1. Open the Campaign Creation form and select the Message Template Builder.
2. Write your message and add placeholders like `{product_name}`.
3. Choose a logic (e.g., `items_to_user`) and scenario (e.g., "email-promotion").
4. Preview and launch your campaign.

For more details, see API Reference and Recommendation Logic.
