## Overview

Triggers a configured interface. Here, if an export is being carried out, a file can be downloaded; if an import is being carried out, the user has the option of uploading a file.

The Trigger Interface Button widget provides a user-initiated mechanism for executing Generic Interface operations. Unlike scheduled or automatic interfaces, this widget gives users control over when data integration processes run, making it ideal for scenarios where timing depends on human judgment or external factors.

When clicked, the button executes a configured Generic Interface Definition as a background job, with optional file upload capability for import operations. Users receive progress feedback and can see execution results including any errors or warnings.

## Use Cases

### Manual Data Import
Users can import data from external systems on an ad-hoc basis. When file upload is enabled, a dialog prompts the user to select a file before the interface executes. This is useful for importing product catalogs, customer lists, or other data that arrives irregularly.

### On-Demand Data Export
Trigger exports when needed rather than on a fixed schedule. Useful for generating reports before meetings, creating data snapshots before major changes, or exporting data for external stakeholders.

### Manual Synchronization
Allow users to force synchronization with external systems without waiting for scheduled runs. Valuable when critical updates have been made and immediate synchronization is required.

### Single Page Export
Export only the page where the widget is embedded rather than a full dataset. This enables per-page export functionality for archival, sharing, or compliance purposes.

## Design Considerations

### Interface Definition Requirement
The widget must be linked to a valid Generic Interface Definition page, or the widget must be embedded on an Interface Definition page itself. This ensures the button always has a clear operation to execute.

### File Upload Mode
When enabled, the widget presents a file upload dialog before execution. The uploaded file is temporarily stored and passed to the interface processor. This mode is appropriate for import interfaces that process external files.

### Export Embedding Page Mode
When enabled, the interface exports only the page containing the widget rather than processing a broader dataset. This creates focused, single-page exports without requiring separate interface definitions for each page.

### Background Execution
Interface operations run as persistent background jobs. This allows processing of large datasets without blocking the user interface, though it means results are not immediately available after clicking.

## Embedding Options

The widget can be:
- Embedded as a standalone widget in page layouts
- Embedded within rich text content for inline placement
- Placed on Interface Definition pages for direct execution

The widget cannot be embedded in table cells or other restricted contexts.

## Alternatives

| Alternative | When to Use |
|-------------|-------------|
| Scheduled interfaces | When data integration should run automatically at regular intervals |
| Low Code Button | When you need custom scripted behavior rather than standard interface execution |
| Direct API integration | When external systems should push/pull data programmatically |

## Related Patterns

- **Interface Definition pages**: Configure the actual import/export logic that this button triggers
- **Generic Interface system**: The broader framework including runners, processors, and mappers
- **Simple Button Widget**: Parent widget family providing common button styling and behavior
