diff --git a/openapi.yaml b/openapi.yaml index dfacc57..93db327 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1801,6 +1801,45 @@ paths: $ref: '#/components/responses/ForbiddenError' "404": $ref: '#/components/responses/NotFound' + /feature_tours/{id}/funnel: + parameters: + - name: id + in: path + required: true + schema: + type: integer + get: + tags: [Feature Tours] + summary: Get a feature tour's funnel + description: | + How people get on with a feature tour, the same numbers as its Funnel page in Site Overview › Feature Tours: + for each stop, how many people reached it, completed it, skipped it themselves or had it skipped because they + couldn't use it (each person counted once per stop and event); and the tour's totals from everyone's progress. + Stop-by-stop counts start on `counts_since`, the day they were first recorded; the totals cover everyone. + System Access users only. + operationId: getFeatureTourFunnel + security: [{tokenAuth: []}] + responses: + "200": + description: The feature tour's funnel + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureTourFunnel' + example: + id: 12 + name: Filters on Contacts + status: live + counts_since: "2026-12-04" + totals: { started: 40, completed: 31, in_progress: 4, ended_early: 5 } + stops: + - { id: 101, position: 1, stop_key: contacts_table, title: Where all the records live, reached: 40, completed: 38, skipped_by_user: 0, skipped_by_system: 2 } + "401": + $ref: '#/components/responses/Unauthorized' + "403": + $ref: '#/components/responses/ForbiddenError' + "404": + $ref: '#/components/responses/NotFound' /tours/{id}/progress: parameters: - name: id @@ -17059,7 +17098,12 @@ paths: `storyboard` is the Intro's animation, drawn from Makerble building blocks when there is no Vimeo link (see `GuidancePanelStoryboard` for its rules). Send it as an object, or `null` to remove it. - A broken rule answers `422` with every message in `errors`. + + `feature_tour_id` chooses the feature tour the Intro offers with "Take the tour" (`null` for none). + It sets that tour's `page_key` to this Intro and unlinks any other tour that pointed here, naming it in + `notices`. It is refused when the chosen tour is live and another live tour is already on this Intro: + choose `null` first to take that one off. + A broken rule answers `422` with every message in `errors`, and nothing is changed. operationId: updateGuidancePanel security: [{tokenAuth: []}] requestBody: @@ -19403,6 +19447,56 @@ components: type: array items: $ref: '#/components/schemas/Tour' + FeatureTourFunnel: + type: object + description: A feature tour's funnel + properties: + id: + type: integer + name: + type: string + status: + type: string + enum: [draft, amends_needed, live] + counts_since: + type: string + format: date + nullable: true + description: The day stop-by-stop counts were first recorded; null until anyone has taken a step + totals: + type: object + properties: + started: + type: integer + description: Everyone who has taken the tour + completed: + type: integer + in_progress: + type: integer + ended_early: + type: integer + stops: + type: array + items: + type: object + properties: + id: + type: integer + position: + type: integer + stop_key: + type: string + title: + type: string + description: The stop's own title, or Makerble's default + reached: + type: integer + completed: + type: integer + skipped_by_user: + type: integer + skipped_by_system: + type: integer FeatureTour: type: object description: A feature tour and its stops in order @@ -19416,7 +19510,8 @@ components: type: string status: type: string - enum: [draft, live] + enum: [draft, amends_needed, live] + description: Only a live tour is shown to anyone. `amends_needed` is a draft that came back from review page_key: type: string nullable: true @@ -19481,7 +19576,8 @@ components: type: string status: type: string - enum: [draft, live] + enum: [draft, amends_needed, live] + description: Only a live tour is shown to anyone. `amends_needed` is a draft that came back from review page_key: type: string nullable: true @@ -27712,6 +27808,16 @@ components: format: date-time updated_by: $ref: '#/components/schemas/GuidancePanelUser' + feature_tour_id: + type: integer + nullable: true + description: | + The feature tour this Intro offers with "Take the tour" (its live tour, otherwise the one most recently + updated whose `page_key` is this Intro); null for none. Only a live tour is shown. + feature_tour_name: + type: string + nullable: true + description: That feature tour's name GuidancePanelVersion: type: object @@ -27747,6 +27853,11 @@ components: description: The last 10 versions, newest first items: $ref: '#/components/schemas/GuidancePanelVersion' + notices: + type: array + description: After a change, names any feature tour no longer offered on this Intro, e.g. "Checklists is no longer offered here."; otherwise empty + items: + type: string GuidancePanelRequest: type: object @@ -27774,6 +27885,12 @@ components: type: string storyboard: $ref: '#/components/schemas/GuidancePanelStoryboard' + feature_tour_id: + type: integer + nullable: true + description: | + The feature tour this Intro offers with "Take the tour"; null for none. Any other tour whose + `page_key` was this Intro is unlinked, and `notices` names it. PaginatedGuidancePanels: allOf: diff --git a/server.js b/server.js index 7506af4..eee2d74 100644 --- a/server.js +++ b/server.js @@ -4238,7 +4238,7 @@ function buildDocsPage() { ${endpointCard("GET", "/guidance_panels/{key}", "Get a Guidance Panel and its recent changes", true, [ { name: "key", in: "path", type: "string", required: true, desc: "The panel's key, e.g. events" } ], [ - { code: "200", cls: "response-2xx", desc: "The panel, with its last 10 versions: who, when, and what changed from what to what" }, + { code: "200", cls: "response-2xx", desc: "The panel, with its last 10 versions: who, when, and what changed from what to what, and the feature tour it offers (feature_tour_id, feature_tour_name)" }, { code: "403", cls: "response-4xx", desc: "No System Access" }, { code: "404", cls: "response-4xx", desc: "No panel with that key" } ])} @@ -4250,7 +4250,8 @@ function buildDocsPage() { { name: "guidance_panel[staff_text]", in: "body", type: "string", required: false, desc: "Shown instead of the main action to people who can't use it" }, { name: "guidance_panel[user_guide_url]", in: "body", type: "string", required: false, desc: "A page in the Makerble User Guide" }, { name: "guidance_panel[vimeo_url]", in: "body", type: "string", required: false, desc: "A Vimeo link, or empty to show the page's own image or animation" }, - { name: "guidance_panel[storyboard]", in: "body", type: "object", required: false, desc: "The animation shown when there is no Vimeo link (see above), or null to remove it" } + { name: "guidance_panel[storyboard]", in: "body", type: "object", required: false, desc: "The animation shown when there is no Vimeo link (see above), or null to remove it" }, + { name: "guidance_panel[feature_tour_id]", in: "body", type: "integer", required: false, desc: "The feature tour this Intro offers with \"Take the tour\", or null for none. Any other tour pointing here is unlinked and named in notices. Refused when the tour is live and another live tour is already on this Intro" } ], [ { code: "200", cls: "response-2xx", desc: "The changed panel and its last 10 versions; the page shows the change from its next load" }, { code: "403", cls: "response-4xx", desc: "No System Access" }, @@ -4783,7 +4784,7 @@ function buildDocsPage() {
Integrations

