Creator Help

Create Customer

Overview

The Deluge task zoho.invoice.createcustomer() will create a customer in Zoho Invoice with the required values.

Deluge syntax to create a single customer

<Inv Response> = zoho.invoice.createcustomer(<key:value>, <Optional Company Name>

where,
<Key> refers to the name to be specified as the map key for each key:value pair. The key names must be the same name as given below.
<value> is the value specified for a given key.
<Company Name> Optional company name for zoho login being part of more than one Organization. Refer Organization name here.
<Inv Response> is the map variable returned by Zoho Invoice as response.

Key names to create a customer

  • CustomerName - (Mandatory)
  • CurrencyCode - (Mandatory)
  • PaymentTerms
  • BillingAddress
  • BillingCity
  • BillingState
  • FirstName
  • LastName
  • Email
  • Phone
  • Mobile
  • Notes

Example to create customer with Single Contact

invResp = zoho.invoice.createcustomer({ "CustomerName" : "test", "CurrencyCode" : "AWG", "PaymentTerms" : "60", "BillingAddress" : "Bill Address", "BillingCity" : "Billing City", "BillingState" : "Billing State","Fax" :
"+099238324", "FirstName" : "John", "LastName" : "Smith", "Email" : "john@zoho.com", "Phone" : "12213234", "Mobile" : "213213123123", "Notes" : "Notes" });

Response format

{
"Phone":"12213234",
"PaymentsDue":"60","EMail":"test@zoho.com",
"Fax":"+099238324",
"BillingAddress":"Bill Address",
"BillingCity":"BillingCity",
"BillingState":"BillingState",
"LastName":"test",
"CurrencyCode":"AWG",
"AvailableCredit":"0.00",
"Name":"test",
"Notes":"Notes",
"OutstandingBalance":"0.00",
"Address":"Bill Address",
"CustomerID":"145659000000033065",
"ContactID":"145659000000033067",
"Mobile":"213213123123",
"FirstName":"test",
"BillingFax":"+099238324"
}

Example to create customer with Multiple Contacts

contacts = List:Map();
contacts.add({ "FirstName" : "John", "LastName" : "Smith", "Mobile" : "***********", "Phone" : "********", "Email" : "John.smith@zohocorp.com" });
contacts.add({ "FirstName" : "Kate", "LastName" : "Wills", "Mobile" : "**********", "Phone" : "********", "Email" : "wkate@zohocorp.com" });
invResp = zoho.invoice.createcustomer({ "CustomerName" : "Peter", "CurrencyCode" : "USD", "PaymentTerms" : "60", "BillingAddress" : "Spring Street", "BillingCity" : "Los Angeles","BillingState" : "California", "Fax" : 099238324", "Contacts": contacts, "Notes" : "Notes" }, "Zoho");

Response format

{
"PaymentsDue":"60",
"BillingAddress":"Spring Street",
"CurrencyCode":"USD",
"BillingState":"California",
"Name":"Peter",
"AvailableCredit":"1000.00",
"Notes":"Notes",
"BillingCity":"Los Angeles",
"OutstandingBalance":"0.00",
"CustomerID":"675000000091011",
"Contacts":"[{Phone=23456789, EMail=john.smith@zohocorp.com, Mobile=*********, ContactID=675000000091013, FirstName=John, Salutation=, LastName=Smith}, {Phone=*******, EMail=wkate@zohocorp.com, Mobile=********, ContactID=675000000091015, FirstName=Kate, Salutation=, LastName=Wills}]",
"BillingFax":"+099238324"
}

Related Links

http://www.zoho.com/invoice/api/customers/customers.html#how-do-i-add-a-customer?

Top