How can I show an Account's total lifetime purchase value?
Hello,
I know I am missing something. I want to visualize how much each account has paid us over the time they have been customers (lifetime value). This must have been done before but I can't find a community thread on it.
We do not bill with Zoho Finance/Books, we use Square. So I will have to import transactions or use a Flow to add each transaction as a paid invoice. I think I can do that, but how can I access that information in the Accounts Module?
I had planned to write a Flow to trigger a custom function any time a transaction is posted, using the customer ID number.
I put dummy invoices in Books to test, but I can't get the info to return from the custom function. I've scripted with deluge in Creator, but not using APIs, and I don't understand the API syntax. This what I have:
- float Return_Customer_Lifetime_Value(int Ident)
- {
- //Ident is the customer ID
- transactions = zoho.books.getRecords("customerpayment", <some OrgID number> , Ident, "zoho_books_connection");
- total = 0;
- for each rec in transactions
- {
- total = total + "amount"; //how do I refer to the amount properly using an API?
- }
- return total;
- }
Access your files securely from anywhere
Zoho Developer Community
Deliver unforgettable customer experiences
Deliver unforgettable customer experiences
New to Zoho Marketing Plus?
Everything you need to run your marketing
New to Zoho Marketing Plus?
Everything you need to run your marketing
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho TeamInbox Resources
Zoho DataPrep Resources
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Qntrl Resources
Zoho Creator Resources
Zoho Campaigns Resources
Zoho CRM Resources
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.