> For the complete documentation index, see [llms.txt](https://docs.mluvii.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mluvii.com/pro-it-specialisty/customizace/parametry.md).

# Parametry

{% hint style="success" %}
*Když je klient na webu delší dobu, můžete třeba předpokládat, že se nedokáže rozhodnout, jaký produkt si vybrat. Aby o tom operátoři měli informaci, můžete **přidat vlastní parametr** v momentě, kdy se nachází na stránce déle než určený čas.*
{% endhint %}

V nastavení spouštěcích pravidel v administraci aplikace vytvoříte nové pravidlo. Využijete parametr „čas strávený na stránkách“ a to větší než 120 sekund. V ten moment spustíte funkci s názvem „\_clientUndecided.“&#x20;

{% hint style="warning" %}
***V sekci*** [***Aplikace***](/pro-administratory/sprava-tenantu/nastaveni/aplikace.md) ***také musíte nastavit nový parametr a nazvěte ho např. „navod\_undecided“.** Ta se poté zobrazí ve frontě čekajících i po přijetí operátorem.*
{% endhint %}

Do „load“ event listeneru na vašem webu vložíte novou funkci jako metodu objektu $owidget, ve které nastavíte parametr:

```js
$owidget._clientUndecided = function() {
    $owidget.addCustomData('navod_undecided', true);
}
```

## Postup jak na to

{% hint style="info" %}
*Nejprve je třeba definovat parametr v aplikaci. Přejděte tedy do Nastavení -> Aplikace -> Parametry -> a poté vyberte možnost Přidat.*&#x20;
{% endhint %}

Vytvořte název a značku parametru - bude se zobrazovat operátorům - a uložte. Poté přidejte funkci do kódu widgetu `$owidget.addCustomData(NÁZEV PARAMETRU , HODNOTA PARAMETRU);`&#x20;

V aplikaci jsou dva druhy parametrů:

* Predefined:
  * URL stránky
  * Widget
  * Klientovo jméno
  * Klientovo tel. číslo apod.
* Vlastní parametry (vytváříte je sami)

{% hint style="warning" %}
*Důrazně doporučujeme vyhnout se odesílání prázdných hodnot (null) do parametrů v mluvii! Uložení prázdných hodnot způsobí chybu a také zabrání inicializaci skriptu na stránce!!!*&#x20;
{% endhint %}

{% hint style="info" %}
*Pokud potřebujete vždy odeslat hodnotu "null", použijte např. znak "-".*
{% endhint %}

{% hint style="success" %}
*Jestliže chcete mezi parametry probíhajících sezení zobrazovat např. prolink na záznam klienta v externím CRM systému, doporučujeme k tomu použít* [*REST API*](/pro-it-specialisty/public-api.md)*. Aplikace detekuje URL odkaz a vykreslí jej na straně operátora mezi ostatními parametry sezení.*
{% endhint %}


---

# 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://docs.mluvii.com/pro-it-specialisty/customizace/parametry.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.
