> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Sample Flows

## Article: Sample Flows

## Article Link: https://dev.wix.com/docs/api-reference/business-management/online-programs/quiz-submissions/sample-flows.md

## Article Content:

# Quiz Submissions API: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.

For authentication, answer formats, and grading behavior, see [Introduction](https://dev.wix.com/docs/api-reference/business-management/online-programs/quiz-submissions/introduction.md).

The flows below use REST response field names. With the JavaScript SDK, Create and Get return the submission directly, while Delete returns an object containing `quizSubmission`. Read the submission ID from `_id` instead of `id`. See [SDK examples](https://dev.wix.com/docs/api-reference/business-management/online-programs/quiz-submissions/quiz-submission-behavior.md#sdk-examples).

## Submit answers and display the result

Build a custom quiz experience that displays feedback after a participant submits their answers.

> Prerequisite: Obtain the quiz program-step ID.

To submit answers and display the result:

1. Call [Get Step](https://dev.wix.com/docs/api-reference/business-management/online-programs/steps/get-step.md) with the program-step ID and read the quiz ID from `step.quizOptions.id`.
2. Call [Get Quiz](https://dev.wix.com/docs/api-reference/business-management/online-programs/quizzes/get-quiz.md) to retrieve the question targets and answer options.
3. Call [Create Quiz Submission](https://dev.wix.com/docs/api-reference/business-management/online-programs/quiz-submissions/create-quiz-submission.md) with `quizSubmission.quizId` and `quizSubmission.answers`. Key each answer by its question target. For a single-choice question, send the exact option value selected by the participant.
4. Save the returned `quizSubmission.id`. Display the result using `evaluationStatus`, `answers`, and, when present, `earnedGrade` and `passingGrade`.

Use the participant's signed-in member identity when submitting their answers. In a headless client, complete [member authentication](https://dev.wix.com/docs/go-headless/authentication/about-authentication.md#member-authentication) and use the resulting member token or authenticated SDK client. App authentication doesn't impersonate a participant. Creating a submission evaluates the answers but doesn't record program-step progress.

## Retrieve a saved result

Display a participant's stored answers and evaluation when they return to your quiz experience. Retain the submission ID from creation rather than assuming every historical attempt remains available.

To display a saved result:

1. Call [Get Quiz Submission](https://dev.wix.com/docs/api-reference/business-management/online-programs/quiz-submissions/get-quiz-submission.md) with the saved quiz-submission ID.
2. Read `quizSubmission.answers`, `quizSubmission.evaluationStatus`, and any grading fields to display the result.

## Remove an unwanted attempt

Let an authorized caller discard an unwanted quiz attempt without resetting the participant's program-step progress.

To remove the attempt:

1. Call [Delete Quiz Submission](https://dev.wix.com/docs/api-reference/business-management/online-programs/quiz-submissions/delete-quiz-submission.md) with the quiz-submission ID you intend to remove.
2. Use the returned `quizSubmission` if you need the attempt's data from before deletion.

Deleting a submission doesn't reset program-step progress.

## Record or reset program progress

To associate a quiz attempt with a participant's step or reset their recorded progress, see the [Resolved Steps API](https://dev.wix.com/docs/api-reference/business-management/online-programs/resolved-steps/introduction.md).