Skip to content

Commit 88a2bd7

Browse files
chmaltspclaude
andauthored
Fix ambiguous push_data flow in Reservation Automations guide (#1054)
* Fix ambiguous push_data flow in Reservation Automations guide Clarify that spaces must be created via /spaces/create before calling push_data — the previous guide implied push_data creates spaces inline, which leads to silent failures. Also adds troubleshooting section for common push_data gotchas (missing spaces, duplicate emails, etc.). Resolves DOC-117 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Address review feedback on reservation automations guide - Clarify that push_data's spaces array only creates a lightweight reference without device assignments (not a full space with devices) - Add acs_entrance_ids alongside device_ids for ACS-backed spaces - Clarify access_grants vs reservations delete_data key mismatch - Update troubleshooting table to mention entrances Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ae5ef43 commit 88a2bd7

1 file changed

Lines changed: 51 additions & 15 deletions

File tree

docs/capability-guides/reservation-automations.md

Lines changed: 51 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,52 @@ Built for short-term bookings—whether hotel stays, gym classes, coworking room
1414

1515
Reservation Automations follow the lifecycle of a reservation:
1616

17-
1. You enable Automations in [Console](https://console.getseam.com/).
17+
1. You create spaces and assign devices using [`/spaces/create`](../api/spaces/create.md).
1818
2. You send reservation and guest data with `push_data`.
1919
3. Seam applies the right access and climate settings at the right times.
2020
4. Webhooks notify you when settings are issued, updated, or revoked.
2121
5. If a reservation is canceled, you call `delete_data` to roll back device settings.
2222

2323
***
2424

25-
### Before you begin![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg) <a href="#before-you-begin" id="before-you-begin"></a>
25+
### Before you begin <a href="#before-you-begin" id="before-you-begin"></a>
2626

2727
Set up these resources in your Seam workspace:
2828

2929
* [Customer](customer-portals/) – identify who the automation belongs to with a `customer_key`.
30-
* [Spaces](../core-concepts/mapping-your-resources-to-seam-resources.md) – represent the real-world units your customer manages (i.e. _Room 101_ in a hotel, _Studio 3_ in a gym). Reservations should reference these spaces.
31-
* Devices or entrances – connect locks, thermostats, or other devices to each Space (e.g., assign the lock in Room 101 to the _Room 101_ space)
30+
* [Spaces](../core-concepts/mapping-your-resources-to-seam-resources.md) – represent the real-world units your customer manages (i.e. _Room 101_ in a hotel, _Studio 3_ in a gym). Each space must be created via [`/spaces/create`](../api/spaces/create.md) with a `space_key` and assigned devices or entrances **before** you call `push_data`. Reservations reference these spaces by `space_key`.
31+
* Devices or entrances – connect locks, thermostats, or ACS entrances to each space (e.g., assign the lock in Room 101 to the _Room 101_ space). Use `device_ids` for smart locks and thermostats, or `acs_entrance_ids` for access control system entrances.
32+
* Unique user identity emails – each `user_identity` you push must have a unique `email_address`. If an email already exists from a previous call, the reservation is silently skipped.
3233

33-
Reservation Automations use these resources to decide where and how to apply settings.
34+
{% hint style="warning" %}
35+
Although `push_data` accepts a `spaces` array, it only creates a lightweight resource reference — it does **not** assign devices or entrances to the space. If you skip [`/spaces/create`](../api/spaces/create.md), the space will have no devices and automations will have nothing to configure. The call still returns `ok: true`, making this a silent failure. Always create spaces with device or entrance assignments first using `/spaces/create`.
36+
{% endhint %}
3437

3538
{% hint style="success" %}
3639
You can also let customers configure their own accounts, spaces, and devices with [Customer Portals](customer-portals/).
3740
{% endhint %}
3841

3942
***
4043

41-
### 1. Enable Reservation Automations in Console.
44+
### 1. Create spaces with devices
45+
46+
Before pushing reservation data, create a space for each bookable unit using the [`/spaces/create`](../api/spaces/create.md) endpoint. Each space must have a `space_key` (your identifier) and at least one assigned device or entrance.
47+
48+
```bash
49+
curl -X POST \
50+
https://connect.getseam.com/spaces/create \
51+
-H "Authorization: Bearer $SEAM_API_KEY" \
52+
-H "Content-Type: application/json" \
53+
-d '{
54+
"name": "Room 101",
55+
"space_key": "unit-101-key",
56+
"device_ids": ["YOUR_LOCK_DEVICE_ID"]
57+
}'
58+
```
4259

43-
Go to **Console****Developer****Automations** and turn on an Automations for your workspace.
60+
Use `device_ids` for smart locks and thermostats, or `acs_entrance_ids` for access control system entrances. You can include both if the space has multiple access points.
4461

45-
<figure><img src="../.gitbook/assets/Screenshot 2025-09-01 at 5.25.53 PM (1).png" alt=""><figcaption></figcaption></figure>
62+
The `space_key` is what you reference in `push_data` reservations. Without it, `push_data` cannot match reservations to the space.
4663

4764
***
4865

@@ -102,14 +119,12 @@ When enabled, multiple guests can share the same email address or phone number.
102119

103120
Use the `push_data` endpoint to send customer, user, and reservation data to Seam. Automations use this information to configure devices at the right times.
104121

105-
A **reservation** represents a time-bound assignment of a user to a space. This can be a hotel stay, a gym day pass, or a coworking member’s conference room booking. Each reservation must include a unique `reservation_key`, which can be your system’s identifier for that record. Seam uses this key to know whether it should create a new reservation, update an existing one, or remove it later with `delete_data`.
106-
107-
Use the `push_data` endpoint to provide Seam your customer, guest, and reservation data. Seam uses this to issue access credentials and configure devices at the right times.
122+
A **reservation** represents a time-bound assignment of a user to a space. This can be a hotel stay, a gym day pass, or a coworking member's conference room booking. Each reservation must include a unique `reservation_key`, which can be your system's identifier for that record. Seam uses this key to know whether it should create a new reservation, update an existing one, or remove it later with `delete_data`.
108123

109124
```bash
110125
curl -X POST \
111-
https://api.seam.co/customers/push_data \
112-
-H "Authorization: Bearer $YOUR_API_KEY" \
126+
https://connect.getseam.com/customers/push_data \
127+
-H "Authorization: Bearer $SEAM_API_KEY" \
113128
-H "Content-Type: application/json" \
114129
-d '{
115130
"customer_key": "sample_customer_key",
@@ -135,6 +150,10 @@ curl -X POST \
135150
* Call `push_data` with a new `reservation_key` to create a reservation.
136151
* Call it again with the same `reservation_key` to update times or other details—Seam automatically reconfigures the device settings.
137152

153+
{% hint style="info" %}
154+
The `push_data` [API reference](../api/customers/push_data.md) also documents `access_grants` and `bookings` as alternative top-level keys. This guide uses `reservations`, which is the recommended key for short-term booking workflows. If you use `access_grants` instead, use `access_grant_keys` (not `reservation_keys`) when calling [`delete_data`](../api/customers/delete_data.md).
155+
{% endhint %}
156+
138157
***
139158

140159
### 4. Use webhooks to listen for updates
@@ -164,8 +183,8 @@ Calling `delete_data` removes the underlying reservation records, which tells au
164183

165184
```bash
166185
curl -X POST \
167-
https://api.seam.co/customers/delete_data \
168-
-H "Authorization: Bearer $YOUR_API_KEY" \
186+
https://connect.getseam.com/customers/delete_data \
187+
-H "Authorization: Bearer $SEAM_API_KEY" \
169188
-H "Content-Type: application/json" \
170189
-d '{
171190
"reservation_keys": ["res_456"],
@@ -179,4 +198,21 @@ curl -X POST \
179198

180199
***
181200

201+
### Troubleshooting
202+
203+
#### I called `push_data` and got `ok: true` but no access code was created
204+
205+
`push_data` returns a success response even when automations cannot act on the data. Check these common causes:
206+
207+
| Symptom | Cause | Fix |
208+
| ------- | ----- | --- |
209+
| No access code created | Space does not exist or is missing a `space_key` | Create the space via [`/spaces/create`](../api/spaces/create.md) with a `space_key` and `device_ids` or `acs_entrance_ids` before calling `push_data` |
210+
| No access code created | No devices or entrances assigned to the space | Add `device_ids` or `acs_entrance_ids` when creating the space, or update the space to include them |
211+
| Reservation silently skipped | Duplicate `email_address` on a `user_identity` | Each user identity must have a unique email. Check **Console****Automation Runs** for `user_identity_email_or_phone_conflict` errors |
212+
| Automation did not run | Automations not enabled | Go to **Console****Developer****Automations** and verify automations are enabled for your workspace |
213+
214+
{% hint style="info" %}
215+
Check **Console****Automation Runs** for detailed error information. Errors like `user_identity_email_or_phone_conflict` are only visible there — they do not appear in the `push_data` response.
216+
{% endhint %}
217+
182218
***

0 commit comments

Comments
 (0)