Zoho creator + zoho books integration

Zoho creator + zoho books integration

So been given this recent task, create a form for new customers and integrate it with zoho books.

I know almost nothing about Deluge or zoho platform.

anyway this is what i have achieved so far:

1-Create the form ✅ 2-On form submission->create new contact on zoho books ❌


I managed to create the new contact on zoho books but i am not able to push the last 3 fields to zoho books("Legal Document", "Accounts Document" and "Tax Document").

This last 3 fields have a file attached.

Heres the script:

cpList = List();
firstName = input.Contact_Name.first_name;
lastName = input.Contact_Name.last_name;
contactName = firstName + " " + lastName;
contactMap = Map();
contactMap.put("contact_name",contactName);
contactMap.put("company_name",input.Company_Name);
contactMap.put("website",input.Website);
contactMap.put("twitter",input.Twitter);
/////////
//contactMap.put("skype_name",input.Skype_Name);
billingMap = Map();
billingMap.put("zip",input.Billing_Address.postal_Code);
billingMap.put("country",input.Billing_Address.country);
billingMap.put("address",input.Billing_Address.address_line_1);
billingMap.put("street2",input.Billing_Address.address_line_2);
billingMap.put("city",input.Billing_Address.district_city);
billingMap.put("state",input.Billing_Address.state_province);
contactP = Map();
contactP.put("salutation",input.Contact_Name.prefix);
contactP.put("first_name",firstName);
contactP.put("last_name",lastName);
contactP.put("designation",input.Designation);
contactP.put("department",input.Department);
contactP.put("contact_salutation","Mr/Mrs");
contactP.put("mobile",input.Mobile_Phone);
contactP.put("phone",input.Phone_Number);
contactP.put("email",input.Email);
//Skype does not work here or on the contactMap
//contactP.put("skype_name",input.Skype_Name);
contactP.put("is_primary_contact",true);
contactMap.put("billing_address",billingMap);
// Custom Fields
cpList.add(contactP);
cFields = List();
cFields.add({"index":"1","value":input.Registration_Number});
cFields.add({"index":"2","value":input.Industry});
cFields.add({"index":"3","value":input.VAT});
//next doesn’t work
//cFields.add({"index":"4","value":input.Legal_Form});
cFields.add({"index":"5","value":input.Tax_Dossier_No});
cFields.add({"index":"6","value":input.Legal_Rep_SSN_No});
cFields.add({"index":"7","value":input.Balance_Sheet.toDecimal()});
cFields.add({"index":"8","value":input.Annual_Turnover.toDecimal()});

These are the fields :

//cFields.add({"index":"9","value":input.Legal_Document});
//cFields.add({"index":"10","value":input.Accounts_Document});
//cFields.add({"index":"11","value":input.Tax_Document});

contactMap.put("custom_fields",cFields);
contactMap.put("contact_persons",cpList);
params = Map();
params.put("JSONString",contactMap);
createContact = invokeurl
[
    url :"https://books.zoho.eu/api/v3/contacts?organization_id=..."
    type :POST
    parameters:params
    connection:"..."
];
Somehow, if i dont use the last 3 fields i can add a new contact on zoho books, but if i add the last 3 fields the call is not made, no new contact on zoho books My issu, how can i upload the files to zoho books? Thank You
    • Sticky Posts

    • Merge and Store v1 API depreciation

      Hi Zoho Writer users, The Merge and Store v1 API allows you to store the merged document in Zoho WorkDrive. The response of this API will be returned with the document's ID only after the merge is complete. In Deluge, the maximum timeout for operation
    • Zoho Creator Developer's Conference 2017 !!!

      We welcome all our Creator Developers! You're invited to join us for our annual Zoholics Developers conference August 29th–31st! This is your chance to get training and guidance on Zoho Creator from our most knowledgeable custom app builders.       Zoholics Developers is a three-day event where you'll participate in interactive workshops to hone your app-building skills, get questions answered by Creator experts with personal one-on-one sessions, and connect with other Creator developers from around
    • Share your success story

      We would like to hear from our passionate users how much Zoho Creator has changed the way you work and benefited you. If you would like to share your story to us and be featured as a proud user of Zoho Creator, then this is for you. Fill up the form below and if you want to be included in a case study, we will get in touch with you to get further details. So what are you waiting for? Tell us your story. Charles