> For the complete documentation index, see [llms.txt](https://documentation.connexica.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.connexica.com/pages-reports/work-queues.md).

# 13. Work Queues

Use the Work Queue editor to create custom workflows that facilitate the automation of outcomes driven by submissions.

To view all available Work Queues, click **Open** under the **Work Queues** header.

To modify an existing Work Queue, click the **Open** button for the desired item to open the editor. Use the **Edit** button to modify the **Name** and add a **Description**.

Click **Import work Queue** at the top of the page to view the import options, where the relevant file can be selected and imported into the system.

## Creating a Work Queue

{% stepper %}
{% step %}

### Start the creation process

Click the **Create Work Queue** button on the first tile.
{% endstep %}

{% step %}

### Enter the Work Queue details

Enter a name in the **Name** textbox and use the **Description** textbox to enter additional information, if required.
{% endstep %}

{% step %}

### Select the Work Queue type

Use the **Type** radio buttons to select between **Automated** and **User**.

* **Automated** Work Queues are triggered by submissions and will automatically run when conditions are met.
* **User** Work Queues initiate on-demand through manual activation.
  {% endstep %}
  {% endstepper %}

## Work Queue Editor

The Work Queue Editor screen features a drag-and-drop interface to allow users free placement of components on a grid. To add a component, drag the desired option from the floating component toolbox to the desired position on-screen.

Single click a component to expose a brief overview in the **Summary Pane**, where each configured option is displayed alongside a **Valid** or **Invalid** flag. To edit an added component, either click the **Edit** icon from the summary pane or double click the component on the grid. To remove an added component, click the **Delete** icon from the summary pane.

To link components in the required order, click and drag the **Connection** dot from one component to another. When adding a **Condition**, an arrow can be generated for each specified outcome.

At the bottom of the screen, the **Current Status** will indicate either a **Valid** or **Invalid** status. An **Invalid** Work Queue will indicate incorrectly configured components by highlighting them in red.

### Actions

Actions dictate an outcome via configurable options for each component.

#### Condition

Use the **Condition** component to create bespoke conditions based on calculation functions, custom values, conditional statements and fields within a form.

For more information regarding the available calculation functions, please refer to the \[Calculation Functions Index]\(doc:Technical Documentation.CXAIR.User Guide.02. Reporting.2c. Crosstabs.2ci. Calculation Builder.WebHome||anchor="Functions") section of the \[Calculation Builder]\(doc:Technical Documentation.CXAIR.User Guide.02. Reporting.2c. Crosstabs.2ci. Calculation Builder.WebHome) chapter.

To create conditions, specify the output in single quotes (**' '**). For example:

```
CASE
WHEN '9_Would_you_recommend_this_course_to_colleagues?' = 'No' THEN 'No'
WHEN '9_Would_you_recommend_this_course_to_colleagues?' = 'Yes' THEN 'Yes'
END
```

The above example creates two conditions, **No** and **Yes**, represented as two separately labelled arrows in the edit screen. Each condition can then be assigned an outcome by connecting the components.

Use the **Fields** options to select between fields present in an added form. The available fields are organised into their relevant steps.

#### Modify Submission

Use the **Modify Submission** component to append and replace submission values for fields through calculation functions, custom values, conditional statements and fields within a form.

For more information regarding the available calculation functions, please refer to the \[Calculation Functions Index]\(doc:Technical Documentation.CXAIR.User Guide.02. Reporting.2c. Crosstabs.2ci. Calculation Builder.WebHome||anchor="Functions") section of the \[Calculation Builder]\(doc:Technical Documentation.CXAIR.User Guide.02. Reporting.2c. Crosstabs.2ci. Calculation Builder.WebHome) chapter.

Use the **Replace** radio buttons to select either:

* **Append**, where a submission is supplemented with the calculation output.
* **Replace**, where a submission is replaced with the calculation output.

#### Database

This component facilitates the export of the form data to a database.

Select a previously configured Database Connection from the **Database Connection** drop-down list, then specify the target **Table**.

For more information regarding the setup of \[Database Connections]\(doc:Technical Documentation.CXAIR.Administration Guide.6. Advanced Configuration.Database Connections.WebHome), please refer to the \[Database Connections]\(doc:Technical Documentation.CXAIR.Administration Guide.6. Advanced Configuration.Database Connections.WebHome) chapter.

#### Message

Configure an email that will be sent to users or groups.

Enter the required message in the **Message** textbox and specify the recipients using the **Users** & **Groups** fields. These fields will automatically suggest results once two or more characters are typed in.

#### Validate Against Index Field

This component allows you to compare a value submitted within a field on the form against an entire column of values within an index.

Select the field from the appropriate step in the form and then the Index Field from a previously configured Index using the drop-down lists.

This comparison results in two conditions, **Valid** and **Invalid**, represented as two separately labelled arrows in the edit screen. Each condition can then be assigned an outcome by connecting the components.

#### Create PDF

Configure an PDF document that can be saved to a folder directory and emailed to users or groups.

Enter the required message in the **Email Body** textbox and specify the recipients using the **Users** & **Groups** fields. These fields will automatically suggest results once two or more characters are typed in.

#### Label

This component allows you to set a label against the submission record. This can be viewed in the index and can also be used to restore the data to this point. Bespoke conditions can be configured to specify the label set using calculation functions, custom values, conditional statements and fields within a form.

### End Points

Specify the desired result of the Work Queue to signify when the chain of components will reach its conclusion.

#### Index

Stores the form in its Index. This is the default action and no further processing is done.

#### Work Queue

Add this component to send the form to another Work Queue, facilitating multiple stages of processing.

Select the desired value from the **Work Queue** drop-down list to specify the target Work Queue.

#### Form

After this branch of the Work Queue is complete, specify the form that will be loaded.

Use the **Project** and **Form** drop-down lists to specify the required form.

#### Report

After this branch of the Work Queue is complete, specify the report that will be loaded.

Click **Select Report** to present the Load screen, where a previously saved report can be selected.

#### Pop Up

Displays a pop up message and/or image based on the condition set in the workflow.

Select **Do not submit form** if the condition met requires data to not be submitted to the forms index.

> *Example; we have a valid condition which produces Pop Up A and an invalid condition which produces Pop Up B. We do not want data to be added to the form index in the case of Pop Up B criteria being met, therefore, we select the **Do not submit form** option on Pop Up B only.*
