# Prompt Trigger Polling

{% hint style="success" %}
Leopard sends no user input when polling. It does add &#x61;**`command=prompt`**&#x72;equest parameter to each poll request.
{% endhint %}

{% hint style="danger" %}
Your Teneo solution must return the number of active flows to Leopard for every request. This is needed so that the polling is only active when there are no active flows (you are not mid dialog)&#x20;
{% endhint %}

{% code title="Post Processing" %}

```groovy
_.putOutputParameter("numActiveFlows", "" + _.getActiveFlows().size())
```

{% endcode %}

## Screenshots

<div align="left"><img src="https://4062709520-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-La71Iy76rotlqbCOWoQ%2F-M7TsU02ml5Gwl69wZsu%2F-M7TspN1yqvHGlTGCltQ%2Fpoll.png?alt=media&#x26;token=06b6901f-6a7b-4669-9db3-bbd49a0a91e4" alt=""></div>

![A catch all flow that handles every poll request](https://4062709520-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-La71Iy76rotlqbCOWoQ%2F-Lru-stM_LiwpleWwWEK%2F-Lru30ksgERXRD8vR2Hj%2Fcatch-all-flow-polling.jpg?alt=media\&token=2d5a7c09-6841-44c6-b7da-0f5f7d1c7bd2)

![A contrived flow with a Prompt Trigger that only executes when the current minutes are even numbers ](https://4062709520-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-La71Iy76rotlqbCOWoQ%2F-Lru-stM_LiwpleWwWEK%2F-Lru3BkXOnEce0haI_D-%2Fprompt-triggered-flow.jpg?alt=media\&token=f2fd4009-3443-4789-adf3-ca68c99fe479)

<div align="left"><img src="https://4062709520-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-La71Iy76rotlqbCOWoQ%2F-Lru5R8mf2wS_aPkqoX1%2F-Lru5TM9qPptdizUvBYP%2Fpolling-working-in-leopard.jpg?alt=media&#x26;token=b86fcf29-7d60-4a79-9512-213902cdf2f7" alt="Answers form Flows triggered via Prompt Triggers showing in Leopard"></div>
