Widget Customer Data API

You can easily add profile data to a user who contacts you through your Groove widget. This is especially helpful when you already know who the customer is, or when you have some piece of information you want to remember about a customer. While there are a number of default fields that you can see when viewing a customer in Groove, you should you should enable the custom profile app in your account to get the most out of this feature. With this app installed, you can set additional profile data on your customers beyond our default fields, and you can display that additional data in the sidebar of your tickets.

Setting customer profile data in the widget is simple. If you aren't already familiar with the Groove widget API, you should take a quick look and familiarize yourself with the options available.

Example

Let's start with a simple example and assume we know the user's email address and some basic information. We want to make the data available on the customer when they send a ticket to us through the widget.

Because the widget API will queue commands if the widget has not fully loaded, you can call the setCustomer command at any time, as long as the script tag containing your embed has been evaluated. We will assume that the data is hard-coded in this example, but you could just as easily make an ajax request to populate the data.

By adding an email address, the value we set will be automatically populated in the email field of the widget's contact form. The customer can still modify this value, but it's a great way to save them some time if you already know who they are.

Any data you assign to the customer will be added to the customer matching the email address that is sent through the widget's form. If you set the email address, but you customer changes it on the form, Groove will use the address your customer selected.

Fields

Groove supports a number of fields out of the box, and you can add additional fields dynamically as your needs grow.

Any additional fields you add can be either a string, number, object, or array.

Default fields are displayed on your customer in Groove, while any custom fields you add can be displayed by modifying the template in your custom profile app settings.

Template

Using the example above, we can display the user's favorite number and travel gear in the sidebar by modifying the custom profile template:

You must explicitly add the field to your template before it will appear in the profile, but you can start recording the data before you have modified your template.