Skip to main content

Creating and Managing Custom Models

Define your own data models in Planhat - their fields, associations, keyables, and permissions

Written by Alexander Käll

Summary

  • Custom models let you define your own data models in Planhat, alongside the built-in models (Company, Enduser, License, and so on).

  • Once created, a custom model behaves as first-class data: it has custom fields, associations to other models, permissions, previews and profiles, and can sync with Salesforce.

  • This article covers creating a model and setting up its fields, associations, keyables, previews, and profiles.

  • A new model is hidden until you grant a role access to it - the most common setup snag, covered below.

Who is this article for?

  • Planhat builders/admins who set up the data model for their team (e.g. CS Ops).

Series

This article is part of a series on Custom Models:

Article Contents

  • Introduction

  • Create a model and its fields

  • Association fields

  • Custom keyables

  • Previews and profiles

  • Naming custom fields in formulas

  • Importing records via spreadsheet

  • Limits

Introduction

Planhat includes with a set of system models - Company, Enduser, Conversation, e.t.c - that fit most customer-success data. When your business has processes or structures those models don't cover (regions, contracts, products, partners, work items, and the relationships between them), Custom Models let you represent them directly instead of forcing them into fields on an existing object.

A Custom Model is a first-class object. It has its own custom fields, associations to other models, role-based permissions, previews and profiles, and it can sync with Salesforce. From there it works with the rest of Planhat - joined table columns, formulas, and dashboards.

This article covers how to create a model and set it up. For associations, junction models, and Salesforce sync, follow the links in each section.

Create a Model and its Fields

  1. Go to Data Model → Custom Models and create a new model. Give it an icon, name, plural name, and description (descriptions are important for users and agents alike to understand what models and fields do).

  2. Add the custom fields you need.

  3. Grant the relevant roles access to the model. A new custom model is not visible to anyone (including you) until a role is given access to it in settings.

If you can't see your model after creating it, this is why. A model with no role access is hidden everywhere: the navigation, Data Explorer, and integration mappings. Grant your role access in Data Model → [your model] → Permissions, then refresh.

Association Fields

An association is a field type that links a record to one record on another model. When you add an association field you select the target model and choose whether the association is primary (primary associations carry permissions down the path to Company and prevent orphaned records).

An association field points to a single record. For many-to-one or many-to-many relationships, use a junction model instead. See Custom associations.

Custom Keyables

A keyable is a field that holds a unique ID used to match records during integration, the same role that sourceId and externalId play on Planhat's system models. On custom models you create and name your own keyables. You need a keyable to sync a custom model with Salesforce. See Salesforce Integration for Custom Models.

Previews and Profiles

Set up previews and profiles for a custom model the same way as for any other model. In addition, you can surface a custom model inside the previews and profiles of the model it associates to (its "parent") so the associated records appear on the parent's profile.

Naming Custom Fields in Formulas

Fields you create on a custom model do not belong to the "custom field" category in Planhat, so in formulas they are not prefixed with custom., unlike custom fields on system models, which are. Reference them by their field name directly.

Importing Records via Spreadsheet

You can populate a custom model's records by importing a spreadsheet, the same way as for other models.

Limits

  • The number of custom models a tenant can create depends on its plan.

  • Timeseries data is not currently available on Custom Models.

Did this answer your question?