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

The PublishReprogrammingService interface only serves to request permission from the external system to reprogram the load in the TOL/TRE.

  • To request this permission, the TOL/TRE will send a message to the external system through the structure publishReprogrammingService and the external system must return a response message to the TOL/TRE in the structure publishReprogrammingServiceResponse:
    • If the external system returns a status that reprogramming is possible (status field=0), TOL/TRE will allow the user to change the load.
      • If the external system returns that rescheduling is possible (field status=0), after rescheduling the load in the TOL/TRE, the TOL/TRE will send a trip publication message to the external system (via the publishReleasedTrip interface) with changes made by the user on reprogramming.
      • In this scenario, when the external system allows the cargo to be rescheduled, it is important that the external system returns the status of the transport document to a condition that allows future editing by the TOL/TRE (which will be done through the publishReleasedTrip interface).
    • If the external system returns a status that reprogramming is not possible (status field=1 or 2 or 3), TOL/TRE will not allow the user to change the load.

Installation/Deployment/Usage Prerequisites

  • Minimum versions

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

Requisition Layout

publishReprogrammingService, SOAP Integration, Synchronous
NameTypeMandatorySizeDescriptionObservation
regionSourceIdStringYes30Regional identifier;Must be a valid regional;
basketSourceIdStringNo30ID of the basket where this operation was performed manually by the user;This field may not be sent in cases where the rescheduling request was made automatically and not via the screen (in these cases, the user's basket cannot be identified);
trips trip[]YesN/AGrouping element of all trips to be rescheduled;There must be at least 1 trip on this list;
loadsload[]YesN/AGrouping element of all the loads of the trip;

trip, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
tripIdIntegerYes10ID of the trip whose rescheduling is being requested;

load, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
loadIdIntegerYes10Identifier of a trip load;
loadSourceIdStringNo30External identifier of a trip load;

Answer Layout

publishReprogrammingServiceResponse, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
resultresult[]YesN/AGrouping element of all the trips that you want to reschedule with the respective status of the requests;There must be at least 1 trip on this list;
result, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
regionSourceIdStringYes30Regional identifier;Must be a valid regional;
tripIdIntegerYes10ID da viagem cuja reprogramação foi solicitada;
statusIntegerYes1Status of the travel rescheduling request;

0=Authorized reprogramming; 1=Trip cancelled; 2=Trip not found; 3=Trip already dispatched/Unauthorized rescheduling;

Important:
- If the external system returns code 0, the trip will be placed in its last status before release (Note: note that some of these statuses may not allow rescheduling Ex.: "Trip Offered");
- If the external system returns code 1, the trip will be canceled automatically. The external system will not be notified again;
- If the external system returns codes 2 or 3, it will not be possible to reschedule the trip;

Error catalog

CodeMessageDescription

Attachments

  Arquivo Modificado
Arquivo publishReprogrammingService.wsdl 04 mai, 2023 by Julio Vinicius Oliveira dos Santos
Arquivo Reprogramming Request draw.io diagram 09 mai, 2023 by Julio Vinicius Oliveira dos Santos
Arquivo PNG Reprogramming Request .png Reprogramming Request exported to image 09 mai, 2023 by Julio Vinicius Oliveira dos Santos

  • Sem rótulos