Treatment
In this page you can understand the full hierarchical structure of Treatment.
Treatment Typology
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 recordgroup: the group this treatment typology is in (hairdresser,aestethic,spa-massages)venue_typology: reference toVenueTypology, strictly related togroupmandatory_available_from_web: a boolean field (non-nullable) that indicates whether child classes must have theavailable_from_webfield set to true
Treatment Category
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 recordslug: translated slug of current recordseo_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 toTreatmentTypologyseo_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 theavailable_from_webfield set to true
Treatment
!!!
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 recordshort_name: translated short name of current recorddescription: translated description of current recordtreatment_typology: reference toTreatmentTypology(copied fromTreatmentCategory)treatment_category: reference toTreatmentCategoryofficial: see officialenabled: wheter this record is usable or notsearchable: wheter this record is searchable or not [!badge variant="info" text="UALA MP"]venue_treatments_count:VenueTreatment's count, provided by Rails'counter_cachepriority: define order when performing search [!badge variant="info" text="UALA MP"]male_percentage: male customers percentage (0 to 1) based on appointments historymandatory_available_from_web: a boolean field (nullable, if null will read from the parent) that indicates whether child classes must have theavailable_from_webfield set to truepopularity_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 toTreatmenttreatment_category: reference toTreatmentCategory(copied fromTreatment)name: name of current recordshort_name: short name of current recorddescription: description of current recordavailable_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 modalbundle_only: wheter this record is not bookable itself but only through bundlecolor: hex color code to quickly identify it in SaaS' clientmandatory_available_from_web: a boolean field (nullable, if null will read from the parent) that indicates whether child classes must have theavailable_from_webfield set to trueposition: copied fromTreatmentCategorycustomers_count: number of customers included in the service; majority of records will have 1, but an example of record having 2 here isCouple 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 isFour Hands Massage.extra_time_after: extra time required after service execution needed to cleanup (in seconds)always_apply_extra_time_after: whether theextra_time_aftershould 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,femaleorunisex
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 toVenueTreatmentGroupname: name of current record (the helper methodcomputed_namewill concatenateVenueTreatmentGroup#nameandVenueTreatment#name)required_venue_treatment: reference to aVenueTreatmentthat 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 secondsadditional_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 freeposition: copied fromVenueTreatmentGroup, copied fromTreatmentCategory
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 toStaffMembervenue_treatment: reference toVenueTreatmentavailable_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 theavailable_from_webfield set to trueprice: listing price of current record (float number); will useVenueTreatment's if blankduration: listing duration of current record in seconds; will useVenueTreatment's if blank