Introduction

Systems Involved

  • TOTVS Otimização Logística / TOTVS Roteirização e Entrega
  • External System: ERPs that connect or intend to connect with TOL/TRE

Scope

Asynchronous integration consisting of Trip Release and Trip Unblock services:

  • If the orderBreakParts tag is empty, there are no breaks (splits) for trips sent in the interface;
  • If the orderBreakParts tag is filled in, it means that there are trips on this interface that have breaks (splits); if this occurs, you must identify, within this structure, the transport requests that suffered breaks through the following fields:
    • o orderSourceId: This field is the identifier of the transport request received in the order interface; if a transport request is inside the orderBreakParts structure, it means that it has suffered a break;
      • o orderItemSourceId: This field is the item identifier of the transport order received in the order interface;
        • If a transport order item is inside the orderBreakParts structure, it means that this item (which is inside the orderSourceId order) suffered a break;
      • The loadId field that exists within the orderBreakParts structure serves to associate the transport request (orderSourceId and orderItemSourceId fields) with the load generated by TOL/TRE in this interface;
      • The quantities updated by TOL/TRE after breaks must be obtained in the fields: quantShipmUnits; the quantProdUnits;

Installation/Deployment/Usage Prerequisites

  • Minimum versions

    • TOL/TRE:  6.4.0
    • Protheus:  ?
    • Datasul: ?
  • This integration requires no additional installations or updates.

Requisition Layout

doUnblockReleasedTrip: SOAP, Asynchronous integration with publishReleasedTrip;
NameTypeMandatorySizeDescriptionObservation
unblockReleasedTripsunblockReleasedTrips[]YesN/AGrouping element for all travel release requests;

unblockReleasedTrip, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
unblockReleasedTripsunblockReleasedTrip[]YesN/AGrouping element for all travel release requests;
unblockReleasedTrip, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
identifier (unblock release trip)IntegerYes10ID of the trip release request message;

This field must be from a valid trip release request message or -1 when an error occurs in the external system when trying to recreate TOL/TRE trips (in this case, the request made in this service will be ignored by the TOL/TRE); in the case of an error in the external system, the details of this error can be sent in the "ERPMessageResponses" element;

ERPMessageResponseseRPMessageResponseList[]NoN/AGrouping entity of external system responses;
orderBreakResponses

orderBreakResponses[]

NoN/ABundling entity of an external system response to a TOL/TRE break;Note: If all but 1 of the breaks passed, the last one will be automatically approved;
tripReleaseResponsestripReleaseResponseList[]YesN/A

Grouping entity of an external system response to TOL/TRE trip releases;


tripLoadsSourceIdstripLoadsSourceIdList[]YesN/AGrouping entity for sending the source ids of the loads from the external system to the TOL/TRE;

eRPMessageResponseList, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
ERPMessageResponseseRPMessageResponse[]YesN/AGrouping element for all travel release requests;

eRPMessageResponse, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
msgStringYesN/AExternal system response message;

orderBreakResponses, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
orderBreakResponsesorderBreakResponse[]YesN/AGrouping element for all travel release requests;

orderBreakResponse , data type used in TOL/TRE integrations

Name

TypeMandatorySizeDescriptionObservation
regionSourceIdStringYes30Regional identifier;Must be a valid regional;
breakIdIntegerYes10TOL/TRE Break ID;

This field must be assigned a valid break ID; you should not resubmit break IDs that have already been released; the external system must return all breakIds generated by TOL/TRE in the trip release interface for it to be released;

orderIdStringYes30Transport order ID associated with the break;Important:
- If the external system wants this break to be linked to a new order, just inform the name of the new order in this field; the units related to this break will be associated with the new order; the new order data will be copied from the original order;
- This order change will only be carried out if the status field is sent with the value "1";
orderItemIdStringYes30Item ID of the transport order associated with the break;Important:
- If the external system wants this break to be linked to a new order item, Yesply inform the name of the new order item in this field; the units related to this break will be associated with the new order item; the new order item data will be copied from the original order item;
- This change to the order item will only be carried out if the status field is sent with the value "1";
- If the order item code is changed but the order code remains the same as the original order, the message will be rejected;
statusBooleanYes1External system response status about breaking TOL/TRE;0=Break not performed; 1=Break performed;
msgStringNo500External system response message about breaking TOL/TRE;

tripReleaseResponseList, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
tripReleaseResponseListtripReleaseResponse[]YesN/AGrouping element for all travel release requests;
tripReleaseResponse, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
regionSourceIdStringYes30Regional identifier;Must be a valid regional;
tripCodeIntegerYes10
TOL/TRE Trip ID;
This field must contain a valid trip ID; you should not submit trip IDs that have already been cleared;
orderSourceIdStringYes30Transport order ID associated with the trip;This field must contain a valid order ID for the trip;
itemIdStringYes30ID do item do pedido de transporte associado ao pedido da viagem;This field must receive a valid order item ID for the trip order; the external system must return all existing order items in the trip for it to be released;
statusBooleanNo1External system response status about the TOL/TRE trip;0=Does not unlock the trip; 1=Unlocks the trip; if this field is not filled in, it will be considered as 0;
msgStringNo500External system response message about TOL/TRE trip;

tripLoadsSourceIdList, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
tripLoadsSourceIdstripLoadsSourceId[]YesN/AGrouping entity for sending the source ids of the loads from the external system to the TOL/TRE;

tripLoadsSourceId, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
regionSourceIdStringYes30Regional identifier;Must be a valid regional;
tripIdIntegerYes10ID of a TOL/TRE trip;
loadsload[]YesN/AGrouping element of all the loads of the trip;When shipped, this section must return all cargo for the trip;

load, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
loadIdIntegerYes10Trip load ID in the TOL/TRE;

These fields are just so that you can have a reference to the ID of an external system load in the TOL/TRE; if the loadId is not valid (eg empty or a non-existent code in the TOL/TRE) or is associated with a trip other than the one informed, the TOL/TRE must return an error message and the request must be ignored;

loadSourceIdIntegerYes30Trip load ID in the external system;

Answer Layout

tripLoadsSourceIdList, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
resultresults[]YesN/AGrouping entity for sending the results
results, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
resultsresult[]YesN/AGrouping entity for sending the results
result, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
errorCodeserrcode[]NoN/AList of errors
errorMessageStringNoN/AError message
identifierStringYesN/AID of the trip release request message;
sucessStringYes1TRUE or FALSE
errcode, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
valueStringNoN/AError code

Error catalog

CodeMessageDescription

Attachments

  Arquivo Modificado
Arquivo Trip Release_Unblock draw.io diagram 08 mai, 2023 by Julio Vinicius Oliveira dos Santos
Arquivo PNG Trip Release_Unblock.png Trip Release_Unblock exported to image 08 mai, 2023 by Julio Vinicius Oliveira dos Santos
Arquivo XML UnblockReleasedTripAcquisitionService_example.xml 04 mai, 2023 by Julio Vinicius Oliveira dos Santos
Arquivo UnblockReleasedTripAcquisitionService.wsdl 04 mai, 2023 by Julio Vinicius Oliveira dos Santos

  • Sem rótulos