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 publishCancelService interface serves only to request permission from the external system to cancel the load in the TOL\TRE.
    • To request this permission, the TOL\TRE will send a message to the external system through the publishCancelService structure and the external system must return a response message to the TOL\TRE in the publishCancelServiceResponse structure:
      • If the external system returns a status that the cancellation is possible (field status=0), the TOL\TRE will allow the user to change the load.
      • If the external system returns a status that cancellation is not possible (status field=1 or 2 or 3 or 4), the 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

publishCancelService, 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 cancellation was made automatically and not manually by a user through the screens (in these cases, the user's basket cannot be identified);
The following examples can generate automatic cancellation messages for the external system without user basket information:
- If a user who has trips that have not been unlocked is removed, his trips will be cancelled;
- A dock associated with non-unlocked trips is removed, with this removal your trips will be cancelled;
- An order is automatically removed (via integration) causing unblocked trips to run out of DUs, forcing them to be cancelled;
trips trip[]YesN/AGrouping element of all trips that you want to cancel;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 cancellation 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

publishCancelServiceResponse, data type used in TOL/TRE integrations
NameTypeMandatorySizeDescriptionObservation
resultresult[]YesN/AGrouping element of all trips that you want to cancel 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 of the trip whose cancellation was requested;
statusIntegerYes1

Status of the trip cancellation request;

0=Trip canceled successfully; 1=Trip was already cancelled; 2=Trip not found; 3=Trip already dispatched; 4=Trip cannot be cancelled;

The cancellation process should work as follows:-

When requesting trip (or load) cancellation, the trip (or load) cancellation notification interface will inform the external system if the external system confirms the trip (or load) cancellation through statuses 0, 1 or 2, this will also be canceled on TOL/TRE;

Important: delivery units for canceled trips will always be returned to the respective user's basket;

Error catalog

CodeMessageDescription

Attachments

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

  • Sem rótulos