AI-Powered Input Fields
Found in: Settings > AI InputsThe AI-Powered Input Fields feature adds intelligent assistance to text fields throughout the Syncontrol platform. Users can select from pre-configured AI prompts that process field data along with optional file attachments, streamlining data entry and improving content quality.
Using AI Input Fields
Once an AI input is configured, it becomes available to users on the matching pages and fields.
Accessing the AI Assistant
When you navigate to a page that matches the configured URL pattern, an orange button with a sparkle icon appears next to input fields that match the CSS selector. Clicking this button reveals a dropdown with available AI prompts for that field.

Each prompt shows its title (e.g., “AI Risk: Product description”). If you have administrator permissions, a pencil icon appears next to the prompt name, allowing you to quickly access the configuration interface.
Chat Interface
Selecting a prompt opens a chat-like popup where you can interact with the AI assistant. The system message indicates the assistant is ready, and you can type your instructions or questions in the text field at the bottom.

The AI processes your input along with any context data and attached files configured for that prompt. Responses appear in the chat, and you can continue the conversation to refine the output before inserting it into the field.
Prompt Preview (Administrators)
Administrators can access the Preview tab in the configuration interface to test how prompts will be processed. This tab shows:

Prompt Preview (with context substitution) Shows the prompt template with variables replaced by actual values from the current page context. This helps verify that your variable paths are correct and data is being pulled as expected.
Current Context Data (JSON) Displays the complete JSON object available for variable substitution. Use this to explore what data is accessible and find the correct paths for your prompt variables.
Matched Files Lists files that match the configured file filter, showing which documents will be available for AI processing.
Copy Context & Help / Copy Context Use these buttons to copy the context information to your clipboard. You can then paste this into ChatGPT or another AI assistant to help write and test prompt templates before saving them.
Working with AI Responses
Once you open the chat interface, you can interact with the AI in several ways:
Quick Generation Click the send button without typing anything to generate content based solely on the configured prompt and context data. The AI will process the prompt template with all available context and return a response.
Adding Instructions Type additional details or instructions before sending to guide the AI’s response. For example, you might specify a particular format, tone, or focus area.

When the AI responds, you’ll see the generated content in a highlighted message. The Apply button appears at the bottom of the chat - clicking it inserts the AI’s response directly into the target field on the page.
Refining the Response If the initial response isn’t quite right, continue the conversation to modify it. Type follow-up instructions like “make it shorter”, “add more detail”, or even creative requests like “translate in pirate”.

The AI maintains conversation context, so each refinement builds on the previous response. Continue iterating until you’re satisfied with the result, then click Apply to insert the final version into the field.
Key Capabilities
Intelligent Text Processing The assistant can enhance, correct, translate, or transform text based on the selected prompt configuration. This includes technical terminology correction, multi-language translation, and content enhancement.
File Attachment Support Documents and images can be attached to provide additional context. The system extracts text from PDFs, Word documents, and uses OCR (Optical Character Recognition) for images and scanned documents.
Context Awareness Prompts can access information about the current page, user, and entity being edited to provide more relevant suggestions.
Configuration
AI prompts are configured through the Settings > AI Inputs menu. The configuration interface has four tabs:
Basic Information
| Field | Description |
|---|---|
| Title | Display name shown in the dropdown (e.g., “Field: Risk level conclusion”) |
| Description | Explanation of what this AI input does and when to use it |
| CSS Selector | CSS selector to target specific input fields or textareas on the page |
| URL Pattern | URL pattern where this AI input should be available |
Understanding CSS Selectors
CSS selectors identify which input field on the page should display the AI assistant. The selector must match an input element, textarea, or editable field. In Syncontrol, most form fields have data attributes that make targeting straightforward.
To find the correct selector, use your browser’s developer tools (F12 or right-click > Inspect). Look for unique attributes on the input element you want to target. Syncontrol form fields typically use data-mobile-field-code attributes that correspond to the field’s configuration name.
| Selector Type | Example | Matches |
|---|---|---|
| Attribute exact | [data-mobile-field-code="risk_level_conclusion"] | Field with exact code |
| Attribute contains | [data-mobile-field-code*="risk"] | Any field with “risk” in code |
| ID selector | #description-field | Element with specific ID |
| Class selector | .inspection-notes | Elements with specific class |
| Combined | textarea[name="comments"] | Textarea with specific name |
Understanding URL Patterns
URL patterns control which pages display the AI input option. This prevents prompts from appearing where they’re not relevant. The pattern matches against the page path (everything after the domain name).
Use * as a wildcard to match any characters. Leave the field empty to make the AI input available on all pages. Multiple patterns can be separated by commas, and the AI input will appear if any pattern matches.
| Pattern | Matches | Does Not Match |
|---|---|---|
/bookings/* | /bookings/123, /bookings/new | /booking/123 (no ‘s’) |
/accessable/*, /jobs-to-review/* | Both /accessable/456 and /jobs-to-review/789 | /other-page |
/inspections/*/edit | /inspections/123/edit | /inspections/123/view |
| (empty) | All pages | — |
Prompt
The AI Prompt tab contains the instruction template that guides the AI’s response. Prompts can include:
- Detailed instructions for the AI’s task
- Examples of expected output
- Context variables that get replaced with actual data
Variable Syntax
Two notation styles are supported for inserting dynamic data into prompts:
| Style | Example | Description |
|---|---|---|
| Lodash Dot Notation | {{context.model.id}} | Model ID |
{{context.model.user.name}} | Nested property | |
{{files.document.content}} | File content | |
| JSONPath Syntax | {{$.context.model.id}} | Same as dot notation |
{{$..name}} | Find all “name” properties | |
{{$.files[0].data}} | First file’s data | |
{{$.context.model[?(@.status=="active")]}} | Filter by condition |
Variables that don’t exist will be left as-is in the output. Objects and arrays are automatically JSON-formatted.
Lodash Dot Notation
Lodash notation uses simple dot-separated paths to access nested data. This is the easier syntax for straightforward data access. Start from the root object and chain property names with dots.
The available root objects depend on the context where the AI input is triggered. Common roots include context (page and model data), files (attached file contents), and field (current field value).
Example - Booking summary prompt:
Provide summary of the data for booking {{context.model.booking_uuid}}
Client Man Day rate: {{context.model.client.inspect_man_day_rate}}
JSONPath Syntax
JSONPath provides advanced querying capabilities when you need to filter, search, or access array elements. It always starts with $ representing the root object. Use this when Lodash notation isn’t sufficient for complex data structures.
JSONPath is particularly useful when working with arrays of files or when you need to find values across nested structures without knowing the exact path.
Common patterns:
| Use Case | JSONPath | Description |
|---|---|---|
| First attached file | {{$.files[0].data}} | Access first file’s extracted text |
| All file names | {{$..filename}} | Find all filename properties recursively |
| Filter by status | {{$.context.items[?(@.status=="approved")]}} | Only items where status is “approved” |
| Specific array index | {{$.context.defects[2].description}} | Third defect’s description |
| Last item | {{$.files[-1].content}} | Last file’s content |
| Array length | {{$.context.model.products.length}} | Count of items in array |
| All items from array | {{$.context.model.products[*].name}} | All product names |
Example - EU compliance report prompt:
# You are an EU product compliance consultant. You are working for your
# client who needs your help & expertise. You need to provide a structured
# report for a product that will be put on the EU market.
If possible, follow the approach and the format suggested in annex C of
the ISO 10377:2013 standard or in
https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:32019D0417
--- DESCRIPTION ---
{{$.context.model.inspectionModel.data.product_description.value}}
--- APPLICABLE EU LEGISLATION ---
{{$.context.model.inspectionModel.data.applicable_eu_legislation}}
Example - Product listing prompt:
Provide summary of the data for booking {{context.model.booking_uuid}}
There are {{$.context.model.products.length}} products: {{$.context.model.products[*].product_name}}
Access Control
Configure which users can access this AI input using a permission matrix
Files
Configure file filters to control which files are available for AI processing. Filter groups use AND logic within a group.
Filter Criteria:
| Criterion | Description |
|---|---|
| Filename | Match by filename (Equals, Contains, Starts with, Ends with) |
| File Size | Filter by file size |
| Folder | Match exact folder name |
| Subfolder | Match exact subfolder name |
| Properties (JSON Path) | Filter by file metadata properties |
| Object Table | Filter by associated object table |
Multiple conditions can be combined with + AND to create complex filters. Use Add Filter Group to create OR logic between groups.
File Processing
The system supports various file formats for text extraction:
- PDF Documents - Direct text extraction
- Word Documents - DOC and DOCX parsing
- Images - OCR via Azure Computer Vision
- Scanned Documents - OCR processing for image-based PDFs
Use Cases
Inspection Forms
AI assistance helps with:
- Risk level assessment and conclusion generation
- Defect description enhancement
- Technical terminology correction
- Multi-language translation
Template Builder
The AI can suggest:
- Field labels and descriptions
- Validation rules
- Help text and placeholders
Document Processing
Extract and process information from:
- Booking documents
- Technical specifications
- Scanned forms
Usage Monitoring
The platform tracks AI usage for billing purposes:
- Tokens consumed per request
- API calls per user/tenant
- OCR processing events
See also: Inspections