Create Appointment Service from Prompt

Download skillThe skill is a reference md and part of wix-manage skill. You can use the following command to add the full wix-manage skill to your project:
Copy

When to Use

  • User wants to create an appointment-based service: "set up consultations", "create a 1-on-1 session", "add a personal training appointment", "create a meeting service"
  • The service type is APPOINTMENT — customer picks an available time slot during staff working hours
  • For general service creation where the type is ambiguous, see Create Booking Service from Prompt

Prerequisites


Step 1: Gather Business Context

Run these queries to collect site data for informed defaults.

1a. Query Staff Members (CRITICAL for Appointments)

Copy

Save each staff member's resourceId (not id). Note which one has default: true.

APPOINTMENT services REQUIRE at least one staff member. If no staff members exist, create one first using Bookings Staff Setup.

1b. Query Service Categories

Copy

1c. Get Site Currency

Copy

Extract properties.paymentCurrency. Fall back to USD if unavailable.

1d. Query Existing Services (Duplicate Check)

Copy

Warn the user if a service with a similar name already exists.


Step 2: Apply Appointment Defaults

For any fields the user did not explicitly specify:

FieldDefaultNotes
Duration60 minutesSet via schedule.availabilityConstraints.sessionDurations
Capacity1Appointments are typically 1-on-1
StaffAuto-assignUse default: true staff, or first available
Online bookingEnabledonlineBooking.enabled: true

Pricing (if not specified)

  • Use the site's currency from Step 1c
  • If user specifies a price → rateType: "FIXED"
  • If user says "free" → rateType: "NO_FEE", options.inPerson: true, options.online: false
  • If no price mentioned → infer from context (consultations ~$50-100, sessions ~$30-60) or default to free

Staff Assignment

  • 1 staff member → auto-assign using their resourceId
  • Multiple staff members → use the one with default: true, or the first one
  • No staff members → create one first using Bookings Staff Setup, then proceed

Category

  • If categories exist → assign the most relevant one
  • If no categories exist → create a "General" category:
Copy

Service Name & Description

  • Use the user's wording for the service name
  • Generate a brief, professional description (1-2 sentences)

Step 3: Create the Appointment Service

Paid appointment:

Copy

Free appointment:

Copy

APPOINTMENT-Specific Reminders

  • staffMemberIds is required — uses resourceId values, not staff member id
  • schedule.availabilityConstraints.sessionDurations sets the appointment length
  • Availability is based on the assigned staff member's working hours schedule

Save the serviceId from the response: results[0].item.service.id


Step 4: Navigate to Service Form

Use the RUN_IN_BROWSER tool to navigate the user to the service form for final review:

Copy

This executes in the user's browser and redirects them to the service editing page.


Step 5: Summary Message

Provide a summary including:

  1. What was created — service name, price, duration, assigned staff member
  2. Assumptions made — list defaults used (e.g., "I set the duration to 60 minutes since you didn't specify")
  3. Next steps — "Click Save to finalize, then set up your availability"
  4. Offer to adjust — "Want me to change the price, duration, or staff assignment?"

Example:

I created "Strategy Consultation":

  • Type: Appointment (1-on-1)
  • Price: $75 per session
  • Duration: 60 minutes
  • Staff: Assigned to Sarah Johnson
  • Category: Consulting

I assumed a 60-minute duration since you didn't specify. You can review and adjust the details in the service form.


Error Handling

ErrorCauseAction
428 "App not installed"Bookings not installedInstall using Install Wix Apps
400 "staffMemberIds required"No staff assignedQuery staff; if none exist, create one via Bookings Staff Setup
400 "INVALID_PAYMENT_OPTIONS"Payment misconfiguredFree: inPerson: true, online: false. Paid: price > 0
403Permission deniedInform user they lack permission

Payment Validation Quick Reference

rateTypeoptions.onlineoptions.inPersonValid?
FIXEDtruefalse
FIXEDfalsetrue
FIXEDtruetrue
NO_FEEfalsetrue
NO_FEEtruefalse
Anyfalsefalse

What This Skill Does NOT Cover


API Documentation Reference

Did this help?