You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
│ routes event to all flows listening for eventType
26
-
▼
27
-
Your Flow starts
28
-
│
29
-
│ event payload available as flow input
30
-
▼
31
-
Flow nodes execute (functions, conditions, etc.)
32
-
```
33
-
34
-
An event carries a **payload** — the data associated with what happened (e.g. shipment details, tracking ID, status). Flows that subscribe to an event type receive this payload as their starting input.
35
-
36
-
---
37
-
38
12
## Current status
39
13
40
14
> **The GLS Action does not currently emit any events.**
41
15
>
42
16
> The GLS action presently only exposes **functions** (called by flows) and registers **data types** and **configuration**. Event support — where the action proactively notifies Aquila of changes — is **planned for a future release**.
43
17
44
-
---
45
-
46
-
## Planned events
47
-
48
-
The following events are candidates for future implementation. Once added, each will allow you to build flows that react automatically to GLS shipment lifecycle changes.
49
-
50
-
### `gls.shipment.arrived`
51
-
52
-
Emitted when a parcel arrives at a GLS depot or is scanned into the GLS network.
53
-
54
-
**Trigger mechanism:** The action would periodically poll the GLS tracking API (or receive a GLS webhook) and emit this event for each new scan.
content: "Triggered when a GLS parcel arrives at a depot or is scanned."
132
-
}]
133
-
})
134
-
```
135
-
136
-
### 2. Dispatch the event when it occurs
137
-
138
-
```typescript
139
-
sdk.dispatchEvent(
140
-
"gls.shipment.arrived", // must match registered flow type identifier
141
-
projectId, // which project to notify
142
-
payload// data payload (must match inputType)
143
-
)
144
-
```
145
-
146
-
### 3. User builds a flow triggered by the event
147
-
148
-
In the Hercules UI, users create a flow with **"GLS Shipment Arrived"** as the trigger. When the GLS action dispatches this event, Aquila starts the flow and provides the payload (e.g. `TrackID`, `Status`, `Location`) as the flow's input.
149
-
150
-
---
151
-
152
-
## Flow type settings
153
-
154
-
Flow types can expose **settings** that allow users to configure how an event filters or behaves. For example, a future `gls.shipment.arrived` event might let users specify:
155
-
156
-
| Setting | Type | Description |
157
-
|---------|------|-------------|
158
-
|`trackId`| string | Only trigger for a specific parcel |
159
-
|`statusFilter`| string[]| Only trigger for specific status codes |
160
-
161
-
Settings are defined in the `settings` array of `HerculesFlowType` and are configurable per-flow in the Hercules UI.
162
-
163
-
---
164
-
165
-
## Difference between events and functions
166
-
167
-
|| Events | Functions |
168
-
|-|--------|-----------|
169
-
|**Direction**| Action → Aquila | Flow → Action |
170
-
|**Who initiates**| The action (proactively) | The flow (on demand) |
171
-
|**Purpose**| React to something that happened externally | Perform an operation and return a result |
Copy file name to clipboardExpand all lines: docs/Actions/GLS/overview.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Overview of the GLS ShipIT action — what it does, what you need t
5
5
6
6
# GLS Action
7
7
8
-
The **GLS Action** integrates the [GLS ShipIT API](https://api.gls-group.net) into the Hercules automation platform. It lets you create, validate, cancel, and manage GLS parcel shipments directly from your flows — no manual API calls required.
8
+
The **GLS Action** integrates the [GLS ShipIT API](https://dev-portal.gls-group.net/docs/shipit-farm/1/overview) as an action. It lets you create, validate, cancel, and manage GLS parcel shipments directly from your flows — no manual API calls required.
9
9
10
10
---
11
11
@@ -49,7 +49,7 @@ Before using the GLS Action you will need:
Copy file name to clipboardExpand all lines: docs/Actions/GLS/troubleshooting.md
+1-33Lines changed: 1 addition & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ A: The action supports all major GLS shipment types and services, including:
30
30
- Tyre service, addressee-only delivery
31
31
- Saturday and next-working-day delivery (EXPRESS only)
32
32
33
-
See [Functions](./functions) for the complete list.
33
+
See [Functions](../functions.md) for the complete list.
34
34
35
35
---
36
36
@@ -63,29 +63,8 @@ A: Check the following:
63
63
64
64
---
65
65
66
-
**Q: I get "Failed to register config definitions" on startup. What does that mean?**
67
-
68
-
A: This means the action could not register its configuration schema with the Aquila server. Check:
69
-
- The Aquila server is running and healthy
70
-
- The `HERCULES_AUTH_TOKEN` has sufficient permissions
71
-
- The action ID (`HERCULES_ACTION_ID`) is not already registered with a conflicting schema
72
-
73
-
---
74
-
75
-
**Q: The action shows "SDK connected successfully" but my functions don't appear in Hercules.**
76
-
77
-
A: Wait a few seconds — registration can take a moment. Then refresh the Hercules UI. If functions still don't appear, check that the action's `HERCULES_ACTION_ID` matches what is configured in Hercules.
78
-
79
-
---
80
-
81
66
### Authentication & API errors
82
67
83
-
**Q: I get a 401 Unauthorized error when the action tries to call the GLS API.**
84
-
85
-
A: Your `client_id` or `client_secret` is incorrect, or your GLS application does not have the required API scopes. Verify your credentials on the [GLS Developer Portal](https://dev-portal.gls-group.net) and ensure the **ShipIT** scope is enabled.
86
-
87
-
---
88
-
89
68
**Q: I get an `INVALID_PRODUCT` error when creating a Saturday delivery shipment.**
90
69
91
70
A: Saturday delivery (and next-working-day delivery) requires the shipment's `Product` to be set to `"EXPRESS"`. Change `Product: "PARCEL"` to `Product: "EXPRESS"` in your shipment data.
@@ -104,11 +83,6 @@ A: No. Once GLS has scanned the parcel at a depot or delivery vehicle, cancellat
104
83
105
84
---
106
85
107
-
**Q: My token expires frequently. Can I adjust the refresh interval?**
108
-
109
-
A: The action automatically refreshes tokens 60 seconds before they expire. This is hard-coded and cannot be changed through configuration. GLS OAuth2 tokens typically have a validity of 1 hour.
110
-
111
-
---
112
86
113
87
### Labels & printing
114
88
@@ -212,9 +186,3 @@ Open a pull request against the `main` branch of [code0-tech/centaurus](https://
212
186
|`npm run lint`| Run ESLint |
213
187
|`npm run create-action -- <name>`| Scaffold a new action |
214
188
215
-
### Code conventions
216
-
217
-
- All types must use **Zod schemas** with a matching `Schema` suffix (e.g. `AddressSchema` / `Address`)
218
-
- All registered types must have identifiers starting with `GLS_` (for the GLS action)
219
-
- All function definitions must include `name` and `description` in `en-US`
220
-
- Functions that call external APIs must wrap errors in `RuntimeErrorException`
0 commit comments