Message Triggers

General Add comments

When implementing Integrations to external systems the normal way to trigger outbound messages is by using Business Rules and Script Includes that will validate and decide if a message needs to be transmitted to external systems.

The concept that I am going to discuss uses a different data driven approach:

Message triggers.
It has some specific advantages, I will list them below.

Let’s start with a real life example:

The Integration table is a custom table for all data directly related to the specific Integration and consists of 7 main elements:
• Generic data: Id, Company, Interface Type and Service Type
• SOAP data: Outbound SOAP messages to use, SOAP inbound Data
• Mapping: Integration specific mapping data
• Process Flow: Allows for Integration specific data handling
• Translations: Uses a custom Translation table for translation inbound and outbound elements.
• Transactions: every inbound and outbound message for this Integration is logged in a transaction table for traceability and error solving by keeping track of the message transfer status. It also allows for easy retransmission in case of errors.
• and finally Message Triggers:


The Trigger Table, Message, Order and Condition are the key parts used.
Trigger Table will decide for which table the trigger is valid.
Message will decide which outbound message will be created.
Order will decide the Order in which Transactions will be created.
Condition will hold the code that decides that a message needs to be created.

By writing a simple BR for the Trigger Table (or Task in this case because we also will trigger on other Task related tables):

The script Include will handle following tasks:

• Get all Message trigger for the Table.
• Check all Message Trigger conditions for a True result.
• Sort the found Triggers on Order.
• Create a Transaction (Message = Transaction Type) for every found Trigger.

The advantages of this approach are:

• Cleaner and more robust triggering.
• Easier to debug.
• Trigger Coding is done in the Message Trigger conditions.
• Easy to trigger for multiple integrations and multiple messages on 1 update event.
• Easy to expand to other tables on which you would like to trigger.
• Easy to add new Triggers.

Work Order Example:

I hope that during your next integration this will help you in using a more data driven approach.
If you have any question, please let me know or leave a comment .img[at].img

One Response to “Message Triggers”

  1. Chris Nanda Says:


    Great post! This is exactly how I built out a generic outbound messaging system for target 4 years. It’s a wonderful setup, and if you want shoot me an email. I have some enhancements to this that effectively make outbound messaging exactly like import sets and transform maps.

    Cool stuff!

Leave a Reply