External Rate Calculation

You have the ability to interface Oracle Transportation and Global Trade Management Cloud to any third-party rating engine by connecting Oracle Transportation and Global Trade Management Cloud as a web service client to the custom web service that adheres to the WSDL interface provided by Oracle Transportation and Global Trade Management Cloud or as the REST client supporting XML as the payload.

You will need to implement a SOAP based web service or REST based web service by following the steps provides in the Web Service Implementation section and using the Rating Engine WSDL provided in the appendix. Register the newly implemented web-service with Oracle Transportation and Global Trade Management Cloud by following the steps provided in Configuration section to be able to access the web service to return rate to Oracle Transportation and Global Trade Management Cloud.

Note:

The ERE REST web service uses XML as payload and adheres to Rating Engine WSDL for input and output payload.

As of the 26A release, ERE REST webservice supports JSON, where requests and responses will be in JSON format. Enable the optional feature "ENABLE ERE WITH MULTIPLE RESULTS" to use this feature.

Setup

The first step is to ensure there is a valid External Rating Engine (ERE) Fieldset defined in Oracle Transportation and Global Trade Management Cloud. The External Rating Engine Fieldset has to be defined with a Connection Type as “Webservice (W)”. External Rating Engine (ERE) is the main link between Oracle Transportation and Global Trade Management Cloud and a custom ERE. This is required for both SOAP and REST web services.

External Rating Engine Fieldsets

Field Value Comments
Fieldset ID USER_DEFINED Identifies the fieldset.
Valid External Rating Engine ID GENERIC – a predefined external rating engine ID. Identifies the external rating engine that can utilize this particular fieldset.
Connection Type Webservice(W) Defines the type of transport mechanism used.
Implementing Java Class glog.business.rate.rateengine.external. webservice.client.ExternalRatingWebServiceClient (this value is auto populated and is read only). Specifies the fully qualified name of the java class, which will link to the external rating engine web service as a client.
External System ID User Defined External system is required for specifying the web service endpoint and the web service operations to invoke for SOAP web service and endpoint, authorization, and content type details for REST web service.

The External Rating Engine Fieldset also specifies the information that will be passed from Oracle Transportation and Global Trade Management Cloud into the invocation of the external engine by defining a list of one or more Rate Basis Items (RBIs). Using the lower half of the Fieldset Power Data page, you can select a set of RBIs and include them in the fieldset by clicking on one of the right-pointing arrows. These RBI references (listed below under the GID column) are stored in the external_rating_engine_fieldset_d table.

The ENABLE ERE WITH MULTIPLE RESULTS optional feature must be turned on to send the JSON request to ERE. You must also set the Content Type in the External System configuration to "application/json".

RBI References

RBI GID
Shipment Number of Line Items SHIPMENT.NUMLINES
Shipment Source Postal Code SHIPMENT.SOURCE.POSTAL_CODE
Shipment Destination Postal Code SHIPMENT.DEST.POSTAL_CODE
Rate Offering Service Provider SHIPMENT.RATE.SERVPROV
Rate Offering Rate Service Calculator SHIPMENT.RATE.RATE_SERVICE
Shipment Line Item Weight SHIPMENT.LINES.WEIGHT

There are two ways to invoke an external rating engine using Oracle Transportation and Global Trade Management Cloud:

Note:

The request to ERE in the JSON format receives multiple rate results. It is supported only if the external system is configured at Rate Offering level; it is not supported if the external system is configured at Rate Cost level.

Rate Offering Method

This method attaches the invocation of an external rating engine to the rate offering. Current, purpose-build external rating engines are invoked using this method. An example would be the current implementation of the Oracle Transportation and Global Trade Management Cloud link to SMC’s LTL RatewareXL web service rating engine. This method requires a rate offering to specify a rate offering type that includes the EXTERNALRATINGENGINE rate attribute in its costing sequence. The following fields must be specified on the Attributes page of the Rate Manager UI:

Rate Manager Configuration

Field Value Comments
External Rating Engine ID GENERIC Select the GENERIC external rating engine.
External Engine Fieldset ID USER_DEFINED Choose the fieldset defined for the external engine that invokes the accessorial calculations.

ERE Multiple Response Flow

