About Service Slugs

In the context of Wix Bookings, a slug is a user-friendly and unique identifier assigned to each service. It is designed to be easily readable and consists only of lowercase letters, digits, and hyphens.

Default slugs

When a service is created, Wix Bookings automatically calculates its mainSlug based on the service name. Any non-alphanumeric character from the service name is replaced with a hyphen, then consecutive hyphens are removed. If the resulting slug would be empty or a single hyphen, it's set to untitled instead.

Sample default slugs

The following table shows some sample default slugs.

Service nameDefault slug
My Service! Name 2023my-service-name-2023
@@@untitled
A simple_testa-simple-test

Service name changes

When a service's name changes, Wix Bookings automatically updates mainSlug, unless the service has a custom slug. All past slugs and the current slug are stored in service.supportedSlugs.

Custom slugs

You can customize a service's slug, for example for SEO purposes. Like default slugs, custom slugs may include only lowercase letters, digits, and hyphens.

Set a custom slug

You can call Set Custom Slug (SDK | REST) to customize a service's slug. Once you've set a custom slug, Wix Bookings doesn't automatically update mainSlug whenever the service name changes. Instead, it adds a default slug based on the new service name to the service.supportedSlugs array.

Validate a custom slug

You can check if a custom slug contains only supported characters, and isn't associated with a different service by calling Validate Slug (SDK | REST).

Did this help?