Function #46: Auto generate list of lapsed customers using Custom Button

Function #46: Auto generate list of lapsed customers using Custom Button



Hello everyone, and welcome back to our series!

Customer retention is one of the key factors that impact the long-term success and sustainability of a business. High customer retention rates indicate satisfied customers, quality products or services, and brand loyalty, all of which contribute to overall business success. To maintain a high retention rate, it is necessary to implement various strategies such as collecting regular customer feedback, making improvements based on the feedback, building strong customer relationships, and offering loyalty programs. Additionally, it is equally important to identify and re-engage with lapsed customers as it offers businesses an opportunity to understand their preferences and reignite their interest in the business.

With today's script, you can implement a Custom Button to easily identify the lapsed customers. On clicking the button, it will email the list of customers who have not made any purchases in the last 90 days to specified users. This way, you can stay informed about your customer status and take the necessary measures to win them back.

Prerequisites: 

1. Create a Connection named "zbooks" to successfully execute the function. You can watch the GIF attached below to know how to create the connection.


2. Create a Check Box-type custom field called "Send Lapsed customers list" for the users. The list of lapsed customers will be emailed to those users for whom the checkbox is ticked. 



Custom Button:

Go to Settings -> Preferences -> Customers and Vendors -> Custom Buttons -> Click +New and Choose "New Custom Button". Populate the details as mentioned below:

1. Name - Give a suitable name (e.g., Lapsed customers).
2. Visibility - Select the option that aligns with your preference for granting users access to the custom button.
3. Location - Choose "List Page - Action Menu".

Once done, add the script from this GitHub link -> Save.

Note: In line 19 of the script, replace the value "90" with the required number of days for which the lapsed customers list should be generated.



Here's how to access the button:

Go to Sales -> Customers -> Click the Custom Button (Lapsed Customers) -> Click Proceed. An email with the list of lapsed customers will be sent to the users. 



Try out this function and drop your feedback in the comments section. If you have any specific customizations in mind, don't hesitate to reach out to our support desk at support[at]zohobooks[dot]com. We will be glad to help you. 

See you next week with another useful function!

Regards,
Shireen Farhana
Zoho Books