How to display custom fields to customers?

Modified on: Fri, 15 Jul, 2022 at 7:01 PM

This article covers


Creating custom fields

Displaying Custom Fields on hosted pages, emails, and invoices.

Add custom questions at checkout


Summary


Custom Fields can be created to track additional information about a customer or their subscription in addition to the default fields present in Chargebee. To create a custom field, head to Settings > Configure Chargebee > Custom Fields. Click Here for more information on creating custom fields.


Note:  The user will need to have access to the Test site


Solution

The supported custom field types are:

  • Single line text: This field will appear as a text box, and the maximum character limit is 99.

  • Multiline text: This field will appear as a text area, and the maximum character limit is 250.

  • Dropdown: This field type will appear as a dropdown menu. You can add as many options as you'd want, but ensure that the total number of characters used for all the options put together, does not exceed 5000.

  • Checkbox: As is evident from the name, the field type can be used for creating checkbox options. The default value of this field type will be false.

  • URL: This field type will appear as a text area. The URL provided here will be validated for "http://" and "https://".

  • Email: This field type will appear as a text box. The email address will be validated.

  • Date picker: Use this field type if you want to collect date-related information.

  • Timestamp: If you need to collect information related to date as well as time as a timestamp, use this field type.

  • Numbers: You could use this field type for collecting information such as phone number. This field does not accept input other than numbers.


You can add up to a total of 50 custom fields each to Customers, Subscriptions and Plans/Addons modules. 


The breakdown is as follows:

  • 30 String fields (includes single line text, multiline text, dropdown, checkbox, URL and email)
  • 5 Date fields
  • 5 fields of the type Timestamp
  • 10 fields of the type Numbers


Once you create the custom fields, you can collect or store values in them in multiple ways:


  1. From the Web interface - you can add the custom field value while creating a customer/subscription/plan/addon.


2. Using APIs - you can also add or update a custom field value using the custom fields. The custom fields would be listed on the API docs under the list of input parameters. Click here to know more. 



Displaying Custom Fields


The custom field values captured can be used in different ways to create filters/segments, and display additional information to your customers on the checkout pages or/and on the customer portal.
These custom field values will also be present in the API & Webhook responses, which can then be used to carry out conditional workflows.


  1. Checkout pages: To display the custom fields on the checkout pages, head to Settings >  Configure Chargebee > Checkout & Self Service Portal > Fields.

Then click on the pen icon and set it as ‘Mandatory’ In Checkout and In-Portal.



Sample Checkout and portal pages with Custom field - Language


  1. Invoices: To add custom fields on the invoice template, navigate the Settings > Configure Chargebee > Customize Invoices & Credit Notes > Invoices.


  1. Email Notifications: You can also include the custom field values in the email notifications template using the mail merge field icon on the edit template section. Click here to know more about mail merge 


Related articles and documentation:

Pre-filling/Passing custom fields to hosted pages (via Plan URL)

How can I display the custom fields on an invoice?

How to create a custom field for passwords?

Is it possible to filter set custom fields as filters via the APIs?




Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.
×