Pull Data from Zoho Books to Contacts Module in Zoho CRM

Pull Data from Zoho Books to Contacts Module in Zoho CRM

Hi,

I've integrated my Zoho Books with Zoho CRM. For every contact that I have in my Zoho CRM, I wish to have the following three fields:
1. Total Sales
2. Total Receivable
3. Due Receivables
(based on the Account the Contact belongs to)

How should I proceed to code. Should I code in Zoho Books or in Zoho CRM? And it'll be great if you could help with the code too...

Best,
Sushant