Variables
Use the variables in the prompt so the ChatGPT could generate a response that includes specific details on your store, blog content, customer.
Global variables
These variables can be used throughout the entire store.
Variable | Description |
---|---|
{{ global.input }} | the variable is for additional text entered into the prompt during manual usage of the prompt in the admin panel. |
{{ store.name }} | store name. |
{{ store.locale }} | returns the locale label of the target Store View (example: English (United States) , German (Germany) , French (France) ). The value is always taken from the Store to which the prompt/rule is applied, regardless of Get Variables’ Values From. |
{{ store.variable_name }} variables are always taken from the target store view where the action is applied, regardless of Get Variables’ Values From. This lets you use a single prompt for all languages—it will insert each selected Store’s locale automatically. In rules, select specific Store Views; All Store Views
affects only the admin area.
Product variables
To use all available product attributes in the prompt, use the {{ product.attributes }}
variable. To use your own attribute, use its attribute code as shown in the table:
Variable | Description |
---|---|
{{ product.name }} | name of the product. |
{{ product.description }} | the product description. |
{{ product.short_description }} | the product short description. |
{{ product.meta_description }} | the product meta description. |
{{ product.attribute_code }} | one specified product attribute. |
{{ product.attributes }} | list of useful attributes. |
The attribute_code
may vary for each store. You can find it under Store -> Attributes -> Product in the Attribute Code column.
Before using a custom attribute, make sure the attribute is available for promo rule conditions.
Ignored product attributes
Some product attributes are ignored because they are either not informative for content generation, frequently change, or cause issues. Check the ignored attributes list before using:
Attribute | Description |
---|---|
status | the current status of a product, such as enabled, disabled, or out of stock. |
sku | stock Keeping Unit (SKU) is a unique identifier for each product. |
price | the retail price of the product. |
visibility | defines how the product is visible on the storefront (e.g., catalog, search, or both). |
new | indicates whether the product is considered new. |
sale | indicates whether the product is currently on sale. |
shipment_type | defines the type of shipping (e.g., flat rate, free shipping). |
image | the main image of the product. |
small_image | a smaller version of the main product image used in specific areas (e.g., product listing). |
thumbnail | a very small version of the product image used in areas such as product thumbnails. |
url_key | the URL key for the product, often used for creating clean URLs (e.g., /product-name). |
msrp_display_actual_price_type | controls how the MSRP (Manufacturer's Suggested Retail Price) is displayed in relation to the actual price. |
price_view | determines how price is shown on the product (e.g., as a range or as a single price). |
page_layout | specifies the layout used for the product page (e.g., 1-column, 2-column). |
custom_design | specifies a custom design for the product, often used for special promotions or events. |
custom_layout | defines a custom layout for the product page to change how content is displayed. |
gift_message_available | indicates if gift messaging is available for the product. |
image_label | a label for the main product image, usually for accessibility or descriptive purposes. |
small_image_label | a label for the small product image. |
thumbnail_label | a label for the thumbnail image. |
tax_class_id | determines the tax class assigned to the product, which affects how taxes are applied. |
options_container | defines how the product's configurable options (e.g., size, color) are displayed. |
quantity_and_stock_status | defines the quantity available and the stock status (in stock, out of stock, or backordered). |
swatch_image | an image representing a product option such as color or size used in product swatches. |
special_price | a special discounted price for the product, typically used for sales or promotions. |
special_from_date | the start date for a special price promotion. |
custom_layout_update_file | a custom layout update file that modifies the product page layout. |
Category variables
To use all available category attributes in the prompt, use the {{ category.attributes }}
variable. To use your own attribute, use its attribute code as shown in the table below.
When using parent variables like {{ category.parent.attribute_code }}
, the top-level category (root) is not available, so second-level child categories cannot inherit or use them. Use additional conditions to retrieve the correct data, for example:
{% if category.parent %}
Parent category data:
{{ category.parent.attributes }}
{% endif %}
Variable | Description |
---|---|
{{ category.attribute_code }} | one product attribute. |
{{ category.attributes }} | list of useful attributes. |
{{ category.name }} | name of the category. |
{{ category.description }} | the category description. |
{{ category.parent.attribute_code }} | specified attribute from parent category. |
{{ category.parent.attributes }} | all attributes from parent category. |
{{ category.parent.name }} | name of the parent category. |
{{ category.parent.description }} | the parent category description. |
{{ category.products }} | returns an array of products that requires iteration. By default, it contains the first 10 products in the category, sorted by ID . |
If your prompt uses the category.products
variable and you need fewer than 10 items, add a limit
to the loop:
Liquid example (take only 3 products):
Products in this category:
{% for product in category.products limit:3 %}
- {{ product.name }} ({{ product.sku }})
{{ product.attributes }}
{% endfor %}
Ignored category attributes
Some category attributes are ignored because they are either not informative for content generation, frequently change, or cause issues. Check the ignored attributes list before using:
Attribute | Description |
---|---|
is_active | indicates whether the category is active (enabled) or not. |
url_key | the SEO-friendly URL key for the category, used in the category’s URL. |
path | the full path of the category in the category tree, showing its hierarchy. |
include_in_menu | defines whether the category is included in the store's navigation menu. |
position | the position of the category in the category list, determining its order. |
level | defines the level of the category in the category hierarchy (root, first level, second level, etc.). |
children_count | the number of child categories under this category. |
display_mode | defines how the category is displayed (e.g., as a list, grid, or with a static block). |
landing_page | the custom landing page associated with the category (if applicable). |
is_anchor | indicates if the category is an anchor category (i.e., allows products to be displayed directly within the category). |
custom_use_parent_settings | indicates whether the category should use the settings from its parent category. |
custom_apply_to_products | defines whether custom settings should be applied to products in the category. |
custom_design | specifies a custom design for the category, often used for special promotions or events. |
page_layout | specifies the layout used for the category page (e.g., 1-column, 2-column). |
layout_update | a custom layout update for the category page, often used to modify the layout dynamically. |
custom_layout_update | custom layout updates applied specifically to the category, modifying its page structure. |
custom_layout_update_file | a file that contains custom layout updates for the category page. |
Blog variables
The extension supports only a limited number of blog extensions. Please check if your blog extension is available before using.
Variable | Description |
---|---|
{{ post.title }} | title of the blog post. |
{{ post.content }} | main content of the blog post. |
{{ post.short_content }} | short content of the blog post. |
{{ post.meta_title }} | meta title of the blog post. |
{{ post.meta_description }} | meta description of the blog post. |
{{ post.meta_keywords }} | meta keywords of the blog post. |
{{ post.data }} | combined data of the blog post. |
{{ category.name }} | the category’s display name/title shown to users. |
{{ category.content }} | the main body content of the category page (rich text/HTML). |
{{ category.meta_title }} | the SEO meta title used for the category page. |
{{ category.meta_description }} | the SEO meta description for the category page. |
{{ category.url_key }} | the URL slug/key used to build the category page URL (e.g., mens-shoes ). |
Helpdesk variables
The extension supports only a limited number of blog extensions. Please check if your blog extension is available before using.
Variable | Description |
---|---|
{{ ticket.lastMessage }} | includes the content of the last. |
{{ ticket.customer }} | customer full name. |
{{ user.first_name }} | agent first name. |
{{ user.name }} | agent name. |
{{ user.last_name }} | agent last name. |