User/Company Lookup

This guide assumes you are familiar with users and company analytics. If not, please review the Introduction to User and Company Analytics

The User/Company Lookup allows you to look up individual customers, like a CRM. You can filter by any user properties like email or company domain. Since Moesif is a User Behavior Analytics platform, you can also filter based on events that a user or company performed (in terms of API calls and custom actions).

Note that events may take up to 20 minutes to show up in the user analytics screens. If your data has not shown up, please try again later once the data has had time to filter over.

Example Query

With User and Company Lookup you are able to filter users/companies based on properties of the User or Company themselves as well as events that they have performed within your product.You can add a filter for user/company properties, events properties, or both.

To see all self-service users who are running into 400 errors, you can add two filters:

  1. Users that are not on an enterprise plan (a custom user property)
  2. Users who made at least 1 API calls in last 7 days that resulted in a 400 error

Users who had over 1 400 errors

Filtering by User and Company Properties

User (or company) filters enable you to filter based on customer properties such as email, name, and created time. Customer properties are stateful and can be updated (such as by yourself to add customer demographic information) or by Moesif itself (such as the Last Seen Time).

You’ll also find your custom user metadata (and company metadata) here.

Users who had over 10 400 errors - User Filters

User/company filters can be OR’ed and AND’ed together and create complex groupings.

Filter by Event Properties

Event filters enable you to filter based on the events a customer performed. A single user or company may have performed multiple events.
Since events represent something performed at a single instance in time, you need to specify the time range to search such as performed within the 24 hrs.

Let’s say we want to look up the users:

Who made at least 10 API Calls in the last 24 hours WHERE the Response.Status was 400 Bad Request AND the route of that API call was either /purchases/:id/decline OR /purchases.

In this case, the query would look like so:

Users who had over 10 400 errors - Event Filters

Events can be one of two types which can be filtered on Event Type filter as shown above:

  • API Calls which are the requests hitting your servers such as as GET /items
  • Actions which are triggered by users within your UI such as Clicked-Signed-In.

Creating Event Filters

There are two different ways to think about combining event filters:

  1. Customers who performed an event matching both X AND Y (in a single event)
  2. Customers who performed an event matching X AND an event matching Y (multiple events)

Filters within the same group (outlined as a box in Moesif) will match against the same event. Separate groups will match against separate events.

1. Customers who performed an event matching both X AND Y

If you want to find a single event that matches multiple criteria, ensure your properties are in the same group (outlined as a box in Moesif).

For example, you may want to display all users who made an API call that returned 400 Bad Request AND the route of that API call was either /purchases/:id/decline OR /purchases. In this case, you are matching multiple properties of the same event and the query would look like so:

User Performed Single Event

2. Customers who performed an event matching X AND an event matching Y

If you want to match across independent events a user performed, you would add multiple OR or AND boxes. Each filter box would contain the filters for each individual event criteria.

For example, you may want to match against both an API Call and an Action. In this example, let’s say you want to show all users who made an API call that returned 200 OK to either /purchases/:id/decline OR /purchases_ AND performed a custom action where the Action Name is “Signed-In”. The query for this would look like so:

User Performed Both an API Call and a Actions

Event numeric aggregations

Besides equality, event fields also support aggregations such as average, max, or distinct. For example, you can create a cohort of users who accessed your API with over 10 distinct IP Addresses per hour anytime over the last 7 days. This can be done like so:

Users with over 10 distinct IP addresses per hour in last 7 days

Table Actions

There are a variety of actions that can be applied to a User/Company Lookup table. Each of them are described below.

Edit Columns

You can modify the columns that are displayed in the table by clicking the Edit Columns button.

example

You can then select the column you would like to add to the table by clicking the Add a data field dropdown, selecting the field, and clicking Save.

example

Any columns added to the table will also be added when you do a Bulk Export as well.

Adding a Custom Column

There may be certain times where you want to add a customer column to the Lookup table. You can add a custom column by clicking + button at the far-right of the table.

example

A modal will then appear which allows you to input the details of your custom column.

example

Multiple calculations are available such as calculating the max, min, avg, or even the difference between 2 fields.

example

If your field is missing, add it via the Select Fields button first. Also, please note the table formulas are based on values currently in the table not based on an queries from database.

To delete a custom field, simply click the red X on the column header.

example

Sorting the Results

To sort the results in the Lookup table, select the field you would like to sort on.

example

Once your desired field is selected, you can choose the order you would like to display it in, ascending or descending.

example

Creating a User/Company Notification

For each user or company, you can create an alert to fire whenever a customer meets the desired condition. To create a user/company notification, click on More Actions and select Internal Notification.

example

This will open a modal where you will create a cohort based on the criteria in your filter. To proceed, add a Cohort Name and click Save and Continue.

example

Next, select the channel you’d like to send the alert to or copy/paste the code for the webhook as needed and click Save.

example

Exporting Data

Enterprise customers can generate a bulk export file containing all users or companies based on any filter criteria. Data can be exported in CSV, JSON, or Parquet formats and can include only selected fields (the ones displaying in the Lookup table) or all fields.

To create such a file, click the Export button and select Bulk Export.

example

In the modal, add the email where you would like the download link to be sent to and the format that you would like the exported data to be in. Once configured, click Start Export.

example

Once the export is finished, you will be sent an email containing a link where you can download the CSV, JSON, or Parquet file.

Create Cohort

Saved cohorts are groups of users defined by their properties and events they performed. An example cohort might be Users who are exceeding rate limits in the last 24 hours. Think of cohorts like a saved list of users that matches some criteria and is continuously updated in the background by Moesif.

To save a cohort based on your filters, click on the Create Cohort button in the top right corner.

example

Next, in the modal that pops up, fill in your Cohort Name and click the Create Cohort button to save the cohort.

example

Once the cohort is saved, you can target the cohort with Moesif’s automation features like triggering behavioral emails and dynamically sampling customers.

Creating a Sample Rate for a Cohort

To set a sample rate from the User Lookup screen, click the More Actions button.

example

Then, create a cohort for the sample rate.

example

Lastly, set the Sample Rate and Priority for the sampling rule and click Save.

example

For more about Dynamic Sampling, check out the docs.

Saving to a Dashboard

You can share the view to a dashboard of your choice. Dashboards make it easier to monitor groups of users over time. To save a table to a Dashboard, simply click the Save button.

example

Then, fill in the Workspace Name, Share Type and select the Dashboard you’d like to save it to.

example

Any chart already saved to a dashboard can be modified by clicking the save button.

Updated: