Creator Help

Create Records in Zoho Subscriptions


Using zoho.subscriptions.create() Deluge task in Zoho Creator, you can create records in supported modules of Zoho Subscriptions. You can make use of different workflow options in Zoho Creator to automate this process . Create customers, generate subscriptions for customers and create PCI compliant hosted pages for new subscriptions, as and when you need to, using this task. For example, you can execute "form actions" in Zoho Creator to create a customer in Zoho Subscriptions or generate a subscription for an existing customer in Zoho Subscriptions.

 Supported Modules

  • Customers
  • Subscriptions
  • Hosted Pages


<response> = zoho.subscriptions.create(<module>, <orgID>, <params>);

<response> is the map variable returned as response. It contains the details of the newly created record. 
<module> is the name of the Zoho Subscriptions Module where the record will be added. For example, "Customer" refers to the Customer module.
<orgID> refers to your organization ID as specified in Zoho Subscriptions. To know your organization ID, click on <YourOrganizationName> > Manage Organizations, from the top-right corner of your Zoho Subscriptions Home page. Click here to learn more about Org ID.
<params> is the map variable that holds the key,value pairs. The map key is the label name as specified in the Zoho Subscriptions module and the map value is the field value as submitted in the ZC form. For example, "display_name" : input.Customer_Name . Here, "display_name" is the label name as specified in the Zoho Subscriptions module and "input.Customer_Name" refers to the value specified in the Contact_Name field in the Zoho Creator form.


  • All the parameters listed above are mandatory. 


1) Create a customer profile in Zoho Subscriptions using Zoho Creator form

In this example, a customer is created in Zoho Subscriptions' Customer module by adding code to a Zoho Creator form. The form consists of fields "Customer Name" and "Email". Upon submission of the form, a record gets created in Zoho Subscriptions Customer module using the data submitted.

  • Add the following scipt in the "on Success" section of your Zoho Creator form

params = map();
params.put("display_name", input.Customer_Name);
params.put("email", input.Email);
response = zoho.subscriptions.create("customers", "12345678", params);

  • Submitting the form will create a new customer record in your Zoho Subscriptions with the specified customer name and email.

customers is the name of your Zoho Subscriptions Module where the record will be added.
12345678 is a sample organization ID. Replace it with your organization ID.
"display_name" and "email" are the label names as specified in the Zoho Subscriptions Customers module. "input.Customer_Name" and "input.Email" refer to Zoho Creator form fields.

 Response Format

Following is the response format returned by Zoho Subscriptions to Zoho Creator:

"message":"The customer has been added.",
"payment_terms_label":"Due On Receipt",

If for some reason, the execution fails, the error response will be in the following format:

Error Response for - Customer diplay_name parameter not passed.

{"message":"Enter valid Customer Name","code":3013}

Customer display_name is a mandatory parameter.

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: