See related
No related articles

Connect custom attributes and reports with workflows

Last Update: Oct 2024 • Est. Read Time: 3 MIN
To check plan availability, see the pricing page.

Kustomer comes pre-loaded with standard objects and attributes which are used in reporting and filtering data. However, most businesses need to add custom data from external sources in order to report on metrics more unique to their business.

You can use workflows and custom attributes to move data from one area of Kustomer to another in order to use specific metrics wherever they're needed. In this tutorial, you'll learn how to set up a workflow that brings in custom attribute data, and then build a custom report around this data.

Who can access this feature?
User typesAdmins can access workflows, attribute settings, and reporting.


In this article

Prerequisites

Before following this guide, you should already be comfortable with the basics of using workflows. Workflows overview

We also recommend being familiar with Custom attributes and Custom reporting.

Create the custom attribute

First, you'll create the attribute on the desired Klass. For the purposes of this tutorial, the attribute will be created on the Message Klass to track the queue the conversation was in when a message was sent.

  1. Go to Settings > Platform > Klasses.
  2. Select the Klass you want the attribute to be on. If you're following the tutorial example, select the Message Klass.
  3. Select Create Attribute.
  4. Create a new attribute with the following properties:
    • Name: Queue
    • Type: Single line text
    • Single Value

Create the workflow

Next, you'll create a workflow that will trigger when a new message is created which adds the conversation's queue at that time to the message object.

  1. Go to Settings > Platform > Workflows.
  2. Select Add Workflow > Custom Workflow.
  3. Fill in a name and description for your workflow. If you're following the tutorial example, name it Add Message Queue. As a best practice, we always recommend using clear, descriptive titles to help you and the rest of your admin team remember how this automation will be used in the future.
  4. Leave the callable workflow option turned off.
  5. Select Create to save the workflow. You'll be taken to the Workflow Editor where the workflow can be customized.

Customize the workflow

  1. Select the first step. In the right panel, set the trigger to:
    • Trigger App: Kustomer
    • Trigger Event: Message Created

  1. Add an action step to look up the conversation from step 1.
    • Action App: Kustomer
    • Action Event: Conversation: Lookup (By ID)
    • Id (string): /#steps.1.conversation

  1. Next, set up any condition steps as desired to filter out certain types of messages. If you're following the tutorial example, you'd set up a condition that continues only if a conversation has a queue assigned.

  1. Next, add an action step to update the message by adding the conversation's queue as the message queue. This updates custom attribute on the message Klass, using the queue from the Conversation: Lookup (By ID) step.
    • Action App: Kustomer
    • Action Event: Message: Update
    • Id (string): (1) Message Created > Id, or /#steps.1.id
    • Queue (string): (2) Conversation: Lookup (By ID) > Queue

Note: If you don’t see a field for Queue (string) or your custom attribute at this step, make sure you've created the custom attribute on the Message Klass.

When you're finished with the workflow, Save it. After turning on this workflow, messages should now have a queue attribute saved to them, as long as the queue has been set on the conversation.

Create the custom report

Finally, you'll set up a custom report that incorporates your new custom attributes.

To create a custom report:

  1. Go to Reporting.
  2. From the sidebar, either create a new report, or select an existing custom report and select Add Chart from the toolbar.
  3. In the Chart Editor, select Start From Blank. Then, build your data with the following suggested properties:
    1. For the Data Object Type, select Message.
    2. For the Date Attribute, select Created At. This will show the total number of messages created during the selected time range, as long as there aren't any conditions or segmentation.
    3. For the Chart Type, we recommend selecting Table. This will show a simple view of the messages in each queue.
    4. Select Segment By: Queue to see how many messages were sent for each queue.
    5. Finish by adding any filter operators as desired. This would be a useful way to hone in your report to make it more relevant to the data you care about, by filtering out spam or only showing outbound messages.
  4. Select Next to finish your chart by customizing the title, description, axis label, and time interval as desired.
  5. When you're finished, Save your chart.

You can now refer to this chart in your custom reports to see relevant data and improve your team's performance and efficiency.