# Tesco Query Command (/tesco)

The Tesco query command provides stock information, regarding specific products in designated areas.

## Usage

### Finding a Tesco product number

Firstly, find the product you want to query on the Tesco website, below is an example.

<figure><img src="/files/fE1WXk7wllKfC8bsfbpu" alt=""><figcaption><p>Example Tesco product</p></figcaption></figure>

<figure><img src="/files/YTcntmYk5S8YUavWnlv4" alt=""><figcaption><p>Tesco product URL</p></figcaption></figure>

Now, looking in the URL, you can find the [Tesco Product Number (TPN)](https://edwardcallow.co.uk/tesco-jargon/t.html#tesco-product-number-tpn). In this example, that is **308103753**.

### Running the /tesco command

Now in the Discord server running Mercury Dynamics bot, type the following command:

<figure><img src="/files/yR00KpJoaPetwN0c06a4" alt=""><figcaption><p>Example Tesco command</p></figcaption></figure>

The parameters of this command are below:

* storetype - This defines what kind of store you want to search in (autocompleted)
* postcode - This is the postcode you want to base your search around
* identifier - This is the TPN
* public - This defines whether your command/results are seen by only yourself, or others
* radius - This is how far from the defined postcode the bot should search (autocomplete)

If done correctly, you should receive a result like so:

<div align="left"><figure><img src="/files/CnfRxajY4bijIH5cPwZX" alt=""><figcaption><p>Example Tesco results</p></figcaption></figure></div>


---

# Agent Instructions: 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:

```
GET https://docs.mercury-dynamics.co.uk/bot-commands/tesco-query-command-tesco.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
