Send webhooks from automations
An automation with the Webhook action sends an HTTP request to another system each time its trigger fires. Use it to keep your own system, or a partner’s, up to date as an order moves.
As an installer company, you can run webhook automations on the orders partners send you, as well as on orders you own. A webhook can fire when a partner sends you an order, when you accept it, or when a step such as the on-site visit is completed.
Create a webhook automation
Automations live on the Intelligence page. To create an automation, you need permission to edit templates. To save endpoint settings, such as Authentication, you need permission to change your organization’s settings.
- Select Intelligence in the sidebar.
- Under Your automations, select New automation.
- Under Details, enter a Name.
- Under When it runs, select Pick a trigger and choose what starts the automation. To limit which events start a run, select Add filter under Only if.
- Under What happens, select Webhook.
- In Send payload to, enter the full
httpsaddress, such ashttps://api.example.com/hooks/orders/{{order.id}}, then move to the next field. The start of the address,https://api.example.com, turns into a tag. The tag is the endpoint: settings shared by every automation that sends to that address. The path after the tag stays editable. - The first time anyone in your organization enters an address starting with
https://api.example.com, a Signing secret dialog opens. Copy the secret, give it to whoever runs the receiving system, and select I’ve saved it. The secret is shown only once. Later automations that send tohttps://api.example.comuse the same secret, so the dialog does not open again. - If the receiving system needs a credential, select the endpoint tag and set Authentication. For OAuth 2.0, see Authenticate webhooks with OAuth 2.0.
- Choose the method in the dropdown in front of the endpoint tag. The default is
POST. - Add any Headers, and write the Request body in JSON. Type
{{in the path, a header value or the body to insert a variable. Paths, headers and bodies use Handlebars syntax. - Select Show preview to see the request with example data. Nothing is sent.
- Select Create automation. The automation is saved as a draft and does not run yet.
- Select Publish and confirm. From then on, every matching event starts a run.
Each automation has one trigger. To send on two different triggers, create one automation for each.
The request body must be valid JSON once the variables are filled in. Installer.com escapes string values, so quotes and line breaks in an address or a note keep the JSON valid. A request with a body is sent with Content-Type: application/json.
Share one webhook endpoint across automations
A webhook address in Send payload to has two parts:
| Part | Example | Where it is stored |
|---|---|---|
| Endpoint | https://api.example.com |
Once for your organization. The endpoint holds the authentication, the timeout and the signing secret. |
| Path | /hooks/orders/{{order.id}} |
On the automation. The path accepts variables. |
Every automation that sends to the same endpoint address shares one endpoint. New credentials saved on the endpoint apply to all of those automations at once, including deliveries waiting for a retry.
To open the endpoint settings, select the endpoint tag in Send payload to. The settings open with the endpoint address as the title.
Enter the final address of the receiving system. A redirect fails the delivery.
Which variables a webhook gets
What a webhook can send depends on who owns the order. On an order a partner sent you, your company sees less of the order, so the webhook gets less too.
The trigger decides which orders an automation runs on. In When it runs, the triggers under Orders from partners run on orders partners send you. All other triggers run on orders your company owns.
| What the webhook can send | On your own orders | On orders from partners |
|---|---|---|
| The order’s id, number, name, status and tags | Yes | Yes |
| The customer’s contact details and address | Yes | After your company accepts the order |
The customer portal link, clientAppUrl |
Yes | No |
Your own reference, order.externalId |
Yes | No |
| Custom fields | Yes | No |
| The workflow template | Yes | No. Only the workflow type and the installation type. |
| Steps | Yes | Only the step that changed, on a step you can see changes status |
| Bookings | Yes | Only the start and end of the step’s booking, on a step you can see changes status |
| Offers and amounts | Yes | No, not even on the customer accepts an offer |
| Companies and people | Your organization, the responsible operator and each dispatched company | The order owner, the company that sent you the order and your contact person |
Variables in a webhook on your own orders
Type {{ in the path, a header value or the body to open the variable list. The list offers only the variables the chosen trigger can fill, each with a description.
| Variable | Holds |
|---|---|
order |
The order, its tags, and the customer’s contact details and address. |
workflow |
The workflow and the template it was created from. |
step |
One step of the workflow. |
booking |
One booking on the order, with its status and the people from your company assigned to it. |
offer |
One offer on the order, with its lines. |
latestOffer |
The most recently sent offer, accepted or waiting for an answer. |
allOfferLines |
Every line of every accepted offer. |
router |
Your organization. |
responsibleRoutingOperator |
The operator responsible for the order. |
customFields.<customId> |
The value of one custom field, by its Custom ID. |
actor.* |
Each company dispatched on the order, one entry per actor in your workflow, with its contact person. Empty until that company is dispatched. |
trigger |
What started the run, and when. Some triggers add more. |
run |
This run: its id, the attempt number, and whether it is a test or was started by hand. |
clientAppUrl |
The order’s link in the customer portal. |
On a trigger about a step, step is that step, with its booking and offer. On a trigger about a booking, booking is that booking. Otherwise, step is the step that is In Progress, and booking and offer are the order’s latest. Any of them can be empty.
Triggers about a step, a tag, a booking, a changed field, a chat message, a partner or a timer add their own variables under trigger, such as trigger.step.nextStatus or trigger.tag.name. The {{ list shows them once you pick the trigger. The text of a chat message is never sent.
A custom field is missing from the {{ list when its Custom ID is only digits, or has characters other than a to z, A to Z, digits, - or _, such as a space or ø.
A body for a step change on your own order can look like this:
{
"orderId": "{{order.id}}",
"orderNumber": "{{order.displayId}}",
"step": "{{trigger.step.rootTemplateStepId}}",
"status": "{{trigger.step.nextStatus}}",
"bookingStart": {{#if booking.startAt}}{{unix booking.startAt}}{{else}}null{{/if}},
"isTest": {{#if run.isTest}}true{{else}}false{{/if}},
"tagIds": [
{{#each order.tags}}
"{{this.id}}"{{#unless @last}},{{/unless}}
{{/each}}
]
}
Triggers for orders from partners
When a partner sends your company an order, a webhook automation can tell your own system what happens on that order. The table lists the triggers for orders from partners. If your company also owns orders, the partner-order triggers sit under Orders from partners in When it runs.
| Trigger | Starts a run when | trigger.type in the request |
|---|---|---|
| a partner sends you an order | A partner sends an order to your company. | workflow.actor.dispatched |
| you accept an order | Your company accepts an order from a partner. | workflow.actor.accepted |
| you decline an order | Your company declines an order from a partner. | workflow.actor.rejected |
| an order you accepted goes back to the partner | An order your company accepted is no longer yours and returns to the partner. | workflow.actor.cancelled |
| a step you can see changes status | A workflow step your company can see on the order changes status. | workflow.step.status_changed |
| a partner completes the order | The partner completes the whole order. | order.completed |
| a partner cancels the whole order | The partner cancels the whole order. | order.cancelled |
| a partner reopens the order | The partner reopens a cancelled order. | order.reopened |
| the customer accepts an offer | The customer accepts an offer on the order. | offer.accepted |
In the trigger list, the first four triggers in the table sit under Sent to you. The three triggers about the whole order sit under The order. a step you can see changes status and the customer accepts an offer each stand on their own.
An automation on orders from partners runs only on orders partners send you. The automation stops running on an order once your company no longer has that order.
Until your company accepts an order from a partner, only the triggers under Sent to you run on it. The other partner triggers work once your company has accepted the order.
Trigger a webhook on orders from partners by step type
Use the trigger a step you can see changes status to follow the work on a partner’s order, such as bookings, the on-site visit and documentation. Filters under Only if choose which steps and which status changes start a run.
Example: to tell your system when the installation visit on a partner’s order is done, choose a step you can see changes status and add two filters:
- Step type is any of Perform booking, Work
- New step status is Completed
Perform booking is the on-site visit, where the installer carries out the booked work, such as the installation. In the workflow editor, the step is named Perform on-site visit by default. Some workflows use the Work step type for the visit, so the example includes both.
These filters are available on the trigger. A filter can take several values with is any of.
| Filter | Example values |
|---|---|
| Step type | Booking, Perform booking, Work documentation |
| New step status | In Progress, Completed, To confirm |
| Previous step status | To do, In Progress |
| Action | Completed, Skipped |
| Sent by | The company that sent you the order. |
| Order owner | The company that owns the order. The order owner differs from Sent by when the order reached you through another company. |
| Order status, Workflow type, Installation type | Facts about the order. |
Some steps wait for confirmation before they count as done. A Booking step followed by a Confirm booking step first reads To confirm, then Completed once confirmed. Each status change starts its own run, so filter on the status you want.
A skipped step reads Skipped, so a filter on Completed does not match it.
The request carries raw values, not the labels in the filter. A receiving system that routes on step type, status or action checks these values:
| Label in the filter | Value in the request |
|---|---|
| Step type Booking | booking_create |
| Step type Perform booking | booking_perform |
| Step type Work | installation_create |
| Step type Work documentation | documentation_create |
| New step status In Progress | active |
| New step status To confirm | unconfirmed |
| New step status Completed | done |
| Action Completed | COMPLETE |
| Action Skipped | SKIP |
Variables in a webhook on orders from partners
On an order from a partner, the variable list offers only what your company may read about that order. Type {{ in the path, a header value or the body to see the list. The variables sit in three groups.
Order holds the order and the companies on it:
| Variable | Holds |
|---|---|
order.id, order.displayId, order.name |
The order’s id, order number and name. |
order.statusV2 |
PENDING, CANCELLED or DONE. |
order.tags |
A list of tags. Use {{#each order.tags}} to write them out. |
workflow.workflowType |
lead, installation or service. |
workflow.installationType |
The installation type, such as HEAT_PUMPS or EV_CHARGERS, when the order has one. |
router.id, router.name |
The company that owns the order. |
sentBy.id, sentBy.name |
The company that sent you the order. |
representative.name, representative.email |
The person at your company the order was sent to. |
Event holds what happened and this run:
| Variable | Holds |
|---|---|
event.type |
The event, such as workflow.step.status_changed. |
event.occurredAt |
When the event happened, in ISO 8601. |
trigger.type, trigger.at |
The trigger and when it fired. |
trigger.isManual, run.isManual |
true when someone started the run by hand. |
trigger.isTest, run.isTest |
true when the order is a test order. |
timestamp |
When the request was built. |
run.id, run.attempt |
The run, and the attempt number starting at 1. |
trigger.step.type, trigger.step.title |
The step’s type and name. Filled only on a step you can see changes status. |
trigger.step.prevStatus, trigger.step.nextStatus, trigger.step.action |
The status change and the action behind it. Filled only on a step you can see changes status. |
booking.startAt, booking.endAt |
The booking’s start and end, in ISO 8601, when the step carries a booking. Filled only on a step you can see changes status. |
Customer, after you accept holds order.contactPersonName, order.email, order.phoneNumber, order.address, order.postalCode, order.city and order.countryCode. Customer details on a partner’s order stay empty until your company accepts the order.
On you decline an order and an order you accepted goes back to the partner, your company no longer has the order. Only order.id, order.displayId, order.name, sentBy.id, sentBy.name and the event variables are filled.
A body for a step change on a partner’s order can look like this:
{
"orderNumber": "{{order.displayId}}",
"sentBy": "{{sentBy.name}}",
"event": "{{trigger.type}}",
"occurredAt": "{{trigger.at}}",
"stepType": "{{trigger.step.type}}",
"status": "{{trigger.step.nextStatus}}",
"bookingStart": "{{booking.startAt}}",
"customerName": "{{order.contactPersonName}}"
}
A variable in the path must have a value, or the delivery fails without sending. A variable in the body or a header renders empty when it has no value.
Best practices for webhook variables
These practices keep a webhook working as orders and workflows change.
Identify records by id
Names change. Ids do not. Send the id the receiving system can store and match on.
| To identify | On your own orders | On orders from partners | Not |
|---|---|---|---|
| The order | order.id, or order.externalId for your system’s own reference |
order.id |
order.name |
| The step that changed | trigger.step.rootTemplateStepId |
trigger.step.type |
trigger.step.id or trigger.step.title |
Put only variables that always have a value in the path
A variable in the path must have a value, or the delivery fails without sending. Put only variables that always have a value, such as order.id, in the path, and everything else in the body. A name or an address can also hold characters that break the address.
Write a body that is valid JSON, empty or filled
When you select Publish, Installer.com builds the body once with every variable empty. A body that is not valid JSON then stops the publish.
- Put quotes around every variable that holds text:
"name": "{{order.name}}". An empty value then becomes"". - A variable without quotes, such as a number or
true, is empty at publish, and the JSON breaks. Wrap it in{{#if}}with a fallback:{{#if run.attempt}}{{run.attempt}}{{else}}null{{/if}}.
A body that breaks only once the values are filled in still passes Publish, and then fails on delivery. Select Show preview to check the body with example data before you publish.
Format dates, amounts and lists
Dates are sent in ISO 8601, such as 2026-11-10T08:00:00.000Z. For Unix seconds, write {{#if booking.startAt}}{{unix booking.startAt}}{{else}}null{{/if}}, so an empty date sends null.
On your own orders, amounts, such as offer.payerTotalAmount, are whole numbers in the smallest currency unit, such as cents or øre.
Lists, such as order.tags, need {{#each}}. Add the comma between items yourself with {{#unless @last}},{{/unless}}.
Say what started the run
trigger.type and trigger.at say what started the run and when. They are filled on every run, also on scheduled runs and runs started with Run on order. Also send run.isTest, so the receiving system can ignore test orders, and run.isManual, which is true on a run started with Run on order.
Send only what the receiving system needs
Customer details are personal data. Leave customer details out unless the receiving system uses them.
On your own orders, anyone with clientAppUrl can open the order. Leave clientAppUrl out unless the receiving system uses it.
Test a webhook automation
Test a webhook automation in two ways before you rely on it:
- Show preview, under What happens, shows the address, headers and body with example data. On orders from partners, the preview uses your newest order from a partner with a sample customer and order name. Nothing is sent.
- Run on order, on the automation page, runs the automation once against an order you pick. Run on order works while the automation is off or still a draft. A run started this way sends a real request to the receiving system. On an order from a partner, Run on order works once your company has accepted the order.
A run started with Run on order has no triggering event. Variables about the event, such as event.type, trigger.step.* or trigger.tag.*, are empty, and run.isManual is true. A path that uses one of them fails on such a run.
Check webhook deliveries
Open the automation and select Activity to see every run. Open a run to see each delivery attempt:
- The method and address that were called.
- The response status, or No response received.
- Attempt, with the attempt number.
- The error, when the attempt failed.
- Payload sent and Response.
An attempt marked Token request failed while getting an OAuth 2.0 token, before anything was sent to the receiving system. See Authenticate webhooks with OAuth 2.0.
A run whose attempts all fail reads Failed in Activity. Select Retry on the run to send it again. A retry you start this way carries a new webhook-id.
When runs fail often, the automation page shows the failure rate over the last 7 days. Select View failing runs to open those runs.
Webhook delivery outcomes and retries
The response from the receiving system decides what happens to a webhook delivery.
| Response | Outcome |
|---|---|
2xx |
Delivered. Only the status code counts, so a 2xx with an error in the reply is still delivered. |
408, 425, 429 or any 5xx |
Retried. |
| No response, because of a timeout or a connection failure | Retried. |
410 Gone |
Failed, and the endpoint is turned off. Turn it back on with Enabled in the endpoint settings. |
Any other 4xx |
Failed. With Retry rejected requests on, retried. |
A redirect (3xx) |
Failed. |
| A Transport Layer Security (TLS) certificate that cannot be verified | Failed. |
Retry rejected requests is a switch under What happens, below the preview.
A delivery is tried up to three times. The first retry comes about 30 seconds after the first attempt. The second comes about 2 minutes after the first retry. A Retry-After header from the receiving system can lengthen the wait, up to 25 minutes.
The endpoint’s Timeout (ms) sets how long each attempt waits for a response. The default is 10,000, and the range is 1,000 to 30,000.
After 10 failed attempts in a row to one endpoint, from any automation, deliveries to that endpoint pause for 5 minutes. Runs wait during the pause instead of failing.
A delivery can arrive more than once. The webhook-id header stays the same across automatic retries, so the receiving system can use it to ignore duplicates.
Verify webhook requests with the signing secret
Each webhook request from an automation is signed following the Standard Webhooks specification. The receiving system uses the signing secret to confirm that the request came from Installer.com and was not changed on the way. The signing secret is shown once, when the endpoint is created.
| Header | Holds |
|---|---|
webhook-id |
The message id. The same on every automatic retry. |
webhook-timestamp |
When this attempt was sent, in Unix seconds. |
webhook-signature |
The signature, as v1,<base64>. For 24 hours after a rotation, two signatures separated by a space. A request is valid when either one matches. |
x-installer-event-type |
The event, such as workflow.step.status_changed. |
x-installer-delivery-id |
This attempt. Quote it to support. |
x-installer-webhook-attempt |
The attempt number, starting at 1. |
To replace the signing secret, open the endpoint settings and select Rotate signing secret. Copy the new secret, which is shown once. The old secret keeps working for 24 hours, so the receiving system has time to switch. Rotating again within those 24 hours ends the oldest secret at once.
To give the receiving system a credential from Installer.com, set Authentication in the endpoint settings. See Authenticate webhooks with OAuth 2.0.
Related articles
- Authenticate webhooks with OAuth 2.0
- Configure notification webhooks on workflow steps, which are pending deprecation
Need help? Contact Installer.com support.
Was this helpful?