To start playing around with the Custom Profile app, click on Settings in the far left menu bar, then go into Integrations, and finally Custom Profile.
Once installed, you can begin to configure your custom profile by going into the Settings.
The Custom Profile App requires four things to function properly:
- An HTTP/HTTPS endpoint URL on your server that the Groove servers can call.
- The endpoint must return valid JSON.
- Your JSON keys may not include any spaces.
- An HTML template to display next to every ticket.
After installing you'll need to tell us exactly what you want us to display and how you want it to look:
Allows you to customize the text above your Custom Profile.
This is where things start to get fun. After we've fetched custom attributes from your Webhook, you can render them directly on the template page using a Liquid template. To insert an attribute into your html simple wrap in double curly brackets like so:
Note there are a few reserved fields which Groove will always override:
- :name (of your custom profile)
- :status (of the user in groove)
- :email (user)
- :first_name (user)
- :last_name (user)
- :full_name (user)
Please use different field names in your webhook payloads to avoid collisions.
Inserting variables is just the beginning though. We highly recommend checking out the Liquid docs. Especially using if statements around custom attributes that aren't available for all customers and filters to format text. Have a look at part of the template we use in our Groove account to see what's possible:
We'll fetch your custom attributes from your server using this URL after every new message from your customers. We will use a GET request with email and api_token parameters. You should check the given api_token matches the one from your account, and return non-nested JSON for the given email address.
Prior to saving you should provide a real customer's email adress and test that your Webhook and Custom Profile are working as expected. We will fetch the details from your server and render an example.
Once everything looks the way you want and is saved, all new tickets will include your Custom Profile on the right side of the screen.
JSON should be returned as a single level hash. This is correct:
Nested keys will not work. This example is incorrect:
Custom Profile Data Fetching
By default, the custom profile data is fetched every time you receive an incoming message from an email address. Should you need to refresh and fetch new data on an old conversation that hasn't received a new message, you can manually refresh the data by clicking the button at the top of your custom profile.