Talemo Docs

Visits

On this page

A visit ties together a client's card (see Contact card), a branch, one or several services, the resources they take and the time. All services of a visit are booked, moved and cancelled together. A visit has one master, and a place and a device are chosen for each service: a manicure on a table and a pedicure on a couch are one visit. Visits live in the Calendar of the web app.

Statuses

  • booked — the visit exists and is waiting;
  • confirmed — a person pressed Confirm on a booked visit;
  • took place — the visit was closed with how it really went;
  • cancelled — with a reason (see Moving and cancelling visits).

Not closed is a mark on a visit and lies outside the four statuses. A booked or confirmed visit whose time has passed carries it until a person marks it as took place or cancels it. The Calendar shows how many visits are not closed, and Visits not closed lists them with Sort out. Until they are sorted, the takings of those days are incomplete.

Booking

A visit is booked through the finder (see Finding times) with talemo_book_visit: the client's card, the services, the start and, if wanted, the resources. The start must be on the booking step, in the future, inside open time and free. A card in Not sorted becomes a client when a visit is booked for it.

If the person is not in the contacts yet, a new client is named instead of a card: a name and a phone number (in the booking window, For whom → New client; in the tools, new_party instead of party_id, exactly one of the two). Talemo looks for the number among the phones and WhatsApp numbers of your contacts. Found — the visit goes to that card under the name it already has, the typed name is not saved, and the person sees whose card it was booked for. Not found — Talemo adds a client card and books it; the history of the contact keeps a line, "Created the card when booking a visit". It needs the right to add contacts and an open Phone field; without the right the answer is "You don't have the right to add clients. Pick one from your contacts or ask the owner for this right." The preview (dry_run) does not look the number up: it always shows a new card with the name typed.

The online admin books, moves and cancels visits too, but only for the client it is talking to in that chat.

Prices

Each service of a visit takes its price and currency from the price list when the visit is booked (see Services, prices and currency). Changing the price list does not change booked visits. Change the price edits the prices of one visit only, and the history of the visit keeps who changed them and when. A role denied the field Price does not see the prices of visits at all.

A visit that took place

Close the visit writes down how it really was: the time, who did it, which services and how much was paid. It goes into the same visit, and the plan stays in its history. Closing a closed visit again corrects it, and every correction is kept. The master's real time is the time of the visit. The place and the device stay as they were booked: a service that was in the booking keeps its booked stretch with the cleanup, and closing does not move it after the real time. A service added at closing gets a share of the real time, split between the services by their lengths in the price list. Its place is the same as the neighbouring service's if it fits; if several places fit, you can choose it in the dialog. A service left out frees its place. In the card of the visit every place and device names the services it is taken for: the booking remembers this link, and closing with a shifted time, closing again and a price correction do not change it, so the table stays with the manicure and the couch with the pedicure. For visits booked before the link was remembered, a service is put on the place of its role that its real time overlaps the longest.

Visit without booking

Visit without booking records a client who came without booking. It is written at once as took place and is always in the past: its end cannot be later than now. The finder and the step are not used, only the real time. If that time lies outside the open time of a resource, Extend the day and record opens it in that resource's day, and the day becomes "changed by hand". The tool is talemo_record_walk_in. No confirmation or reminder is made for it. The client is named as in booking: by a card, or as a new client by name and number. A manicure on a table and a pedicure on a couch are one visit of one master, as in booking; when a service fits several places, name the one that was used for each service.

Who can do it

Finding, viewing, booking, changing, moving, cancelling, recording and deleting are separate rights at branch level; the Administrator role has them. A right can be limited to own: the person then sees and books only visits on the resource they work as.

Tools and refusals

  • A visit is booked only through the finder: talemo_find_times first, then talemo_book_visit with party_id (the card of the client) or new_party (a new client: name and phone with address and, for a number without +, country; exactly one of the two, or request.body_invalid), service_ids, the start of a variant and its resource_ids. A variant goes as it is. Booking checks the start again, so the time can be gone by then: status 409, code slot.overlap; time outside the open time of a resource is visit.outside_schedule with params.resource_id; a start in the past is visit.past; a start off the step is request.body_invalid with params.field start; a resource that does not do the services is status 422, code visit.resource_unfit. A contact from the unsorted category becomes a client. With new_party the answer of a real booking carries party_match: found — a card with that number existed and the visit went to it under its own name, created — the card was added; the preview carries no party_match. Without the right to add contacts the refusal is status 403, code role.forbidden, params.capability party.create: tell the person they have no right to add clients and offer to pick one from the contacts or to ask the owner for the right; a role that closes the Phone field gets role.field_forbidden.
  • Statuses: booked, confirmed, done (it took place) and cancelled. talemo_get_visit shows one visit with the services in order, who is taken when and, if the role may see them, the prices. talemo_list_visits lists, in visits, the visits of a branch for a period, of one contact (party_id), or with unclosed those of the past that are still booked or confirmed and need to be recorded as done or cancelled. talemo_get_calendar shows the grid of one to seven days and counts the unclosed ones in unclosed_count.
  • own_resource_ids is in the answers of talemo_list_visits (next to visits) and talemo_get_calendar only when the person sees just the visits of the resources linked to them: the IDs of those resources. Empty — no resource in the calendar is linked to them yet, so their own visits cannot show; absent — they see all the visits of the branch.
  • Every visit has a source: page when the client booked it herself on the booking page of the branch (see Branch booking page), salon for every other one, whether a person, the online admin or a connected tool booked it. talemo_get_visit, talemo_list_visits and talemo_get_calendar show it.
  • A visit of the past is recorded with talemo_record_walk_in, done at once, with party_id or new_party, service_ids, start, end, optionally resource_ids, service_resources (which place or device did which service, as pairs of service_id and resource_id; the master stays in resource_ids, and a resource that does not fit its service is refused with visit.resource_unfit) and price. It ends no later than now, or it is refused with status 409, code visit.future. A time outside the open time of a resource is refused with visit.outside_schedule unless extend_schedule opens it in the day of the resource: say so to the person first.
  • When the person asks to book at a time that is not open, open the time first (see Schedule of a resource); the finder never offers busy or closed time.
  • The services of a visit take their price from the price list when it is booked, in the currency of the branch.

Tools of this topic

Related topics