Pacejet
  • Automations
  • How Automations Affect Rates API Responses

How Automations Affect Rates API Responses


This article explains how the Rates action in Descartes Pacejet automations interacts with the Rates endpoint in the Pacejet API. It also describes how the exclude flag in the ratingResultsList shows which classes of service were included or excluded by automation rules.


Overview

When you use the Rates action in an automation, Pacejet calls the standard Rates API endpoint to retrieve rating options. The automation then applies its inclusion and exclusion rules to those results.

The API response continues to return all of the candidate classes of service in the ratingResultsList. Each item includes an exclude property that reflects how the automation rules were applied:

  • exclude: false means the class of service is currently eligible according to the automation rules.

  • exclude: true means the class of service was evaluated but excluded by the automation rules.

You can use this flag to understand which options were considered and why certain services did not qualify for rating or selection.


Example: ratingResultsList With Exclude Flag

The example below shows a portion of a ratingResultsList that includes three classes of service. The exclude property indicates which options the automation decided to exclude.

"ratingResultsList": [
{
"carrierNumber": "Echo",
"carrierClassOfServiceCode": "FedEx Economy",
"carrierClassOfServiceCodeDescription": "FedEx Economy",
"shipMode": "LTL",
"rateSystem": "LTL",
"statusMessage": "",
"consignorFreight": 169.34,
"consigneeFreight": 177.807,
"listFreight": 169.34,
"totalServiceFees": 0,
"fuelSurcharge": 35.78,
"currencyCode": "USD",
"arrivalDateText": "TUE - 4/7/2026",
"transitTime": 4,
"shipCodeXRef": "115",
"exclude": true,
"scac": null
},
{
"carrierNumber": "Echo",
"carrierClassOfServiceCode": "Saia Motor Freight Line",
"carrierClassOfServiceCodeDescription": "Saia Motor Freight Line",
"shipMode": "LTL",
"rateSystem": "LTL",
"statusMessage": "",
"consignorFreight": 209.52,
"consigneeFreight": 219.996,
"listFreight": 209.52,
"totalServiceFees": 0,
"fuelSurcharge": 64.52,
"currencyCode": "USD",
"arrivalDateText": "TUE - 4/7/2026",
"transitTime": 4,
"shipCodeXRef": "115",
"exclude": false,
"scac": null
}
]

In this example:

  • The FedEx service has "exclude": true, which means the automation rules evaluated and then excluded it.

  • The Saia service has "exclude": false, which means it passed the automation rules and is a valid option.


How Automations Influence the Rates Endpoint

When an automation uses the Rates action, the following sequence applies at a high level:

  1. Pacejet calls the Rates API endpoint using the shipment data.

  2. The endpoint returns a list of rating options in ratingResultsList.

  3. The automation evaluates each option against its inclusion and exclusion rules.

  4. The automation sets the exclude flag on each ratingResultsList item based on the rule outcome.

The API consumer can still see all candidate options, along with how the automation interpreted them. This is useful for:

  • Troubleshooting why a specific carrier or service did not qualify.

  • Verifying that automation rules match your rating strategy.

  • Auditing decisions during implementation or support.


Interpreting exclude: true vs exclude: false

Use the exclude flag in combination with your automation configuration to understand behavior:

  • If a class of service you expect to be available shows exclude: true, review the automation conditions that filter carriers, service levels, or ship modes.

  • If a class of service shows exclude: false but still is not selected in your workflow, look for downstream logic outside the automation, such as user interface selection defaults or additional business rules.

When testing rule changes, compare API responses before and after the change. Look for differences in the exclude values in ratingResultsList to confirm that your updated rules behave as expected.


Related Video

Placeholder for video link on this topic:

Video: Cost Optimization with Rates Automation and API