For the complete documentation index, see llms.txt. This page is also available as Markdown.

Example of hooking up a service component

Populating a component with a service

Below is an explanation of how to populate a component with data fetched dynamically from an external service. This ensures that the options list is always up to date and consistent with data from the external system.

Step-by-step configuration of the sample component:

  1. Selecting a component: To select a component, open the request in edit mode in Eximee Designer and select the component that is to be populated from the service.

  2. Selecting a data source: In the Properties panel, you need to go to the Interactions section and find the field External data source. Then click the Select a service. A window with a list of available services will open. In the search field, enter part of the name to filter the list of services, and then select the correct service from the list.

    Figure 1. External data source selection window after clicking the option "Select service" in the "External data source" field
  3. Description and version (optional): After selecting a service, a short description of the service's operation should appear below the field (if it has been defined), as well as the service version in the tooltip next to the name.

  4. Invocation condition (optional): If the service needs to be invoked only in specific situations, an invocation condition should be defined. To do this, click the field Add condition and enter a conditional expression in JavaScript (you can use getValue("COMPONENT_ID")). When the condition returns true, the service will be invoked.

    Figure 2. Example of an invocation condition for the attached service
  5. Caching results (optional): If the selected service returns static or rarely changing data (e.g. a country dictionary from a database), it is worth enabling the cache. The Cache option is located next to the service definition – selecting it will temporarily store the result of the service call and reduce the frequency of subsequent calls. Note: caching is recommended only for services that retrieve dictionaries or other unchanging data.

  6. Input parameter mapping: In the Input parameters in the EDS configuration window, the required input parameters of the service must be assigned from the form context. For each parameter, you can select the appropriate form component, a session variable, or enter a constant value. If the service accepts a list of values or multiple parameters at once, it is worth using the Select multiple option – it allows you to select several fields and add them one by one (by clicking Add) to a single input parameter.

    Figure 3. Window for mapping multiple input parameters available after clicking the "Select multiple" option
  7. Output parameter mapping: In the Output parameters you need to determine which output fields from the service correspond to which component attributes. The list of available attributes depends on the component type, and the list of parameters depends on the service definition. For example, assign:

    • Value (id) – the identifier/key parameter returned by the service,

    • Label (text) – the parameter containing the name/description of the item to be displayed,

    • Additional description (description) – the optional description parameter (second line).

    For each assigned parameter, you can optionally set a formatter – select the formatter name from the list if the data requires formatting (e.g. date format, number masking).

    Figure 4. Example of mapping the output parameter "value" to the "text" attribute and attaching a formatter to the mapped value
  8. Applying the settings: After finishing the configuration, save the changes. From that moment on, the component will be populated with data from the attached service. When the Eximee request is displayed, it will invoke the service and automatically fill in the list of values.

  9. Additional settings:

    • If the service returns additional description for each item (attribute description), make sure that in the Styling section of the component, the Additional description positionfield is set. Otherwise, the additional description may not be visible.

    • If needed, you can use the Simulation tab to attach a script simulating the service's operation. This allows you to test the form without access to the real backend – select an existing simulation script or add a new one in this tab.

    • The service can be removed from the component at any time – in the Interactions section, click the trash icon next to the name of the attached service to disconnect the EDS.

Repeatable section as a service input parameter

As an input parameter for the service, you can provide the identifier of a field located in a repeatable section. In this case, the service will receive a list of values from the specified field from all rows in the section.

Last updated

Was this helpful?