Agents - Agent Event Restrictions

Agent Event Restrictions give you control over which types of transactions trigger an agent, and optionally allow you to validate inbound XML transactions before they are committed to the database.

Access this by clicking the “i” icon on the agent header screen:

The Event Restrictions panel appears:

Source Options:

INTEGRATION: Triggers the agent only when the business object (e.g., Order Release) is created by an inbound GlogXML transmission from an external system. Use this when you want agent logic to run only for XML-uploaded transactions.
INTERNAL: Triggers the agent only when the business object is created by a standard OTM internal action, such as "RELEASE ORDER BASE". Use this when the agent should respond to system-generated events, not user or integration activity.
USER: Triggers the agent only when the business object is manually entered by a user within the OTM application.
Tip: You can select multiple sources at once — hold Ctrl and click each source you want. Most users miss this and assume only one source can be selected at a time. If your agent should fire regardless of how the record was created, select all three sources.

Before Persist:

The Before Persist option allows validation of an inbound XML transaction before it is committed to the database.

Example: Validate that a required reference number exists in an inbound PO XML before creating the Order Base record. Suppose the integration layer sends OTM XML and you want to create the PO only if the reference number SOURCE_SYSTEM is present.

Create the following agent:

In the Restrictions section, check the Before Persist box:

Note: Once Before Persist is selected, the list of actions available in the Agent Actions section changes. They will differ from the standard ORDER BASE – CREATED action set.

Set the following expression to check for the reference number in the XML:

#OB_REFNUM/OB_REFNUM_QUAL_GID<>DOMAIN.SOURCE_SYSTEM

If the SOURCE_SYSTEM reference number does not exist in the XML, the standard DON’T PERSIST action is triggered — meaning the PO is not created in OTM.

Upload a PO XML without the SOURCE_SYSTEM reference number. The transmission will show as PROCESSED, but no Order Base record will be created:

If you repeat the upload with the reference number present, the Order Base record is created successfully. This feature is useful for enforcing data quality rules on transactions arriving from external systems.

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.