The following configurations are required to set up the ERE for handling multiple responses in the application:

  1. Enable the ENABLE ERE WITH MULTIPLE RESULTS optional feature to send JSON request and receive multiple responses.
  2. Configure EXTERNALRATINGENGINE and ERE_RETURN_MULTIPLE_RESPONE on the Rate Offering Type under the Rate Attributes section.
  3. Once the step 2 is done, the following profile fields will be displayed on the Rate Offering screen: Service Provider Profile ID, Rate Service Profile ID, and Mode Profile ID.
  4. If any of these profile fields are configured, only the specified rate services, service providers, and transport modes will be considered for the request. Otherwise, all applicable values will be considered.
  5. The following fields are required/optional as follows:
    • The Transport Mode on the Rate Offering is required and must always be included in the request.
    • The Rate Service Profile ID, Service Provider Profile ID, and Mode Profile ID fields are optional.
    • If you configure both individual field-level IDs (Rate Service ID, Service Profile ID) and the corresponding profile IDs (Rate Service Profile ID, Service Provider Profile ID, Mode Profile ID), all values are then merged and included together in the request sent to the ERE.
    • If nothing is configured, the Transport Mode ID will still be included in the request as it's a required field.
  6. Profile details in request and response validation:
    • Rate Service Profile: Both the External Service Type and the External Service Code will be sent in the request. The ERE's response must contain at least one of these two values for the successful validation. Otherwise, the application will display an error. Enable the ENABLE ERE WITH MULTIPLE RESULTS optional feature to display both the fields External Service Type and External Service Code for all types of Rate Services under the Rate Service Details section of the Rate Service screen.
    • Service provider Profile: If the Service Provider Profile ID is configured, both the Servprov Alias Qual ID and its corresponding Alias value will be sent in the request. The specific Servprov Alias Qual ID to be used both for transmission in the request and validation in the response, is determined by the SERVICE PROVIDER ALIAS QUALIFIER parameter.

      These Servprov Alias values must be present in the ERE response to successfully validate the service provider against the service providers present in the application. If these values aren't available in the response, the application will display an error. If the SERVICE PROVIDER ALIAS QUALIFIER parameter isn't configured then also application will display an error as this parameter is required for validating the service provider alias qualifiers from ERE response.

    • Mode Profile: The "Transport Mode ID" will be sent in request by default. If the Mode Profile ID is configured then all Transport Mode IDs defined in that mode profile will be included and sent in the request. In the response, the Transport Mode ID is required. If this isn't part of response, the application will display an error.

For more details, see the How to Configure Rates for External Rating Engine to Handle Multiple Responses help topic.

Rate Cost Method

It is possible to specify the invocation of an external rating engine as a rate cost during the processing of standard costs, or during the processing of accessorial costs. The rate cost UI contains a Cost Type dropdown list. Choosing the value of External allows the specification of the same external rating engine fields as found on the Rate Manager UI:

Rate Costs or Accessorial Cost Method

Rate Costs or Accessorial Cost Method

Field Value Comments
Cost Type External This is a field that explicitly defines the type of calculation described by the cost record.
External Rating Engine ID GENERIC Select the GENERIC external rating engine.
External Engine Fieldset ID USER_DEFINED Choose the fieldset defined for the external engine that invokes the calculations.

Optional – Service Time

There is also an option to return the service time from the external rating engine. For this type of rate service, the rate engine will return the specific pickup time and delivery time for a shipment or the number of days the service would take. The rate service engine uses the pickup and delivery time or the service days to test whether it will fit into the order’s pickup and delivery windows. If not, this rate cannot be used.

There are two ways to return service time information from a rating engine:

  • The external rating engine can fill in the estimated pickup and delivery times. The RATE SERVICE associated with the rate must have a service type of TIMEDEFINITESERVICE.
  • The external rating engine can fill the service Days field. The RATE SERVICE associated with the rate must have a service type of EXTERNALTRANSITDAYS.
If the rate service doesn’t have the above service types, then the service time data returned from the rating engine will be ignored.

For this type of rate service, location calendar, location capacity, and carrier capacity are not considered. Pickup or delivery activity time at a stop is always 0.

The following assumptions also hold true:

  • Only applies to 2-stop shipments
  • It does not make sense to have HOLD AS LATE AS POSSIBLE set to TRUE regardless of the setting of the parameter HOLD AS LATE AS POSSIBLE, this type of rate service is always calculated in HOLD AS LATE AS POSSIBLE = false.
  • Order’s pickup and delivery windows should be a whole day. If the orders have a narrow pickup and delivery window, the specific pickup time and delivery time will fall out of the order’s windows, so it will fail to use this rate. For example, the order’s delivery window is 10:00-11:00am, but rate engine come back with a delivery time of 4:00PM, then rate service will fail this rate.
  • It only applies to single leg shipments: i.e., shipment with rate service type cannot have upstream and downstream shipment.