> 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="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FZT58fjv2QariF8Em47cW%2F2zfva7-globals1.png?alt=media&amp;token=d4745401-7685-4f23-b65f-45d067876e5c" 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="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2F8Y3O6kHGHc2UFDdsPXYO%2F2zfvcw-globals2.png?alt=media&amp;token=a9f5b7e9-5a2f-40d9-bfd8-07e703af7344" 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="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FOHg54SNqi9qQDrowAqfl%2F2zfvd6-globals3.png?alt=media&amp;token=51e00654-daf5-4a37-a261-348db7d5e426" 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="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FufOdR22CjRJCFJZwNpXz%2F2zfvdm-globals4%20(1).png?alt=media&amp;token=4d12cb27-7681-4daf-8c3f-78372d0bb063" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2F0cwZRaar1bRjDIjPySaY%2F2zfve2-globals5.png?alt=media&amp;token=76b82034-dcf4-4f23-a75f-fd4790525bc9" 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="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FCrGgPKaqskOweEsVawzJ%2F2zfveh-globalsgif.gif?alt=media&amp;token=8aed1779-69da-4913-a493-2cc58d68cfa1" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
