Open topic with navigation

# send_agent_query

The `send_agent_query` function queries an IDOL server for agents matching the provided document.

## Syntax

    send_agent_query( doc [, params] )

## Arguments

Argument | Description
--- | ---
`doc` | (LuaDocument) The document for which you want to find agents.
`params` | (table) Named parameters that configure the query. The table maps parameter names (String) to parameter values. For information about the parameters that you can set, see the following table. For information about how to use named parameters refer to the Connector Framework Server Administration Guide.

## Named Parameters

Named Parameter | Description | Configuration Parameter
--- | --- | ---
`section` | (string) The name of a section in the CFS configuration file. If you set this then any parameters not set in the parameters table are read from this section of the configuration file. |
`host` | (string) The host name or IP address of the IDOL Server. | `Host`
`port` | (integer) The ACI port of the IDOL Server. | `Port`
`fields` | (table) The fields in the document to use when searching for agents. This takes the form of a table which maps field names in the document to field names in the query. |
`field_boolean` | (string) The method used to join the field specifications. Must be `"AND"`, `"OR"`, `"XOR"`, `"EOR"`, or `"NOT"`. |
`query_with_full_document` | (boolean) To use the full document in the query, set this argument to `true`. If you use the full document, the `fields` and `field_boolean` arguments are ignored. The default value is `false`. |
`extra_parameters` | (table) Additional parameters to include in the query. This takes the form of a table that maps action parameters to specific values. |
`ssl_section` | (string) The name of the section in the CFS configuration file that contains SSL settings for outgoing communication with the IDOL Server. | `SSLConfig`

## Returns

String. The XML response from IDOL, detailing any matching agents. You must use `parse_agent_response` to convert the response into a usable form (see parse_agent_response).

## Example

    local agent_response = send_agent_query(
       document, {host = "server", port = 9090,
       fields = {DRETITLE = "training", DRECONTENT = "training"}})

© Copyright 2018 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm