Search through more than a hundred articles on every aspect of

Michael Wertenberg
Written by Michael Wertenberg

How to create custom attributes

Adjust your database to your business needs

Why use custom attributes?

Every business is different. In each industry, different information about the user is key to understanding his or her needs. This is why you should create your own custom attributes. This fairly simple process will help you leverage your marketing efforts.

How to create a custom attribute

To create a new attribute with a fixed type, go to "Settings"-> "App settings" -> "User data & events" -> "User attributes" and click "Create". You will be redirected to a page where you can choose the data type, name, and description of your new custom attribute.

  • boolean - example: true / false
  • fixed choices - example: English/Polish/Russian/Spanish
  • string - example: "this is a sample string, just a regular text line"
  • date - example: 2016-08-03
  • datetime - example (ISO 8601 format): 2016-08-03 12:00:00+00:00
  • integer - example: 23
  • floating-point number - example: 24.5

Remember: If you want to use those attributes with our widget, you'll need to create them first, then use them in window.civchat object on your website. Otherwise, the widget will create new attributes itself with the string type:

  • Name: set the name of your new attribute.
  • Value type: from the menu, choose which type you want to use for your new attribute.

Edit your code with window.civchat object to match this:

<script>window.civchat = {
    apiKey: 'YOUR_API_KEY',
    email: '',
    test_boolean: true,
    test_integer: 4923,
    test_date: '2016-08-03',
    test_string: "Casual string with some number like 1094"
    test_dateandtime: '2016-08-03 11:49'

You should be set and ready to go with new attributes!

If you have any suggestions, please let us know.