Use Business Rules to Automate Your Dispatching
In Helm CONNECT Jobs, business rules allow you to set up conditions that automatically trigger actions—such as events, jobs, and webhooks—when changes are made to your orders. This article describes how to set up the conditions for a business rule and how to set up the action that will be triggered when the conditions are met.
Note Watch a recording of the Jobs business rules advanced training session.
Use a Business Rule to Trigger an Event
A business rule can trigger events for surcharges and reporting. For example, you could create a late change event to trigger a surcharge if the trip start time is changed within four hours of the planned start time.
To set up a triggered event
- Go to the Setup > Business Rules > Business Rules tab.
- Click New Business Rules.
- Use the Name field to give the new rule or rules a name.
- Click in the Division field and select which division the rule or rules will apply to. The rules will apply to the selected division and any divisions below it on the division tree.
- (Optional) Under Effective, enter a start or end date, or both.
- Select the Triggered Event sub-tab.
- To add the first condition, click Add Condition then click Select a field to display a list of options. Configure the condition as needed.
- (Optional) To add another condition, repeat Step 7.
- From the Event Type list, select the type of event that will be triggered.
- (Optional) You have the option to pre-populate specific fields, such as Location or Description. Click Show all effects to see more fields.
- Click Save Changes.
Use a Business Rule to Trigger a Job
A business rule can trigger jobs based on details such as a location or the size of the ship. For example, it could automatically create a job with a two-hour duration when a specific location within the port is added to the order.
To set up a triggered job
- Go to the Setup > Business Rules > Business Rules tab.
- Click New Business Rules.
- Use the Name field to give the new rule or rules a name.
- Click in the Division field and select which division the rule or rules will apply to. The rules will apply to the selected division and any divisions below it on the division tree.
- (Optional) Under Effective, enter a start or end date, or both.
- Select the Triggered Job sub-tab.
- To add the first condition, click Add Condition then click Select a field to display a list of options. Configure the condition as needed.
- (Optional) To add another condition, repeat Step 7.
- From the Resource Type list, select the type of resource to be used on the triggered job.
- (Optional) You have the option to pre-populate specific fields for the job, such as Planned Start Date or Planned End Date. Click Show all effects to see more fields.
- (Optional) To add another resource to the job, click Add Resource then repeat steps 9 and 10.
- Click Save Changes.
Use a Business Rule to Trigger a Webhook
A business rule can trigger webhooks to send notifications to external applications, such as Mailgun, Slack, or Twilio. For example, you could use Mailgun to send an email to a tug when it's been assigned to a job.
To set up a webhook
- Go to the Setup > Business Rules > Business Rules tab.
- Click New Business Rules.
- Use the Name field to give the new rule or rules a name.
- Click in the Division field and select which division the rule or rules will apply to. The rules will apply to the selected division and any divisions below it on the division tree.
- (Optional) Under Effective, enter a start or end date, or both.
- Select the Webhook sub-tab.
- To add the first condition, click Add Condition then click Select a field to display a list of options. Configure the condition as needed.
- (Optional) To add another condition, repeat Step 7.
- (Optional) Use the Action Date field to schedule when the webhook will be sent, based on a time related to a trip or a job. For example, to send the webhook two hours before the scheduled start time of a job, enter
DateAdd(jobStart, -120)
in the Action Date field then select Original Job: Job Start Date from the Formula Values list. - Click Add Callback then complete the following fields:
- Description: This field is optional; it simply allows you to add a name to the callback so you can identify it later.
- URL: This is where the callback will be sent.
- Content Type: Choose raw or x-www-form-urlencoded, depending on the requirements of the external application.
- To add a JSON payload to the callback, click Add Format then complete the following fields:
- Key
- Value
- (Optional) To add another payload to the callback, repeat Step 11.
- (Optional) To add another callback, repeat Step 10.
- Click Save Changes.
Case Study
Learn how Portugs uses business rules to send webhooks from Helm CONNECT to Mailgun. By configuring business rules to send order confirmation emails automatically once jobs are scheduled, Portugs has reduced errors, improved communication with their agents, and maximized their billing revenue.
We're Here to Help
Contact our team today to learn more about using business rules to automate your dispatching—we’d love to help!