Bookings to CRM Customer Record Sync
When a Microsoft Bookings appointment is created, the flow matches or creates the customer in Dataverse, links the appointment as an activity, captures the service and staff, and tags new vs returning customers. Builds a complete customer history from Bookings without manual data entry.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
When a Microsoft Bookings appointment is created, this flow builds and maintains a customer record in Dataverse: it matches or creates the customer, tags them New vs Returning, increments their visit count, and logs the appointment as a visit activity capturing service, staff, and times. An Outlook notification summarizes each sync. Built API-first as a Dataverse workflow record; ships Off.
Why it matters: Bookings holds rich interaction data that's lost if it never reaches the CRM. Syncing it automatically builds a complete, governed customer history for marketing and service - with zero manual data entry.
Status: Built. Solution: FlowLibs - Bookings to CRM Customer Record Sync.
Use Case
A services team (salons, clinics, advisory, repair, etc.) takes bookings through Microsoft Bookings. They want every appointment reflected on the customer's CRM record automatically, so sales and operations always see the full visit history and can tell first-timers from regulars.
Flow Architecture
When an Appointment Is Created
Bookings CreateAppointment (webhook / OpenApiConnectionNotification)Fires on each new booking; trigger body carries all customer/service/staff/time fields.
Initialize Correlation Id
Initialize Variable (string)@guid() - traces this booking across the customer + visit records.
Initialize Customer Email
Initialize Variable (string)Captures CustomerEmail - the match key.
Initialize Customer Type
Initialize Variable (string)Holds New/Returning; defaults to New.
List Matching Customers
Dataverse ListRecordsLooks up the customer table by email ($filter, $top 1).
Check If Customer Exists
Condition (If)True: tag Returning, increment Total Visits, refresh Last Service. False: tag New, create the customer record (visits = 1).
Create Visit Activity
Dataverse CreateRecordLogs the appointment to the visit table, linked to the customer by email.
Send Sync Notification
Office 365 Outlook SendEmailV2Emails operations a summary incl. New/Returning status.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_BookingsBusinessId | String | <configure> | The Bookings business/calendar SMTP address the trigger subscribes to (SMTPAddress). |
| flowlibs_CustomerTable | String | flowlibs_bookingcustomers | Entity-set name used by ListRecords lookup. |
| flowlibs_VisitActivityTable | String | flowlibs_bookingvisits | Entity-set name of the visit table (documentation; CreateRecord uses the hardcoded set name). |
| flowlibs_NotificationEmail | String | you@yourcompany.com | Recipient of the sync notification email. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Microsoft Bookings | shared_microsoftbookings | CreateAppointment |
| Microsoft Dataverse | shared_commondataserviceforapps | ListRecords CreateRecord UpdateRecord |
| Office 365 Outlook | shared_office365 | SendEmailV2 |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Marketing sync
- After Create/Update Customer, add the customer to a Mailchimp/Dataverse marketing segment based on Customer Type.
- Lifetime value
- Add a money column on Booking Customer and accumulate each visit's value.
- True relationship
- Replace the email-key link with a Dataverse N:1 lookup from Booking Visit to Booking Customer.
- Returning logic by visit history
- Instead of (or in addition to) the customer row, count prior rows in the visit table for that email to classify Returning.
- Service/staff preferences
- Track most-frequent service and staff per customer for personalization.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Match key (email)
The email used to match an existing customer.
EXPR.02Lookup filter
OData filter for the customer lookup.
EXPR.03Match test
True when a matching customer was found.
EXPR.04Increment visits
Bumps the returning customer's visit count.
EXPR.05Existing record id
Row id of the matched customer for the update.
EXPR.06Staff (array -> text)
Flattens the staff array for storage.
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.