Creating & Configuring Process Hooks

Learn how external system process hooks are Hosted, Coded and Configured with the Directscale system

👍

Best Practice for Self-Hosted Web Applications

The Directscale Corporate Admin Application is Hosted with Azure in their West US Datacenter. Process hooks execute synchronously and add overhead to the Directscale system. It is recommended that clients host Web Applications with Azure in their West US Datacenter to reduce the latency of calling the External System. Learn more by reading Writing and Hosting Client Web Applications

👋 Make sure to read this content before continuing


Coding Process Hooks


Scenario #1: Coding a Before Hook

Scenario #2: Coding an After Hook

Scenario #3: Use a Directscale Service in a Hook

❗️

Scenario 3 adds logic to the Orders.SubmitOrder Hook for demonstrating how to use a Directscale service in a Process Hook. Any logic added to a Process Hook decreases the performance of Directscale systems. Process Hooks should only change logic like Scenarios 1 & 2. This scenario would be most performant if it was coded as a WebHook. Reference Coding a WebHook to see this scenario implemented as a Webhook.


Configuring Process Hooks


📘

For Clients using the Client Extension

Configurations are managed by the Client Extension and should not be updated with the UI. Find out more about how configurations are managed by reading Deploying The Client Extension

  1. Login to your Corporate Admin.
  2. Select 'Tools' and then 'Developer Tools' from the main menu.
  3. Click on 'Hook Manager'
  4. Use the search box to find the name of the Event you want to hook and click on the Hook Name.
  5. Enter the endpoint that implements the custom Process Hook logic.

Pro Tip: Click Models for JSON examples of the payload Directscale sends and expects to receive

596596

Figure 1. Hook Configuration Modal in the Corp Admin Application


🚧

Warning displayed if using the Client Extension

Process Hook configurations are updated to the configurations made in the source code of the Client Extension each time it is deployed. The yellow warning displayed in Figure 1 will appear if the Client Extension solution is enabled for a client.


Did this page help you?