Skip to main content

Treatment

In this page you can understand the full hierarchical structure of Treatment.

Treatment Typology​

Active Admin

A very short (< 20) list of typologies at higher level. Examples of these can be Haircut, Makeup, Body Treatment.

Available fields:

  • name: translated name of current record
  • group: the group this treatment typology is in (hairdresser, aestethic, spa-massages)
  • venue_typology: reference to VenueTypology, strictly related to group
  • mandatory_available_from_web: a boolean field (non-nullable) that indicates whether child classes must have the available_from_web field set to true

Treatment Category​

Active Admin

Also known as Generic Treatment in the past, these are the second level of the structure and expands it. For example, the Haircut typology contains Men's Haircut, Children & Teen's Haircut and Beard.

Available fields:

  • name: translated name of current record
  • slug: translated slug of current record
  • seo_description: translated description of current record used by SEO [!badge variant="info" text="UALA MP"]
  • meta_title: translated title of current record used by meta tags [!badge variant="info" text="UALA MP"]
  • meta_description: translated description of current record used by meta tags [!badge variant="info" text="UALA MP"]
  • position: this is used to properly order treatments when searching for availabilities; requested treatments are order based on this field in ASC order.
  • treatment_typology: reference to TreatmentTypology
  • seo_indexed: whether the current record should be indexed by SEO [!badge variant="info" text="UALA MP"]
  • seo_indexed_home: whether the current record should be indexed by SEO in website homepage [!badge variant="info" text="UALA MP"]
  • mandatory_available_from_web: a boolean field (nullable, if null will read from the parent) that indicates whether child classes must have the available_from_web field set to true

Treatment​

Active Admin

!!! each TreatmentCategory has a corresponding Treatment with the same name (in all locales). !!!

Also known as Labels in the past, this is the last level of the structure outside the scope of the venue and expands categories a lot. The Men's Haircut contains Men's Haircut, Men's Skin Fade, Straight Razor Shaving, Scissor Haircut and a lot more.

Available fields:

  • name: translated name of current record
  • short_name: translated short name of current record
  • description: translated description of current record
  • treatment_typology: reference to TreatmentTypology (copied from TreatmentCategory)
  • treatment_category: reference to TreatmentCategory
  • official: see official
  • enabled: wheter this record is usable or not
  • searchable: wheter this record is searchable or not [!badge variant="info" text="UALA MP"]
  • venue_treatments_count: VenueTreatment's count, provided by Rails' counter_cache
  • priority: define order when performing search [!badge variant="info" text="UALA MP"]
  • male_percentage: male customers percentage (0 to 1) based on appointments history
  • mandatory_available_from_web: a boolean field (nullable, if null will read from the parent) that indicates whether child classes must have the available_from_web field set to true
  • popularity_rank: computed rank based on defined rules and used when performing search [!badge variant="info" text="UALA MP"]
  • lifecycle_typology: see lifecycle typology

Official treatment​

A official boolean field has been introduced to the Treatment model to better restrict this level size, that is now under 1000 records. These are now company-known as Treatment, so when referring to them, by default we consider the official list. SaaS' users use this list when adding a new service to their menu, while non-official list is kept for historical reason and for better linking treatments by CX team.

Lifecycle typology​

A treatment can have two different lifecycle typology: appointment or entrance-ticket. While the first one ledas to the classic behaviour of a treatment for the whole booking flow, the entrance-ticket adds few logics to it. It's mainly used for SPA services where the customer checks-in and stay in the venue for multiple hours.

Venue Treatment Group​

This is the first non-global level: in fact, this is the link between Treatment and Venue. As the name suggests, this contains a set of VenueTreatment and defines common properties for them.
A VenueTreatmentGroup must be linked to a Treatment that will be its reference as global Treatment, but can have a custom name and the link between them is made possible by a OpenSearch scan over official treatments. If needed, our CX team can edit this link to find a better candidate.
More than one VenueTreatmentGroup can be linked to the same Treatment in a specific Venue, thus the tuple venue_id - treatment_id is not unique.

!!!info The suffix Group is due to the already existence of VenueTreatment at the time of VenueTreatmentGroup introduction. Renaming everything would have been painful and hugely time consuming. !!!

Available fields:

  • treatment: reference to Treatment
  • treatment_category: reference to TreatmentCategory (copied from Treatment)
  • name: name of current record
  • short_name: short name of current record
  • description: description of current record
  • available_from_web: wheter this record is available and visible in marketplace(s)
  • favorite: wheter this record is widely used and displayed as shortcut in SaaS' appointment modal
  • bundle_only: wheter this record is not bookable itself but only through bundle
  • color: hex color code to quickly identify it in SaaS' client
  • mandatory_available_from_web: a boolean field (nullable, if null will read from the parent) that indicates whether child classes must have the available_from_web field set to true
  • position: copied from TreatmentCategory
  • customers_count: number of customers included in the service; majority of records will have 1, but an example of record having 2 here is Couple Massage.
  • required_staff_members_count: number of staff required to perform this service; majority of records will have 1, but an example of record having 2 here is Four Hands Massage.
  • extra_time_after: extra time required after service execution needed to cleanup (in seconds)
  • always_apply_extra_time_after: whether the extra_time_after should be always applied also if the following service is performed by the same staff in the same workstation.
  • gender_specific_male: boolean field to indicate who's the target of this service: male, female or unisex

Venue Treatment​

Direct child of VenueTreatmentGroup, these define options/variants of the parent, so Men's Haircut have Short Hair, Medium Hair and Long Hair as children.
The VenueTreatment entity is the first one considered bookable because it defines a duration and a price.

NOTE: when the price changes, all the linked StaffMemberTreatment with a custom price lower than the new one will be reset to a blank price. (ref)

Available fields:

  • venue_treatment_group: reference to VenueTreatmentGroup
  • name: name of current record (the helper method computed_name will concatenate VenueTreatmentGroup#name and VenueTreatment#name)
  • required_venue_treatment: reference to a VenueTreatment that must be performed along current record when booking from marketplace(s)
  • price: listing price of current record (float number)
  • duration: listing duration of current record in seconds
  • additional_duration: listing additional duration of current record in seconds; this is used when the service need a "leaving time" where the customer needs to wait and the staff is free
  • position: copied from VenueTreatmentGroup, copied from TreatmentCategory

Staff Member Treatment​

This model creates the link between a StaffMember and VenueTreatment, so it defines the availability for the StaffMember to perform the VenueTreatment. It can also has a custom price and a custom duration. The StaffMemberTreatment entity is considered bookable because it defines a duration and a price.

Available fields:

  • staff_member: reference to StaffMember
  • venue_treatment: reference to VenueTreatment
  • available_from_web: wheter this record is available and visible in marketplace(s)
  • mandatory_available_from_web: a boolean field (nullable, if null will read from the parent) that indicates whether child classes must have the available_from_web field set to true
  • price: listing price of current record (float number); will use VenueTreatment's if blank
  • duration: listing duration of current record in seconds; will use VenueTreatment's if blank