Introduction
Systems Involved
- TOTVS Otimização Logística
- External System: ERPs that connect or intend to connect with TOL
Scope
- Freight rules acquisition and update;
Installation/Deployment/Usage Prerequisites
Minimum versions
- TOL: 6.4.0
- Protheus: ?
- Datasul: ?
- This integration requires no additional installations or updates.
Requisition Layout
FreightRuleAcquisitionService, SOAP Integration, Synchronous | |||||
---|---|---|---|---|---|
Name | Type | Mandatory | Size | Description | Observation |
regionSourceId | String | No | 30 | Regional identifiyer | Must be a valid regional; |
name | String | No | 255 | Name of the freigth rule | |
description | String | No | 255 | Description of the freigth rule | |
freigthRuleGroupName | String | Yes | 255 | Name of the freigth rule group | When executing this operation, only the group shipping rules provided in this field will be valid; this field must receive a valid freight group in the TOL; The freightRuleGroup field can receive any useful value for the business. This field is only for grouping the shipping rules from some business perspective. - The initial date of validity of the shipping rules are always associated with a shipping group; Example: |
vigencyInitialDate | String | Yes | 10 | Date/time of the vigenci the freigth rule group | Group shipping rules will only be effective after the date/time provided in this field; if the effective date received in this field does not exist for a given group, it will be created; • If shipping rules were sent yesterday with a start date in the future (example: 05/07/YYYY) and today you want to update these rules, you must send the updated freight rules with the same start date sent previously ( in the example, 7/5/YYYY); • If shipping rules are sent this morning with today's start date (05/06/YYYY) and updates to these same rules are sent this afternoon, you must send the updated shipping rules with the same start date sent previously (in the example, 05/06/YYYY); in this scenario, from the morning until the afternoon (even before receiving the updated shipping rules) the TOL will use the originally received rules (in this example, the rules received this morning); • If 30 days ago (example: 06/05/YYYY) shipping rules are sent with a start date last week (example: 29/05/YYYY) and today (05/06/YYYY) updates are sent to these rules rules, you must submit the updated shipping rules with today's start date (06/05/YYYY); in this scenario, between 5/29/YYYY and 6/5/YYYY (even before the updated shipping rules are received) TOL will use the originally received rules (in this example, the rules received 5/6/YYYY); Note that if TOL receives shipping rules with start dates already in the past, an error message will be returned and no updates will be made." |
freightRules | freightRules[] | Não | N/A | Grouping element of all freight rules |
freightRules, data type used in TOL integrations | |||||
---|---|---|---|---|---|
Name | Type | Mandatory | Size | Description | Observation |
priority | Int | Yes | 10 | Freight rule priority (for cases where more than one rule applies to a shipment); | The higher this number, the higher the priority; |
shipperSourceId | String | No | 30 | ID of the shipper of the freight rule; | This field must have an ID from a valid shipper in the TOL; |
originSourceId | String | No | 30 | ID of the origin locality of the freight rule; | This field must have an ID from a valid locality in the TOL; |
destinationSourceId | String | No | 30 | ID of the destination locality of the freight rule; | This field must have an ID from a valid locality in the TOL; |
originCarrierZoneSourceId | String | No | 30 | ID of the origin carrier zone of the freight rule; | This field must have a valid transport zone ID in the TOL; For example: |
destinationCarrierZoneSourceId | String | No | 30 | ID of the destination carrier zone of the freight rule; | See comment of "originCarrierZoneSourceId" (same applies for this field); |
carrierSourceId | String | No | 30 | ID of the carrier of the freight rule; | This field must have an ID from a valid carrier in the TOL; |
vehicleSourceId | String | No | 30 | ID of the vehicle of the freight rule; | This field must have an ID from a valid vehicle in the TOL; |
serviceType | Int | No | 10 | ID of the service type of the freight rule; | Exemples: - Full truck load (FTL); - Less than truck load (LTL); |
variable1-40 | String | No | 255 | Variable used in the freight calculation script (the freight calculation script must have already been created in the TOL); the semantics of this field depend on the freight calculation formula configured in the TOL, therefore, this interface cannot be developed before these formulas are defined; if these formulas have not been defined, this must be done with the support of TOL business area; |
Answer Layout
replaceFreightRulesResponse, data type used in TOL integrations | |||||
---|---|---|---|---|---|
Name | Type | Mandatory | Size | Description | Observation |
result | result[] | Yes | N/A | Grouping element of all results | There must be at least 1 order in this list; |
sucess | Boolean | Yes | 1 | Success or failure flag |
result, tipo de dado utilizado nas integrações do TOL | |||||
---|---|---|---|---|---|
Name | Type | Mandatory | Size | Description | Observation |
errorCodes | String | No | 30 | List of error codes | |
errorMessage | String | No | 255 | Error messages | |
identifier | String | No | 30 | Error table identifier | |
sucess | Boolean | Yes | 1 | Success or failure flag |
Error catalog
Code | Message | Description |