☰ Menu · Booking and CRM
Guides

Booking and CRM

Salons, clinics, studios and other businesses that work by appointment: reward visits when the client actually came.

In a booking system the moment that matters is an appointment marked as attended, together with what the client paid. Map it to the API like this:

In the booking systemCall
New client with a phonePOST /v1/members (returns the existing member if the phone is known)
Appointment attended and paidPOST /v1/transactions with the appointment id as external_id and the paid amount
Attended, no payment dataPOST /v1/visits with the appointment id as external_id (stamp and visit programs)
Payment cancelled or refundedPOST /v1/transactions/{external_id}/void
Client asks to pay with cashbackRead cashback.balance, then send the check with redeem_amount

Use the appointment id (not the client id) as external_id: the same appointment marked attended twice then earns once.

Altegio

Venues on Altegio do not need any code: install the Loyaltyfy app from the Altegio marketplace and connect the locations. What the connector does is a good model for your own integration:

  • It listens to Altegio record webhooks. A record with attendance confirmed is applied as a check with the record id as the idempotency key.
  • If the client has no Loyaltyfy card yet, the visit waits. When the client adds the card (with the same phone), waiting visits are applied, so nothing is lost.
  • Every 15 minutes it also polls recent records, because webhooks can be lost; duplicates are ignored by the record id.
  • When the cashier redeems cashback in Loyaltyfy, the amount can be written back to the open Altegio visit as a loyalty payment, if the network has a loyalty card type set up.

Other systems

If your booking or CRM system can send webhooks, the simplest integration is a small service that receives them and calls the endpoints in the table above. If it cannot, poll its API for attended appointments every few minutes and send them with their ids; repeats are harmless. Write to api@loyaltyfy.io if you want us to build a ready-made connector for your platform.

Questions about an integration: api@loyaltyfy.io. We answer within one business day.