integrationlatestIntegration / Custom trigger integration guide
Custom trigger integration guide
For how to make calls, see the calling method description in the Open API document.
1. Create a custom triggered task
In the trigger rules of the custom trigger, create a trigger scene, configure a unique scene ID, and select the trigger entity ID type for the triggered task.
Tip: The scene ID that meets the trigger rules and the entity ID to trigger must match the configuration on your server for the trigger to succeed.
Numbers in the images: 1 creates a scene: click + Scene at the bottom of the Trigger Scene drop-down list. 2 is Scene ID in the New Scene dialog. 3 is Entity ID.
2. Call the trigger API
2.1 API URL
open/hermes/custom/trigger?token=xxx&projectId=11
2.2 Request method
POST
2.3 Content-Type
application/json
2.4 Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| eventuuid | xxx | String | Yes | Unique event ID |
| projectId | 11 | int | Yes | Project ID |
| sceneId | String | Yes | Scene ID | |
| entityId | String | Yes | Value of the entity ID type in the scene: accountId/distinctId | |
| eventTime | long | Yes | Event time | |
| eventTimezone | double | Recommended; optional | Time zone of the event time. Defaults to the server time zone |
2.5 Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
2.6 Error response example
{
"return_code": -1008,
"return_message": "Invalid parameters"
}
2.7 Error codes
| Error code | Description |
|---|---|
| -1008 | Invalid parameters (hermes.open.service.error.eventtime.not_valid) |
| -1006 | Token authentication failed (error.auth.authority_forbidden.token) |
| -1005 | Too many requests/API rate limited (error.op.too_many_open_api_request) |
| -1023 | Scene/task doesn't exist or has been deleted (error.op.not_existed_with_name) |
| -1011 | Task status isn't In progress (hermes.open.service.error.task.status_not_working) |
| -1009 | User not found (hermes.open.service.error.user_id.not_exit) |
| -1108 | Duplicate event (hermes.open.service.error.task.event_id.repeat) |
| -1004 | System error (hermes.service.error.system.common) |
Was this page helpful?

