Configuring the widget manually
When you add a widget to Homepages or workspaces, you are prompted to either upload a widget or configure a widget.
To configure a widget:
- Click Configure to launch the wizard.
-
Specify this information for the Infor Business Context
parameters:
- Context name
- Specify the type or namespace of the message sent. The default value is InforBusinessContext.
- Automatically predict upon receiving IBC message
- Toggle On to display the prediction immediately. Toggle Off to display the prediction after the user request. A button option will be available in the contextual application.
- Entity property
-
Specify a property in the IBC message. For example, id1, id2. Entity property values must be unique for the same entity type.
Note: The in-context application will only perform the operation if the received IBC message type matches the context name, it has a defined entity type, and all defined IBC parameters have a value. - Name
- Specify a name for later use in the configuration. For example, specify VendorID.
- Entity Type
- Specify the entityType coming from the IBC message. For example, specify vendorItemMaster.
-
Optionally, specify this information for the API Gateway
input parameters:
This screen defines input parameters and path variables that allow configuration of dynamic values used as an input for API Gateway. Each parameter must have a source property specified. For API Gateway, these are the sources:
- IBC message: values defined in the first step of the configuration - Infor Business Context
- Helper function: The helper functions are: current day, current month, current year and custom value
- Products and Operations
- Specify the controls that are used to help the user find the desired API to call. The selected operation is used to fill the API Gateway path value and request method.
- ION API Path
- Specify the API Gateway operation to call. The path starts with slash. If the path contains any path variables, they should be specified within curly brackets. For example, /api/{variable}).
- httpMethod
- Select the request method. After you select the request method, such as POST or PUT, additional configuration is displayed for the input parameters.
-
Optionally, specify this information for API Gateway:
- Name
- Specify a user defined alias for the parameter.
- Path
- Specify a configuration that defines which value to be used in the widget resulting from the API Gateway. This value can be a string or dot notation.
-
Optionally specify these Coleman API
parameters:
- Endpoint name
- Search for and select the endpoint to call. After you select the endpoint, the input parameters count will be defined to match the endpoint schema.
- Input parameters
- The input parameters allow you to configure values used as an input payload to the Coleman AI Platform prediction.
- Source
- Specify the source. This is defined similarly to the API Gateway input parameters. There is a difference of an extra source. For example, the output parameters of API Gateway can be used as input to the Coleman API.
- Name
- Specify a name based on the selected source. The options vary based on the configuration in the previous steps.
-
Optionally, specify these Coleman data transformations if
an available Coleman API is used.
- Transformer name
- Specify a name for the transformer. This name will be available to select in the Visualization section.
- ION API Path
- Specify the API Gateway path. The path has the same configuration that was used in Step 4.
- Request method
- Select a request method from the list.
- Format result
- The format result determines how a formatted result should be displayed. These
are the two options:
- Interpolation: A text in the result input finds all variables that are wrapped with double curly braces, for example, {{ variable }}. Variable refers to the alias in the API Gateway output names.
- Let the transformer define its own HTML to be shown in the contextual app.
Note: JavaScript is not allowed and any script tags or javascript code are stripped out or sanitized. If you want to use the original value, the variable {{originalValue}} is available. This value is determined at runtime based on which field the transformer is used. See the Visualization step.
-
Specify the Message publishing parameters:
- IBC Publisher name
- Specify the name of the publisher. This name can be used in the Visualization step to assign the publisher to a part of the in-context application interface.
- Context name
- Specify the name that is used as a namespace of the IBC message being sent from the in-context application to the parent window.
- Trigger publish
- Select a value that determines how to trigger the endpoint response publishing. You can select a Single click or a Double click.
- Message to publish
- Specify the message to publish. This must be a valid JSON string where the variable interpolation is supported with double curly braces. For example, {{variable}} after the correct format message is available in the input.
-
Click Check for variables to load
all used variables. After you check the variables, the value of each variable
can be configured.
Note: If the publisher wants to send the IBC message for another generic Coleman API application, the message must be formatted as an IBC message. It must have a property entity as an array, because the in-context application only checks entities array in the IBC message and looks for
entityType
andid1
throughidX
. For example:{ "entities": [{ "entityType": "<entityType>", "id1": "{{originalValue}}" }] }
-
Specify these Visualization parameters:
-
Specify these fields to configure the Metadata display:
- Display label
- Prediction index
- Source
- Transform value
- Business context publishing
- Display label
- Name
- Source
- Business context publishing
-
Specify these fields for the Primary
display. The primary display can be prefixed and
suffixed.
- Display label
- Prediction index
- Source
- Transform value
- Business context publishing
- Prefix
- Suffix
-
Specify these fields for the Secondary
display. The secondary display can be prefixed and
suffixed
- Display label
- Prediction index
- Source
- Transform value
- Business context publishing
- Prefix
- Suffix
Note: If you do not configure a primary or a secondary display, the metadata display is used for the available space of the widget. -
Specify these fields to configure the Metadata display:
- Click Save. After saving, you can preview and download the configuration.
-
Click Text configuration to test
the widget before you use it as an in-context application. You can apply hard
coded values for the configured IBC messages. The test of the widget performs
the same logic that applies for the in-context application after it receives an
IBC message in the desired format.
Note: The toolbar is only available in the widget and is hidden in the in-context application.