New customers. How would you approach this?

Hi. I’m getting stuck at the logical part of the following:

I have a beauty salon where I have employees. In my app I would like to get a list of new customers for each employee in each month.

When I make a reservation I have customers phone nr which I use to identify a specific customer sincer there is no signup option on our site. Based on the phone nr. I can get: app start_date, end_date, employee, nr of appointments and so on.

Where I get stuck is here: Customer A makes an appointment in January for Employee A. Its their first interaction so Customer A its a new customer. In february Customer A makes another appointment with Employee A, now he is not a new customer anymore.

The List should show the following:
New customers for Employee A:
January - 1
February - 0

How could I achieve this?
Any help is much appreciated

Thanks a lot

Is there a reason that you’re not creating a db table for these customers? It seems like it would be logical and helpful going forward for other things too, and to build a customer db anyway… if you had that you’d be able to run a “if search for customer count = 0, then create new customer” type flow, and you could otherwise just add this second visit in February to that customer’s record.

1 Like

Hi there, @cm1… if you don’t go down the path that Bernard suggested, I think the easiest way to go would be to create a new field called something like new customer (with a field type of yes/no) on the Reservation data type. Then, when a reservation is made, have a workflow step (or use a backend workflow for performance purposes) that sets the new customer field to yes only when a count of reservations with the same phone number is 0.

Anyway, I’m sure you could do it without adding the new field, but as a longtime colleague of mine likes to say, I’m not sure the juice is worth the squeeze.

Hope this helps.


1 Like

You can just use the ‘created date’ on a customer and do searches grouped by month


I don’t think it’s quite that easy to determine if a customer is new in a given month, @equibodyapp, because there are no customers… there are only reservations with phone numbers. What you proposed was my first thought, as well, but it seemed a lot more complicated (again, given the constraint that customers are not things) than just adding a new field. If I’m missing something simple and you can clue me in, though, I’d appreciate it.

you are right. If adding a customer will make things easy, might do that. I am waiting a little more to see if anybody could provide some other options

1 Like

what if, the customer that had an appointment with employee A decides to try employee B?

If you want the customer to count as a new customer for employee B in this case, I believe the new field I suggested could still work. You would just set the new customer field to yes only when a count of reservations with the same phone number and the same employee (in this case, employee B) is 0.

Sorry - I assumed they were creating a customer data type (just not making them a ‘user’), @cm1

You want to be able to track customer data (so match them to reservations and other activity) so really requires them to have their own data type - I get that you don’t want them to sign up, but for future growth you can create the customer as a user and they never know about it - then later on build out features like online bookings etc and because they are already a user you don’t have to stuff around with your database. Always best to think 10 steps ahead and build the foundations right :slight_smile:


I will try to implement that. Thank you👍

@cm1 , here is a quick example of grouping by employee if you choose to go down the customer data type route. It assumes that if a customer returns and is seen by a different employee to their first visit, the customer is NOT regarded as new. Therefore, it relies simply on having a ‘first employee’ field on the customer data type and the date the customer first visited (or was created).

In case it would be helpful, @cm1, here are some screenshots of a working example I made.

Assuming you have a form for creating reservations and assuming the form has inputs for the phone number and employee, here is the workflow step that would set a newly-created reservation’s new customer field from no to yes.

As I mentioned, you might consider doing that step in a backend workflow if performance is an issue (although, it’s a pretty simple search, so the backend workflow might be overkill).

Then, you could have a repeating group to show the new customer count per employee for the current month, and the search in the repeating group’s data source would look like this.

The repeating group’s data source would be grouped by employee, and it would also have a count aggregation.

Finally, add two text elements in the repeating group with the following expressions, and you should be good to go.


Hope this helps.


Exactly what I did. All works perfect now. Thank you Mike

1 Like

Now everything works perfect - at least for future appointments. I need to find a way to modify the old appointments based on this:

new_customer = a person that has booked ONE appointment with ONE employee. If the same person books with another employee, he is new customer to that employee (i need to do this in order to calculate the retention rate / employee)

I have about 18.000 records in my database. What would be the smartest way to detect these appointments and change new_customer=yes?

Basically if we detect appointments/employee(with the same phone nr) ≥ 1 -----> change the first:item new_customer=yes

Thanks again

This topic was automatically closed after 70 days. New replies are no longer allowed.