Feature Tours

-

A feature tour is a short guided tour that introduces one feature to people who already use Makerble. Unlike a Welcome Tour it belongs to no Organisation: Makerble staff write it once. A live tour with a page_key is offered by "Take the tour" on that page's Intro (the Show/Hide Guidance panel at the top of a Manage page, such as contacts); each Intro has at most one live tour. auto_prompt offers it once, the first time someone opens its page.

+

A feature tour is a short guided tour that introduces one feature to people who already use Makerble. Unlike a Welcome Tour it belongs to no Organisation: Makerble staff write it once. Its status is draft, amends_needed (a draft that came back from review) or live; only a live tour is shown to anyone. A live tour with a page_key is offered by "Take the tour" on that page's Intro (the Show/Hide Guidance panel at the top of a Manage page, such as contacts); each Intro has at most one live tour. The link can also be set from the Intro's side, with feature_tour_id on PATCH /guidance_panels/{key}. auto_prompt offers it once, the first time someone opens its page.

Each stop is one of the stops Welcome Tours use, named by stop_key, and shows Makerble's default_title and default_body unless it has its own title or body. GET /tour_stops lists every stop Makerble knows, grouped by feature, with the page each opens and its default wording. System Access users (Makerble staff) only; anyone else gets 403.

@@ -4818,6 +4819,13 @@ function buildDocsPage() { { code: "403", cls: "response-4xx", desc: "The user doesn't have System Access" }, { code: "404", cls: "response-4xx", desc: "Not found" } ])} + ${endpointCard("GET", "/feature_tours/{id}/funnel", "Get a feature tour's funnel", true, [ + { name: "id", in: "path", type: "integer", required: true, desc: "Feature tour ID" } + ], [ + { code: "200", cls: "response-2xx", desc: "The tour's totals (started, completed, in_progress, ended_early) and, for each stop in order, how many people reached, completed, skipped_by_user and skipped_by_system it" }, + { code: "403", cls: "response-4xx", desc: "The user doesn't have System Access" }, + { code: "404", cls: "response-4xx", desc: "Not found" } + ], "The same numbers as the tour's Funnel page in Site Overview › Feature Tours, counting each person once per stop and event. Stop counts start on counts_since, the day they were first recorded; the totals cover everyone who has taken the tour.")} ${endpointCard("POST", "/feature_tours", "Create a feature tour", true, [], [ { code: "201", cls: "response-2xx", desc: "Feature tour created (a draft unless status is live)" }, { code: "403", cls: "response-4xx", desc: "The user doesn't have System Access" },