Custom Actions & Smart Links

Custom Actions allow users to trigger an agent or perform an operation directly from the OTM UI against a selected list of transactions. Smart Links are similar but operate on a single selected record and navigate the user to related data. The example below shows how to configure a custom action that triggers an INVOICE agent when a user selects ‘Reprocess Invoice’ from the Actions menu on a list of invoices.

Step 1 — Create a Label (login as DBA.ADMIN):

Configuration and Administration > User Configuration > Label Manager

Create a new Label record. The Label ID and text you enter here will appear in the Actions menu in the UI.

OTM Label Manager screen showing a new label record

Step 2 — Create a Custom Action (login as domain ADMIN):

Configuration and Administration > User Configuration > Actions Manager

Create a new Action record with the following fields:

Action: Give the action a unique name.
Label: Select the label created in Step 1.
Action Definition ID: Enter RUN_AGENT_INVOICE (or the appropriate action definition for your use case).
Agent ID: Select the name of the agent that should trigger when this action is invoked.
Note: The agent is called by name rather than by event. If you create a new version of the agent, you must come back to this custom action and update the Agent ID to point to the new agent name.

Step 3 — Add the Action to a Screen Set:

Configuration and Administration > User Configuration > Screen Set Manager

Query the screen set for which you need to add the custom action. Go to the Actions tab, select Top on the hierarchy list, click the + button, and select Add Actions. In the Actions dropdown, select the label you associated with the new action, then save.

Testing:

Open your custom manager layout, select a few invoices, click the Actions button, and select the action label. This triggers the agent on the selected invoices.

Smart Links:

Smart Links are configured using the same steps as Actions with one difference: in the Screen Set, add the custom action under the Smart Links tab instead of the Actions tab.

The key difference between Actions and Smart Links is scope:

  • Actions operate on a group of selected transactions. For example, you can select 10 order releases and trigger a Bulk Plan across all of them.
  • Smart Links operate on a single selected transaction. For example, selecting a specific order release and clicking ‘Related Buy Shipment’ fetches the shipments associated with that one order release.

Questions & Discussion

Have a question about this topic? Post it below using your GitHub account. Comments are visible to everyone and help other OTM consultants with the same question.