Routing

Routing

This event hook is triggered when an item is routed within the client. This is designed to be used for more complex routing rules when a traditional routing rule is not sufficient. An example where this could be beneficial is using external data sources or web services to determine where the ILLiad request should be routed to next.

Event Hook Name: Route

Input Parameters

TransactionNumber

The transaction number that was routed.

CurrentStatus

The current status of the routed transaction.

Output Parameters

The output parameters should be explicitly set if the addon will be handling custom routing the request.

NewStatus

The current status of the routed transaction.

Handled

A boolean value to indicate if the addon has handled routing for the transaction. If this is set to false it is assumed that routing was not handled and should continue to use traditional routing rules.

Non-triggered Routing

The routing hook will not be triggered in some areas of the Client when a request is routed. In these instances, it is suggested to use server addons to re-route a request.

Email Routing

All transactions routed to the DefaultStatus as part of the e-mail routing process.

Borrowing Check In/Mark In Transit Returned Batch Processing

Typically routed to In Transit from Customer, Item Checked In, Item Not Picked Up, and Awaiting Return Label Printing.

Borrowing Mark In Transit Received Batch Processing

Typically routed to Awaiting Customer Contact and Awaiting Document Delivery Customer Contact

Article Exchange Delivery

Typically routed to Awaiting Article Exchange Notification and/or Request Finished after uploading an article exchange document.

Example

The following is an example of the syntax used to register for the Route event hook that will look for and has a sample handler to add a note to the processed transaction.

function Init() RegisterSystemEventHandler("Route", "ProcessRoute"); end function ProcessRoute(routeEventArgs) if (routeEventArgs.CurrentStatus == "Search My System Routing") then local foundInExternalSystem; local newStatus; foundInExternalSystem, newStatus = CheckExternalSystem(routeEventArgs. TransactionNumber); if foundInExternalSystem then SaveDataSource("Transaction"); ExecuteCommand(routeCommand, { routeEventArgs.TransactionNumber, newStatus }); routeEventArgs.NewStatus = newStatus; routeEventArgs.Handled = true; return; end; end end function CheckExternalSystem(tn) --The details of implementing an external check is outside the scope of this --example. For the purposes of this example this check will always return true --and "Awaiting My System Processing". return true, "Awaiting My System Processing"; end\