# Creating Deep Links for Activity and Class Bookings in Gladstone Go

HTML version: [Creating Deep Links for Activity and Class Bookings in Gladstone Go](https://support.gladstonesoftware.cloud/goconsumer/creating-deep-links-for-activity-and-class-bookings-in-gladstone-go)

## Problem
You need a web address that takes customers straight to a pre-filled booking search, an activity calendar or a class on Go Book, for use on your website, in emails, on social media or as QR codes on posters.

## Resolution

1. **Find your IDs**
   - In the examples, replace `yourcentre` with your own Go address and the IDs with your own.
   - Activity IDs are in Go Operator at `Configuration > Bookings and Reservations > Activity Management > Activities`. Your Gladstone contact or admin team can also give you your site, activity group and activity IDs.

2. **Build a search link (if applicable)**
   - Start from `https://yourcentre.gladstonego.cloud/book?...` and add parameters:

   | Parameter | What it does | Example |
   |---|---|---|
   | `siteId` | The centre (**always include it**) | `SITE01` |
   | `activityGroupId` | A category, for example Sports Hall | `SPORTSHALL` |
   | `activityId` | One specific activity | `SITE01BADMINTON` |
   | `dateFrom` | First date shown (`YYYY-MM-DD`) | `2026-06-02` |
   | `dateTo` | Last date shown (`YYYY-MM-DD`) | `2026-06-09` |

   - **Site only** pre-selects the centre, and the customer chooses what to book. **Site plus an activity or group** shows matching sessions straight away.

   | You want to share | Link shape |
   |---|---|
   | "Come and browse our centre" | `/book?siteId=…` |
   | "See all Sports Hall sessions" | `/book?siteId=…&activityGroupId=…` |
   | "Book this activity" | `/book?siteId=…&activityId=…` |
   | "Sports Hall sessions next week" | `/book?siteId=…&activityGroupId=…&dateFrom=…&dateTo=…` |

3. **Build a calendar link for one activity (if applicable)**
   - Use `/book/calendar/<Activity ID>`, optionally with a date range:

   ```
   https://yourcentre.gladstonego.cloud/book/calendar/SITE01BADMINTON
   https://yourcentre.gladstonego.cloud/book/calendar/SITE01BADMINTON?dateFrom=2026-06-02&dateTo=2026-06-09
   ```

   - Or, to open a particular date and time, add `activityDate`. The `Z` at the end means the time is [UTC](../guides/glossary.md#operations-and-integration-acronyms), not UK local time. Convert the session time to UTC for the date of the session before adding it to the link:

   ```text
   https://<domain>.gladstonego.cloud/en_GB/book/calendar/<Activity ID>?activityDate=<yyyy-mm-dd>T<hh:mm:ss.000>Z
   https://yourorganisation.gladstonego.cloud/book/calendar/WACT000201?activityDate=2026-10-05T17:15:00.000Z
   ```

   - For example, an 18:15 session on 5 October 2026 is during British Summer Time, so use `2026-10-05T17:15:00.000Z`. An 18:15 session on 9 November 2026 is during Greenwich Mean Time, so use `2026-11-09T18:15:00.000Z`.
   - The date (`yyyy-mm-dd`) and time (`hh:mm:ss.000`) are both optional. Remove both to show the next available booking; remove only the time to show all available times on that date. Use this date-only form when a link does not need to open at a specific time, because it shows the whole day and does not need a time-zone conversion:

   ```text
   https://yourorganisation.gladstonego.cloud/book/calendar/WACT000201?activityDate=2026-10-05
   ```

   - When you include a time, the calendar opens at the top of that hour, for example **Starting from 18:00**, and shows that session and later sessions. Exact minutes are still valid in the link, but they are not required to choose the hour shown first.
   - A calendar link always shows a single activity. To show several, use a search link.

4. **Copy a class link from Go Book (if applicable)**
   - While **not logged in to a member account**, open Go Book, search for the class session and click **Book now**.
   - Copy the URL from the browser address bar. It has this shape:

   ```text
   https://<domain>.gladstonego.cloud/en_GB/book/details?activityEndTime=<yyyy-mm-dd>T<hh:mm:ss>Z&activityGroupId=<Group ID>&activityId=<Activity ID>&activityStartTime=<yyyy-mm-dd>T<hh:mm:ss>Z&locationId=<location ID>&siteId=<site ID>
   ```

   - `activityStartTime` and `activityEndTime` are also UTC values. Links copied from Go Book are already correct. If you build a class link by hand, convert the class start and end times in the same way as `activityDate`.

5. **Open the page in Welsh or English (if applicable)**
   - Add `en_GB` or `cy_GB` straight after your domain, for example `https://yourcentre.gladstonego.cloud/cy_GB/book?siteId=…`.

## Notes

- You need access to Go Operator to look up IDs, and the activity or class must already exist and be available for booking. You can only deep link to a class that is currently available for booking.
- Parameter names must match exactly (`siteId`, not `SiteID`). Dates must be `YYYY-MM-DD`; UK-style `02/06/2026` will not work.
- Use a time-zone-aware library with the `Europe/London` time zone when you convert UK class or activity times to UTC. Do not use a fixed one-hour adjustment: the correct offset depends on the session date, not the date when the link is built.
- Times display in the visitor's device time zone. UK visitors see the intended UK time; a visitor whose device is set to another time zone may see the time shifted. This does not change how you build the link.
- You can add tracking tags such as `utm_source` or `utm_campaign`. They will not affect the link.
- Link IDs are the site, activity group and activity IDs from Plus2/Operator, so links stay valid while those IDs do.
- **If something is wrong with the link**:

  | Problem | What the customer sees |
  |---|---|
  | No `siteId` | The normal Book page |
  | Unknown ID | "No matching activities found" |
  | Unreadable date | The date is ignored and the rest works |
  | Calendar starts an hour late in summer, or shows "No timetable slots" | UK local time has been sent with a trailing `Z`. Convert the local time to UTC before adding it to `activityDate`, `activityStartTime` or `activityEndTime`. |
  | Start date in the past, or end before start | An error message they can correct |

- **Activity booking does not appear**: check the Activity ID, date and time are valid and correctly formatted. **Class link does not work**: check the session is still available for booking. **Link opens the wrong session**: check the copied URL matches the intended session.
- At present a language link may still open in the customer's own saved language preference.
- Related: [Creating Deep Links for Membership Purchase in GladstoneGo](../gooperator/creating-deep-links-for-membership-purchase-in-gladstonego.md); [Deep Links into Go Book and Go Join](../gooperator/deep-links-into-go-book-and-go-join.md); [Configuring Activities in Plus2](../plus2/configuring-activities-in-plus2.md).
