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
4 changes: 4 additions & 0 deletions docs/integrations/core-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ All events include these fields:

<EventSchemaViewer event="TariffChange" />

### Grid

<EventSchemaViewer event="GridConnectionRequested" />

### ERP Sync

<EventSchemaViewer event="OnDemandSyncContractRequested" />
Expand Down
165 changes: 165 additions & 0 deletions static/events/GridConnectionRequested.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
{
"event_name": "GridConnectionRequested",
"event_title": "Grid Connection Request",
"event_description": "A grid connection request (new connection or change of an existing connection — electricity, gas, water, district heating, fibre) was submitted. Explicitly triggered by Automation once the journey mapping has created the opportunity, its orders, parties and uploaded documents.",
"event_version": "1.0",
"event_tags": [
"builtin",
"grid",
"automation",
"opportunity",
"order",
"attachment",
"grid-connection"
],
"schema_fields": {
"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 — site plans, floor plans, route plans, land-register extracts, load balances, powers of attorney. Empty when the request 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": "submission",
"schema": "submission",
"cardinality": "one",
"fields": [
"!token_claims",
"!_historyIndexes",
"!_displayConditionsStatus",
"!_validation_warnings",
"!_fallback"
]
},
{
"id": "contacts",
"schema": "contact",
"cardinality": "many"
},
{
"id": "orders",
"schema": "order",
"cardinality": "many"
},
{
"id": "opportunity_files",
"schema": "file",
"cardinality": "many"
}
],
"edges": [
{
"from": "opportunity",
"to": "submission"
},
{
"from": "opportunity",
"to": "contacts"
},
{
"from": "opportunity",
"to": "orders"
},
{
"from": "opportunity",
"to": "opportunity_files"
}
]
},
"automation_trigger": true,
"automation_trigger_only": true,
"automation_trigger_seed_node": "opportunity"
}
Loading
Loading