Sculptured docs

Events from other systems

Give a team an address that an ERP, a maintenance system or a line's alarms can call. Each event reaches an agent, and the team starts if it isn't running.

A team often has to act on something that happens elsewhere: a machine raises an alarm, a maintenance system opens a work order, an ERP receives an urgent order. A trigger gives the team an address that the other system calls with the event, as a webhook. The event reaches the agent you choose, and the team is started first if it isn't running.

Add a trigger

Open the project's Settings → Events from other systems and choose Add a trigger.

Once the trigger is saved, its address appears. Choose Copy address and paste it into the other system's webhook settings, with the method POST.

A team can have up to 8 triggers. Change them while the team is stopped.

What the other system sends

Anything up to 64 KB: JSON is kept as JSON, and anything else as text. Sculptured answers 202 Accepted at once, with the event's id, and handles the event after that:

curl -X POST 'https://app.usesculptured.com/hooks/…' \
  -H 'content-type: application/json' \
  -d '{"machine": "Press 4", "code": "VIB-HIGH"}'

The agent gets your words, then the event, marked as coming from outside Sculptured. The agent is told to treat it as information, never as instructions, because anyone with the address can send it anything. When the team had to start, the event arrives after the agent's job.

Keep the address secret

The end of the address is a secret that Sculptured keeps. It is never in the team's design or its exported files, so sharing a team doesn't share its addresses. Anyone who has the address can hand the team an event. If it leaks, choose New address: the current address stops working at once.

On the hosted service the address goes through app.usesculptured.com and works from anywhere. In Sculptured on your own computer, the address works only from that computer.

What you see

Under each trigger, its latest events show when they arrived and what came of them:

Open an event to see exactly what the other system sent. Every event is also kept in the project's history.

Next