> 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`).
> - 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: Flow: Set Up a Service
## Article: Set Up a Service
## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/bookings/flow-set-up-a-service.md
## Article Content:
# Flow: Set Up a Service
This article describes how to set up an appointment, class, or course [service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction.md) for Wix Bookings using the APIs. The flow lists the steps in order and which API to call at each step, from locations and staff through services, add-ons, and the booking form. Most steps apply to all [service types](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-types.md). Where steps differ, the differences are called out.
## Before you begin
- The Wix site must [accept payments](https://support.wix.com/en/article/accepting-payments-an-overview) if services require payment.
- The [Wix Pricing Plans app](https://www.wix.com/app-market/web-solution/pricing-plans) must be installed on the site if you plan to configure pricing plans for services.
## Service setup flow
The following diagram shows the full service setup flow.
```mermaid
%%{init: {"theme": "base", "themeVariables": {"primaryColor": "#FFF", "primaryTextColor": "#000", "primaryBorderColor": "#000", "lineColor": "#116AEA", "secondaryColor": "#116AEA", "tertiaryColor": "#fff", "edgeLabelBackground": "#EEEEEE", "labelTextColor": "#000"}}}%%
flowchart TD
A["1. Create or retrieve business locations"]
A --> B["2. Create staff members"]
B -- "Appointment" --> C["3. Limit staff by location"]
B -- "Class / Course" --> I["9. Create booking policies"]
C --> D["4. Assign working hours schedules"]
D --> E["5. Customize staff schedules"]
E --> F["6. Create resource types"]
F --> G["7. Create resources"]
G --> H["8. Customize resource schedules"]
H --> I
I --> J["10. Create service category"]
J --> K["11. Create a custom booking form"]
K --> L["12. Create the service"]
L -- "Class / Course" --> M["13. Create sessions
(assign staff to events)"]
L -- "Appointment" --> N["14. Create service options
and variants"]
M --> N
N --> O["15. Create add-ons"]
O --> P["16. Create add-on groups"]
P --> Q["17. Create pricing plans"]
Q --> R["18. Enable pricing plans for services"]
R --> End1(["Service ready"])
style End1 fill:#116AEA,color:#FFF
```
The following steps describe the complete service setup from locations and staff configuration through service creation, add-ons, and pricing plans.
### Step 1 | Create or retrieve business locations
Services support 3 location types:
- Business [locations](https://dev.wix.com/docs/api-reference/business-management/locations/introduction.md) are the business's venues.
- Custom location is a single fixed address set by the business.
- Customer location is a place the customer provides, for example their home. Applies to appointments only.
Create or retrieve business locations for the service when it's offered at those venues and for limiting which staff or resources are available at which venues. Locations may already exist, for example in the business dashboard, so retrieve existing first and create only what's missing.
**Action:**
1. Call [List Locations](https://dev.wix.com/docs/api-reference/business-management/locations/list-locations.md) to retrieve existing business locations.
2. Call [Create Location](https://dev.wix.com/docs/api-reference/business-management/locations/create-location.md) for any that are missing.
**Result:** You have business locations to attach to services and to limit staff or resource availability. Save the `id` of each location.
Continue to step 2 for all service types.
Learn more about [service locations](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-locations.md).
### Step 2 | Create staff members
Create the staff members who deliver the service. Each staff member has an auto-created [resource](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/introduction.md). This step applies to all service types. The way staff are linked to the service differs by type:
- **For appointments:** Staff `resource.id` values are passed directly in `service.staffMemberIds` when creating the service in step 12.
- **For classes and courses:** Staff are assigned to individual sessions in step 13. The service's `staffMemberIds` field is then automatically derived from staff assigned to recurring sessions with upcoming dates. Staff assigned only to single, non-recurring events are not included.
**Action:** Call [Create Staff Member](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/create-staff-member.md) for each staff member you need.
**Result:** The staff members are created, each with an auto-created resource. Save `id`, `resource.id`, and `resource.eventsSchedule.id` from each response.
For appointments, continue to step 3. For classes and courses, skip to step 9.
Learn more about [the Staff Members and Resources APIs and when to use each](https://dev.wix.com/docs/api-reference/business-solutions/bookings/architecture.md#staff-and-resources).
### Step 3 | Limit staff by location
Create Staff Member doesn't accept location options. To limit a staff member to specific venues, update the location options on their linked resource.
**Action:** For each staff member to limit, call [Update Resource](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/update-resource.md) with that staff member's `resource.id` from step 2 and set `locationOptions.specificLocationOptions.businessLocations.locationId` to the relevant location IDs from step 1.
**Result:** Those staff members are available only at the specified venues.
### Step 4 | Assign working hours schedules
Assign a dedicated working hours schedule to any staff member whose hours differ from the business schedule.
**Action:** For each such staff member, call [Assign Working Hours Schedule](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/assign-working-hours-schedule.md), specifying the staff member’s `id` and the `resource.eventsSchedule.id` from step 2 as `scheduleId`.
**Result:** The staff member’s availability is now driven by their own schedule instead of the business schedule.
Learn more about [business schedules and working hours](https://dev.wix.com/docs/api-reference/business-management/calendar/about-business-schedules.md).
### Step 5 | Customize staff schedules
Add extra working hours or block time on staff schedules.
**Action:**
1. To change an existing event: Call [Update Event](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/update-event.md).
2. To add working hours or block time: Call [Create Event](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/create-event.md) with `event.scheduleId` set to `resource.eventsSchedule.id` from step 2.
3. To remove a block or working hours: Call [Cancel Event](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/cancel-event.md).
For which event types to use for working hours and blocks, and how to retrieve event IDs with [Query Events](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/query-events.md) before updating or canceling, see the article about [business schedules and working hours](https://dev.wix.com/docs/api-reference/business-management/calendar/about-business-schedules.md).
**Result:** Staff availability reflects the updated working hours and blocked periods.
### Step 6 | Create resource types
Define the types of resources the service uses, such as rooms or equipment.
**Action:** Call [Create Resource Type](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resource-types-v2/create-resource-type.md) for each resource type you need.
**Result:** The resource types are created. Save the `id` of each resource type.
### Step 7 | Create resources
Create the actual resources linked to the resource types from step 6, such as an individual room or piece of equipment.
**Action:** Call [Create Resource](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/create-resource.md), using the relevant resource type ID from step 6.
**Result:** The resources are created. Save the `id` and `workingHoursSchedules.value.scheduleId` of each resource.
### Step 8 | Customize resource schedules
Block time for resources when they're unavailable. For example, block time for maintenance or when a resource is booked elsewhere. Resources follow the business working hours, so you can only block time for them, not add custom working hours.
Appointment service availability depends on the service's staff and resources. When a service has no required resource type, availability is driven by staff schedules and slots are bookable when at least 1 staff member is working, even outside default business hours. When a service has a required resource type, a slot is available only when both a staff member and a resource are available.
**Action:**
1. To block time: Call [Create Event](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/create-event.md) with `event.scheduleId` set to `workingHoursSchedules.value.scheduleId` from step 7.
2. To remove a block: Call [Cancel Event](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/cancel-event.md).
For which event types to use for blocks and how to retrieve event IDs with [Query Events](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/query-events.md) before canceling, see the article about [business schedules and working hours](https://dev.wix.com/docs/api-reference/business-management/calendar/about-business-schedules.md).
**Result:** Resource availability reflects the blocked periods.
### Step 9 | Create booking policies
Define when customers can book and set cancellation and rescheduling rules. Each service has a single booking policy. Some policy fields apply only to specific service types:
- **For appointments:** Set `reschedulePolicy` and `cancellationPolicy` to control whether and when customers can reschedule or cancel.
- **For classes:** Set `waitlistPolicy` to allow customers to join a waiting list when a class is fully booked.
- **For courses:** Set `bookAfterStart` to allow customers to sign up after the first session has begun.
**Action:** Call [Create Booking Policy](https://dev.wix.com/docs/api-reference/business-solutions/bookings/policies/booking-policies/create-booking-policy.md) for each booking policy you need.
**Result:** The booking policies are created. Save the `id` of each policy.
### Step 10 | Create service category
Categories control the order in which services appear on the site and in the dashboard. A service must be assigned to exactly 1 category to be visible on the live site. Wix Bookings creates a default category named `Our Services` on install, so retrieve existing categories first, then create a category if needed.
**Action:**
1. Call [Query Categories](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/categories-v2/query-categories.md) to retrieve existing categories, including the default.
2. Call [Update Category](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/categories-v2/update-category.md), for example to rename the default category.
3. Call [Create Category](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/categories-v2/create-category.md) if you need an additional category.
**Result:** The categories are ready. Save the `id` of each category.
### Step 11 | Create a custom booking form
Services use a [booking form](https://support.wix.com/en/article/wix-bookings-creating-and-setting-up-your-booking-forms) to collect customer information. To use the default booking form, skip this step and don't set `service.form.id` in step 12.
**Action:**
1. Call [Clone Form](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/clone-form.md) with `formId` set to `00000000-0000-0000-0000-000000000000`. The cloned form inherits the `wix.bookings.v2.bookings` namespace from the source form. Save the returned form ID.
2. Optionally call [Update Form](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/update-form.md) to add, remove, or require fields, and set `fields.validation.required` as needed.
**Result:** You now have a custom booking form.
Learn more about [how Wix Bookings integrates with Wix Forms](https://dev.wix.com/docs/api-reference/business-solutions/bookings/wix-forms-integration.md).
### Step 12 | Create the service
Create the service and attach staff, resources, a booking policy, a category, locations, and the booking form.
**Action:** Call [Create Service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/create-service.md). Set `type` to `APPOINTMENT`, `CLASS`, or `COURSE`. See the method description for required fields and type-specific field guidance.
- **For all types:** Pass the IDs from the shared steps:
- Policy ID from step 9 in `service.bookingPolicy.id`.
- When using a custom booking form, booking form ID from step 11 in `service.form.id`.
- Category ID from step 10 in `service.category.id`. Services aren't automatically assigned to a category, so this is required for the service to be visible on the live site.
- Location IDs from step 1 for business locations.
- **For appointments:** Specify the IDs from the appointments-only steps:
- Staff `resource.id` values from step 2 in `service.staffMemberIds`. At least 1 is required.
- Resource type IDs from step 6 in `service.serviceResources.resourceType.id`.
- **For classes and courses:** Don't set `staffMemberIds`. This field is read-only for classes and courses and is automatically populated based on staff assigned to recurring sessions with upcoming dates. Staff assigned only to single, non-recurring events are not reflected in this field. See step 13.
- **Pricing plans:** Set `payment.options.pricingPlan` to `true` to enable pricing plan payments for this service. Services with `requireManualApproval` set to `true` can't accept pricing plan payments.
**Result:** The service is created. Save `id` and `schedule.id` from the response.
Learn more about [service types and their unique settings](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-types.md).
For classes and courses, continue to step 13. For appointments, skip to step 14.
### Step 13 | Create sessions (classes and courses only)
For classes and courses, create the individual sessions on the service's calendar schedule. Appointments skip this step because their time slots are dynamically generated from staff availability.
**Action:** Call [Create Event](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/create-event.md) for each session, with `event.scheduleId` set to the service's `schedule.id` from step 12. Assign the staff members who lead the session by including their `resource.id` values from step 2 in the event's resources.
- **For classes:** Create a recurring event defining the recurrence pattern.
- **For courses:** Create a recurring event with a defined end date for the course series.
For sessions with irregular timing, create individual events instead. Learn more about [recurring events](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/recurring-events.md).
**Result:** The sessions appear on the booking calendar and the service's `staffMemberIds` field is automatically updated with staff assigned to recurring sessions with upcoming dates. Once all of a staff member's upcoming recurring sessions have ended, their ID is removed from `staffMemberIds`. Staff assigned only to single, non-recurring events are not reflected in this field. Customers can now discover and book sessions through the [single-service booking flow](https://dev.wix.com/docs/api-reference/business-solutions/bookings/flow-single-service-booking.md).
> **Note:** Steps 14 through 18 are optional. Complete only those that apply to your service.
### Step 14 | Create service options and variants
Add options and variants to the service if needed. For appointments, you can offer variants based on staff member, session duration, or a custom parameter such as customer age group. For classes and courses, only custom parameter variants are supported.
**Action:** Call [Create Service Options And Variants](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/service-options-and-variants/create-service-options-and-variants.md) for the service if it needs options or variants. Specify the service ID from step 12.
**Result:** The service now exposes the configured options and variants to customers.
### Step 15 | Create add-ons
Create add-ons that customers can select when booking. For appointments, add-ons can be duration-based to extend session time or quantity-based for purchasable extras such as equipment rental. For classes and courses, only quantity-based add-ons are supported.
**Action:** Call [Create Add-On](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/create-add-on.md) for each add-on you need.
**Result:** The add-ons are created. Save the `id` of each add-on.
### Step 16 | Create add-on groups
Attach add-ons to the service by grouping them and linking the group to the service.
**Action:** Call [Create Add-On Group](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/create-add-on-group.md) for each add-on group you need, using add-on IDs from step 15 and the service ID from step 12.
**Result:** The service offers the configured add-ons during booking.
### Step 17 | Create pricing plans
Create pricing plans for the service, such as memberships or packages.
**Action:** Call [Create Plan](https://dev.wix.com/docs/api-reference/business-solutions/pricing-plans/plans-v3/create-plan.md) for each pricing plan you need.
**Result:** The pricing plans are created. Save the `id` of each plan.
Learn more about [pricing plans](https://dev.wix.com/docs/api-reference/business-solutions/pricing-plans/introduction.md).
### Step 18 | Enable pricing plans for services
Attach the pricing plans from step 17 to the services that should accept them.
**Action:** Call [Enable Pricing Plans For Service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/enable-pricing-plans-for-service.md) with the service ID from step 12 and the plan IDs from step 17.
**Result:** Customers can use the enabled plans when booking the service.
## Results
After completing this flow, the business offers a fully configured service that customers can discover and book using the [standard booking flow](https://dev.wix.com/docs/api-reference/business-solutions/bookings/flow-single-service-booking.md).
## See also
- [Flow: Single-Service Booking](https://dev.wix.com/docs/api-reference/business-solutions/bookings/flow-single-service-booking.md)
- [About Wix Bookings architecture](https://dev.wix.com/docs/api-reference/business-solutions/bookings/architecture.md)
- [About service types](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-types.md)
- [About business schedules](https://dev.wix.com/docs/api-reference/business-management/calendar/about-business-schedules.md)
- [How Wix Bookings integrates with Wix Forms](https://dev.wix.com/docs/api-reference/business-solutions/bookings/wix-forms-integration.md)