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.
- 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:
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 | |||||
---|---|---|---|---|---|
Name | Type | Mandatory | Size | Description | Observation |
regionSourceId | String | Yes | 30 | Regional identifier; | Must be a valid regional; |
basketSourceId | String | No | 30 | ID 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[] | Yes | N/A | Grouping element of all trips that you want to cancel; | There must be at least 1 trip on this list; |
loads | load[] | Yes | N/A | Grouping element of all the loads of the trip; |
trip, data type used in TOL/TRE integrations | |||||
---|---|---|---|---|---|
Name | Type | Mandatory | Size | Description | Observation |
tripId | Integer | Yes | 10 | ID of the trip whose cancellation is being requested; |
load, data type used in TOL/TRE integrations | |||||
---|---|---|---|---|---|
Name | Type | Mandatory | Size | Description | Observation |
loadId | Integer | Yes | 10 | Identifier of a trip load; | |
loadSourceId | String | No | 30 | External identifier of a trip load; |
Answer Layout
publishCancelServiceResponse, data type used in TOL/TRE integrations | |||||
---|---|---|---|---|---|
Name | Type | Mandatory | Size | Description | Observation |
result | result[] | Yes | N/A | Grouping 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 | |||||
---|---|---|---|---|---|
Name | Type | Mandatory | Size | Description | Observation |
regionSourceId | String | Yes | 30 | Regional identifier; | Must be a valid regional; |
tripId | Integer | Yes | 10 | ID of the trip whose cancellation was requested; | |
status | Integer | Yes | 1 | 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
Code | Message | Description |
Attachments
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas