Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/integrations/core-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,20 @@ See [Event Catalog Trigger](/docs/automation/event-catalog-trigger) for configur

### Grid

:::info Early access
The grid events are in early access and only listed for organizations that have them enabled. Contact epilot to get access.
:::

Each grid process runs on one opportunity. The `…Requested` event fires when the request is submitted; the `…Progressed` event fires at any later step the organization's automation chooses (follow-up journeys, completion, cancellation) and carries a full snapshot of the process plus its current `stage` (workflow phase and status, opportunity status). Parties are delivered as `contacts` and `accounts`, with their role on the request in `relation_tags`.

<EventSchemaViewer event="GridConnectionRequested" />

<EventSchemaViewer event="GridConnectionProgressed" />

<EventSchemaViewer event="GridPlantRegistrationRequested" />

<EventSchemaViewer event="GridPlantRegistrationProgressed" />

### ERP Sync

<EventSchemaViewer event="OnDemandSyncContractRequested" />
Expand Down
213 changes: 213 additions & 0 deletions static/events/GridConnectionProgressed.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
{
"event_name": "GridConnectionProgressed",
"event_title": "Grid Connection Progress",
"event_description": "A grid connection process (new connection or change of an existing connection — electricity, gas, water, district heating, fibre) reached a further step, was completed or was cancelled. Explicitly triggered by Automation; carries a full snapshot of the process and where it stands.",
"event_version": "1.0",
"event_tags": [
"builtin",
"grid",
"automation",
"opportunity",
"order",
"attachment",
"grid-connection"
],
"schema_fields": {
"stage": {
"json_schema": {
"type": "object",
"properties": {
"workflow_definition_id": {
"type": "string",
"description": "ID of the workflow definition running the process"
},
"workflow_status": {
"type": "string",
"description": "Status of the workflow, e.g. `STARTED` while running, `DONE` once completed, `CLOSED` once cancelled"
},
"phase_id": {
"type": "string",
"description": "ID of the current workflow phase. Stable per workflow definition — match on this rather than the name"
},
"phase_name": {
"type": "string",
"description": "Name of the current workflow phase as configured by the organization"
},
"task_id": {
"type": "string",
"description": "ID of the current workflow task"
},
"task_name": {
"type": "string",
"description": "Name of the current workflow task"
},
"opportunity_status": {
"type": "string",
"description": "Status of the opportunity, e.g. `open`, `in_progress`, `closed`, `cancelled`"
}
},
"additionalProperties": false,
"description": "Where the process stands when the event fires: the opportunity's primary workflow (status, current phase and task) and the opportunity status. Completion and cancellation show here — `workflow_status` / `opportunity_status`."
},
"required": true,
"graph_source": "{\"workflow_definition_id\": opportunity.workflows.primary.definition_id, \"workflow_status\": opportunity.workflows.primary.status, \"phase_id\": opportunity.workflows.primary.phase_id, \"phase_name\": opportunity.workflows.primary.phase_name, \"task_id\": opportunity.workflows.primary.task_id, \"task_name\": opportunity.workflows.primary.task_name, \"opportunity_status\": opportunity.status}"
},
"event_attachments": {
"json_schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"entity_id": {
"type": "string",
"format": "uuid",
"description": "Entity ID of the file"
},
"filename": {
"type": "string",
"description": "Name of the file"
},
"mime_type": {
"type": "string",
"description": "MIME type of the file (e.g., application/pdf)"
},
"size_bytes": {
"type": "integer",
"minimum": 0,
"description": "File size in bytes"
},
"s3ref": {
"type": "object",
"properties": {
"bucket": {
"type": "string",
"description": "S3 bucket name"
},
"key": {
"type": "string",
"description": "S3 object key"
}
},
"required": [
"bucket",
"key"
],
"additionalProperties": false,
"description": "S3 reference for the file content"
},
"version_index": {
"type": "integer",
"minimum": 0,
"description": "Latest version index of the file (versions[].length - 1, or 0 if no versions array)"
},
"readable_size": {
"type": "string",
"description": "Human-readable file size (e.g., \"200 KB\")"
},
"_tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "Tags on the file entity (semantic labels set by uploader/automation)"
},
"relation_tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "Tags on the relation pointing at the file (journey upload block tags such as \"Lageplan\", plus a hidden journey step marker)"
},
"category": {
"type": "string",
"description": "File category select value (e.g., \"address-suggestions\", \"unknown\")"
},
"file_date": {
"type": "string",
"description": "User-provided file date"
},
"_created_at": {
"type": "string",
"format": "date-time",
"description": "When the file entity was created — useful for time-window filtering"
}
},
"required": [
"entity_id",
"version_index"
],
"additionalProperties": false
},
"description": "Every file related to the opportunity — the documents uploaded by the start journey and every follow-up journey. Empty when the process carries none. Consumers identify a given upload via `relation_tags` (the journey upload block tags) / `_tags`."
},
"required": true,
"graph_source": "[opportunity_files.{\"entity_id\": _id, \"filename\": filename, \"mime_type\": mime_type, \"size_bytes\": size_bytes, \"s3ref\": s3ref, \"version_index\": ($count(versions) > 0 ? $count(versions) - 1 : 0), \"readable_size\": readable_size, \"_tags\": _tags, \"relation_tags\": relation_tags, \"category\": category, \"file_date\": file_date, \"_created_at\": _created_at}]"
}
},
"entity_graph": {
"nodes": [
{
"id": "opportunity",
"schema": "opportunity",
"cardinality": "one"
},
{
"id": "submissions",
"schema": "submission",
"cardinality": "many",
"fields": [
"!token_claims",
"!_historyIndexes",
"!_displayConditionsStatus",
"!_validation_warnings",
"!_fallback"
]
},
{
"id": "contacts",
"schema": "contact",
"cardinality": "many"
},
{
"id": "accounts",
"schema": "account",
"cardinality": "many"
},
{
"id": "orders",
"schema": "order",
"cardinality": "many"
},
{
"id": "opportunity_files",
"schema": "file",
"cardinality": "many"
}
],
"edges": [
{
"from": "opportunity",
"to": "submissions"
},
{
"from": "opportunity",
"to": "contacts"
},
{
"from": "opportunity",
"to": "accounts"
},
{
"from": "opportunity",
"to": "orders"
},
{
"from": "opportunity",
"to": "opportunity_files"
}
]
},
"automation_trigger": true,
"automation_trigger_only": true,
"automation_trigger_seed_node": "opportunity"
}
Loading
Loading