# Poll Processors

The *Poll Processor* is a configuration record which contains the logic that will be applied when polling a remote system for data. There are three main scripts which are used to setup, execute and process the Poll Requests.

## Setup Script

The *Setup Script* is the first script to run (it runs at the point in time the Poll Request is created). It is used to build the environment for the poll and define what it will do (for example, create/setup the URL that will be called). It also supplies a `params` object as one of the arguments, which will be passed through to the subsequent scripts *(and on to further Pollers, if required)*.

## Request Script

The *Request Script* is used to reach into the remote system and execute the request. This is usually done by making a REST call to the URL defined in the *Setup Script*.

## Response Script

The *Response Script* is used to process the information returned from the remote system. This could include converting the data from its proprietary format to a more usable format, sending the data to **Unifi**, or even kicking off a new poll.


---

# 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.sharelogic.com/unifi/3.1/polling/poll-processors.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.
