Currently most of our customers buy discounted services via another site. They either buy 5 services called "Städabonnemang" or something else, which always is 1 time.
We keep tab on performed services manually in the sheet "Utförda städningar" and our customer register is "Kundregister".
Since our customers buy either 1 or 5 services occasions, we need to keep tab on how many services they have used. All performed services are already automatically sent to our sheets, so what we need is a script that says how many times a customer has had services.
For this we need this in the script:
1. (In Kundregister sheet) The customer must have given a discount code "LD-kod". [login to view URL]
2. (In Kundregister sheet) Check if the customer has bought 5 times (Städabonnemang) or 1 time (anything but Städabonnemang) [login to view URL]
3. By using the name or email address of that row (in Kundregister) we need to check in the performed services sheet (Utförda städningar) how many services this particular customer has had. Each new performed service is a new row in this sheet. In this example the customer has 4 more rows above what we can see and therefore this service is her 5/5. [login to view URL]