Skip to content

Commit 8487f5a

Browse files
authored
[WR] Additional functionality (cloudflare#2461)
* SSL 4 SaaS info * Added new file for events * partial changes * more progress * First drafts of ssl for saas + create events * Rough draft complete * Wording tweak * Tyler's initial feedback * Tyler's other feedback * Got all the feedback this time * Small change to re-kick off build * Tyler's last comment * removed redundant fields
1 parent 655b399 commit 8487f5a

File tree

8 files changed

+128
-7
lines changed

8 files changed

+128
-7
lines changed

products/waiting-room/src/content/about/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ Access to certain features depends on a customer's [plan type](plans).
4949
## Get started
5050

5151
To learn how to use Cloudflare Waiting Rooms, check out:
52-
- The [setup guide](../get-started)
53-
- Various [how-to guides](../how-to)
52+
- The [setup guide](/get-started)
53+
- Various [how-to guides](/how-to)
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
order: 3
3+
pcx-content-type: how-to
4+
---
5+
6+
# Create scheduled events
7+
8+
When you want to customize the behavior of a waiting room for a specific period of time — such as changing the queueing method or increasing the total active users — set up a **scheduled event**.
9+
10+
Any properties set on the event will override the default property on the waiting room for the duration of the event.
11+
12+
<Aside type="note">
13+
14+
Only some customers can support scheduled events with their waiting rooms. For more details, see our <a href="/plans">Plans</a> page.
15+
16+
</Aside>
17+
18+
## Create an event
19+
20+
At the moment, you can only create an event using the API.
21+
22+
To create an event, make a [POST request](https://api.cloudflare.com/#waiting-room-create-event) including [required and optional parameters](#properties). Any properties set on the event will override the default property on the waiting room for the duration of the event.
23+
24+
If you are using a [custom template](../customize-waiting-room#custom-waiting-room), you may want to add [relevant variables](https://api.cloudflare.com/#waiting-room-update-waiting-room) to your template (listed under the `json_response_enabled` parameter).
25+
26+
<Aside type="note">
27+
28+
If you need to create overlapping events, use different waiting rooms.
29+
30+
</Aside>
31+
32+
### Properties
33+
34+
Though most properties are identical to those on a [regular waiting room](https://api.cloudflare.com/#waiting-room-properties), there are a few unique to [creating an event](https://api.cloudflare.com/#waiting-room-create-event):
35+
36+
- `name` (required): Unique name with alphanumeric characters, hyphens, and underscores.
37+
- `event_start_time` (required): ISO 8601 timestamp that marks the start of the event. At this time, queued users will be processed with the event's configuration. Must occur at least 1 minute before `event_end_time`.
38+
- `event_end_time` (required): ISO 8601 timestamp that marks the end of the event.
39+
- `shuffle_at_event_start`: If **true** and `prequeue_start_time` is not null, users in the prequeue will be shuffled randomly at the `event_start_time`. Commonly used to ensure fairness if your event is using a [**FIFO** queueing method](#set-up-a-lottery).
40+
- `prequeue_start_time`: ISO 8601 timestamp that marks when to begin queueing all users before the event starts. Must occur at least **5 minutes before** `event_start_time`.
41+
- `description`: A text description providing more detail about the event.
42+
- `suspended`: If **true**, the event is ignored and traffic is handled based on the waiting room's normal configuration.
43+
44+
## Set up a "lottery"
45+
46+
Set up a "lottery" system to reward all users who enter into the queue prior to your event start time.
47+
48+
Users who reach your application **during the prequeue period** are [randomly assigned](/reference/queueing-methods#random) a place in line when the event starts. If the event uses [FIFO ordering](/reference/queueing-methods#first-in-first-out-fifo), users who reach your application **after the prequeue period** are assigned places after users from the prequeue.
49+
50+
To set up a "lottery", include the [following parameters](#properties) in your API request:
51+
52+
- `prequeue_start_time`
53+
- `shuffle_at_event_start`
54+
55+
## Preview an event configuration
56+
57+
Since some properties set on an event will override the default property of a waiting room for the duration of an event, you should use the API to [preview an event configuration](https://api.cloudflare.com/#waiting-room-preview-active-event-details) before it begins.
58+
59+
This command shows you the event's configuration as if it were active, meaning that inherited fields from the waiting room will display their current values.
60+
61+
## Edit an event
62+
63+
To edit an event, use a [PATCH request](https://api.cloudflare.com/#waiting-room-patch-event).
64+
65+
## Disable events
66+
67+
You can disable an event by setting its `suspended` parameter to `true`.
68+
69+
Additionally, events will not become active if a waiting room itself is **Disabled**.
70+
71+
## Other API commands
72+
73+
Function | Command
74+
---------|---------
75+
[Get event details](https://api.cloudflare.com/#waiting-room-event-details) | `GET`
76+
[List scheduled events](https://api.cloudflare.com/#waiting-room-list-events) | `GET`
77+
[Delete event](https://api.cloudflare.com/#waiting-room-delete-event) | `DELETE`

products/waiting-room/src/content/additional-options/customize-waiting-room.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
order:
2+
order: 1
33
pcx-content-type: how-to
44
---
55

products/waiting-room/src/content/additional-options/embed-waiting-room-in-iframe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
order:
2+
order: 4
33
pcx-content-type: how-to
44
---
55

products/waiting-room/src/content/additional-options/mobile-traffic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
order:
2+
order: 2
33
pcx-content-type: how-to
44
---
55

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
order: 6
3+
pcx-content-type: reference
4+
---
5+
6+
# Combine with SSL for SaaS
7+
8+
If your application is using a custom hostname — meaning your SaaS provider is using [SSL for SaaS](https://developers.cloudflare.com/ssl/ssl-for-saas) — your application can support a waiting room.
9+
10+
## Applications on Cloudflare
11+
12+
If your application is already using Cloudflare, create a waiting room using the [normal process](/how-to/create-via-dashboard).
13+
14+
## Applications not on Cloudflare
15+
16+
If your application is not using Cloudflare, you need to ask your SaaS provider to [configure a waiting room](/how-to/create-via-dashboard) on their SSL for SaaS zone (using your custom hostname as the **Hostname** value).

products/waiting-room/src/content/plans/index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,15 @@ The features available for a waiting room depend on your plan type.
4949
<td>No</td>
5050
<td>Yes</td>
5151
</tr>
52+
<tr>
53+
<td><a href='/additional-options/create-events'>Scheduled events</a></td>
54+
<td>No</td>
55+
<td>No</td>
56+
<td>Yes</td>
57+
</tr>
5258
</tbody>
5359
</table>
5460

5561
## How do I get started?
5662

57-
To get started with Waiting Room, review our [setup guide](/get-started).
63+
To get started with Waiting Room, review our [setup guide](/get-started).

products/waiting-room/src/content/reference/queueing-methods.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Your waiting room orders visitors according to when they entered the waiting roo
2222

2323
Technically, each user receives a [cookie](/reference/waiting-room-cookie) that contains a timestamp of when their request first hit an actively queueing waiting room. Cloudflare uses that timestamp to order visitors and provide the estimated wait time.
2424

25-
Use this method when you want to reward visitors who get in the queue first and wait longer, such as for sneaker drops, memorabilia sales, etc.
25+
Use this method when you want to reward visitors who get in the queue first and wait longer.
2626

2727
## Random
2828

@@ -32,6 +32,28 @@ When your application has open spots, your waiting room chooses visitors at rand
3232

3333
Use this method when you want to distribute products or services more equitably. Earlier users have a better chance of exiting the waiting room before the estimated wait time because they have more chances to be selected.
3434

35+
## API-only queueing methods
36+
37+
The following queueing methods are only available via the API and are commonly used when you [create an event](/additional-options/create-events).
38+
39+
<Aside type="note" header="Note:">
40+
41+
If your waiting room is set to **Queue All**, all visitors will be queued, regardless of the chosen method.
42+
43+
</Aside>
44+
45+
### Passthrough
46+
47+
Allow all traffic to pass immediately through your waiting room and into your application by setting its `queueing_method` to **passthrough**. If **Queue All** is enabled or an event is prequeueing, users will be queued in the waiting room.
48+
49+
Use this setup when you only want to use your waiting room for events — where you can update the queueing method — and otherwise avoid queueing during low-traffic hours.
50+
51+
### Reject
52+
53+
Prevent any traffic from reaching your application by setting its `queueing_method` to **reject**. If **Queue All** is enabled or an event is prequeueing, users will **still be rejected** and see a static web page that does not refresh.
54+
55+
Use this setup for event-only endpoints or to perform application maintenance.
56+
3557
## Changing queueing methods
3658

3759
<ChangeQueueMethod/>

0 commit comments

Comments
 (0)