> For the complete documentation index, see [llms.txt](https://guide.tiledesk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.tiledesk.com/chatgpt-hacks/how-to-use-gpt-and-set-of-variables-to-make-enquires-about-products.md).

# How to use GPT & Set of Variables to make enquires about products

Here it is:

#### **1. First, select “Globals” from the left sidebar menu.**&#x20;

Then, add a new global variable, as shown in the image below.

<figure><img src="/files/Yvgqw10l5rsh1kxEjjAG" alt=""><figcaption></figcaption></figure>

#### **2. Next, choose a Key for your variables and input your price list in the Value section**

see image below

<figure><img src="/files/pzkPtS7LXe02k5yDQbAa" alt=""><figcaption></figcaption></figure>

#### **3. Now, return to the Blocks section to design the bot**

You’ll need an action called “Capture User Reply” to capture the customer’s response. You can assign an attribute to it. In this case, I used ‘UserReply’ as the attribute

<figure><img src="/files/R5CNneYjNVg5YJE5Omig" alt=""><figcaption></figcaption></figure>

#### **4. For the next block, use the ‘ChatGPT Task’ action**

You can see the prompt that includes the Global's attribute created earlier under ‘pricetable’. Getting the perfect prompt might require a few attempts to get it just right.

<figure><img src="/files/o6R8TtsLxLux8aTKcA4T" alt=""><figcaption></figcaption></figure>

**5. Finally, add a new reply block and simply choose the gpt\_reply.**

<figure><img src="/files/zH160WvZ9nWZ3EA5Aon4" alt=""><figcaption></figcaption></figure>

That’s it! In the video below, you can see how the bot finds the price in the table and shares it with the user.

<figure><img src="/files/0LZHOJyZFL3uk9YeAS1w" alt=""><figcaption></figcaption></figure>

Cheers

Tiledesk Team


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://guide.tiledesk.com/chatgpt-hacks/how-to-use-gpt-and-set-of-variables-to-make-enquires-about-products.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
