Scenario:- Automate Customer Statement in Zoho Books using custom function.
Please Find the below attached deluge code and API:-customerID = customer.get("contact_id");
companyName = customer.get("company_name");
organizationID = organization.get("organization_id");
dc = organization.get("data_center_extension");
info organization;
apiUrl = "https://books.zoho" + dc + "/api/v3/";
cDate = zoho.currentdate;
from_date = cDate.subMonth(1);
from_date=from_date.addDay(1);
start_date = from_date.toString("yyyy-MM-dd");
end_date = cDate.toString("yyyy-MM-dd");
url = apiUrl+"contacts/" + customerID + "/statements/email?start_date=" + start_date + "&end_date=" + end_date + "&filter_by=Status.Outstanding&organization_id=" + organizationID;
response = invokeurl
[
url :url
type :POST
connection:"zbooks"
];
info response;