Hey everyone,
I've been trying to develop this super simple application that will let clients signup using a form I made in Creator. After submitting, they will be prompted to pay and when payment is successful, I want to send them an invoice using Zoho Invoice. All automatically.
I started writing a deluge script to add contacts to Zoho Invoice when the form is submitted, but the only value that's actually getting saved is the "contact_name"... I've tried every single suggestion found on this community and in any guides but nothing works...
- void createContact(string FirstName, string LastName, string Email, string Phone)
- {
- values = Map();
- values.put("contact_name",FirstName + " " + LastName);
-
- contactPerson = Map();
- contactPerson.put("first_name",FirstName);
- contactPerson.put("last_name",LastName);
- contactPerson.put("email",Email);
- contactPerson.put("phone",Phone);
- contactPerson.put("is_primary_contact",true);
- values.put("contact_persons",contactPerson);
- response = zoho.invoice.create("Contacts","XXXXXXXXX",values);
- }
The code above, which should be the right way to do it, gives me the response: {"code":1038,"message":"JSON is not well formed"}
- void createContact(string FirstName, string LastName, string Email, string Phone)
{
values = Map();
values.put("contact_name",FirstName + " " + LastName);
values.put("email",Email);
response = zoho.invoice.create("Contacts","693184158",values);
}
The code above succeeds to run, but all I get is a contact with no email.
I even tried adding every single value a contact can have and I get the same result. A contact with a name and nothing else.
Can someone please explain what's wrong right now??