Skip to main content

URL Formula Fields

Use URL Formula Fields to create dynamic links in Planhat

Carly Hammond avatar
Written by Carly Hammond
Updated over 2 weeks ago

Summary

  • It's easy to create Formula Fields that use dynamic replacement codes to generate unique URLs via referenced field values

  • For example, this could be a link on a Company record in Planhat to jump to that same Company within your own product or a third-party system

  • Like other fields, you can choose where to display these in Planhat, e.g. in Previews

  • You click on the arrow next to the URL in a cell to navigate to that webpage

  • URL Formula Fields in upgraded Planhat replace Link Tags in the previous Planhat platform

Who is this article for?

  • All Planhat Users

  • Particularly Planhat Users who are building Formula Fields for their organization (e.g. Tech/Ops)

Series

This article is part of a series on Formula Fields:

πŸ“Œ Important to note

This article focuses specifically on URL-type Formula Fields. For more general information on Formula Fields, check out the articles listed above.


Article contents


Introduction

In your customer/prospect database in Planhat, you'll often want to link to other systems. For example, if you sync Accounts/Companies from Salesforce to Planhat, with some of your colleagues still using Salesforce, you may want each Company record in Planhat to include a link to the equivalent Account record in Salesforce, so you can quickly jump between the records in two tools. Or perhaps you want to connect a record in Planhat with the equivalent record in another external system - e.g. this could be a link between a License or Invoice in Planhat to that record in third-party finance software, or a link from a Company in Planhat to a data analysis tool, or a link between a record in Planhat (such as an End User or an Asset) back to your own product.

Of course, each of these URLs needs to be unique - for example, the Salesforce URL for your customer Account (Company) "Spotify" will be different to the Salesforce URL for your customer Account (Company) "Ben & Jerry's". So how can these different URLs be automatically generated, so you don't need to manually copy and paste individual URLs into Planhat? This can be achieved by Formula Fields.

Typically, these Formula Fields will be referring to the Source ID or External ID standard/default fields in Planhat. These contain record IDs from other systems - Source ID is typically populated from CRMs such as Salesforce (via the relevant integrations), and External ID is from another system, usually your own product.

Using Formula Fields, you can use a dynamic replacement code to insert the relevant value from your specified Planhat field into the URL, automatically creating the unique URLs for you.

πŸš€ Tip

URL Formula Fields in upgraded Planhat (ws.planhat.com) replace the concept/feature of Link Tags in the earlier version of Planhat (app.planhat.com).

πŸš€ Tip

Despite some of the examples in this introduction, remember that you can use Planhat as your sales CRM, for your data analysis/visualization, and for many aspects of finance/revenue management.


What are URL Formula Fields?

In Planhat, you can create custom fields, and when you do, you can select a checkbox to make this a Formula Field, which you can read a series of general articles on starting here. Another important element you configure in a custom field is its data type, and in the context of this article, we're looking at URL-type fields.

Once you select the "Formula" checkbox, it will open up a new box where you enter your formula - for example:

Like any other field, you can then choose to include your URL Formula Field in Previews and/or Full-Page Profiles to display it for individual records, as well as viewing it in data table formats (such as in the Data Explorer) for groups of records.

How to jump to the linked webpages

Although Formula Fields are locked rather than editable in the cell's UI (because their values are calculated rather than typed/selected), if you mouse over a URL Formula Field cell you will see an arrow appear on the right-hand side (with the tooltip "Open") that you can click on to go to that URL. This means you can quickly and easily jump to the linked webpage.

You can alternatively copy the URL from the field and paste into your web browser.


Why use URL Formula Fields?

URL Formula Fields enable you to have URLs within Planhat that are both custom and dynamic, so you can easily click in a record (such as the Company "Volkswagen") to jump to the relevant webpage, typically in an external system, with the URL unique for that record. So, for example, you could create one single Formula Field, and use that to link to your customer Company Zoom's profile in your product, your customer Company Jiminny's profile in your product, and your customer Company Thinkific's profile in your product, etc., depending on which Company in Planhat you're looking at. The links are very useful to ensure everything is connected rather than siloed, and the dynamic Formula Field element saves you time as you don't need to manually paste all the different unique URLs for different records into Planhat.

We discussed lots of use case examples for URL Formula Fields in the introduction of this article. These URL fields are perfect to link from Planhat to any other external systems you are using, such as your own product, a CRM, a data analysis tool, finance software, and so on - although remember to consider whether you can achieve what you want fully within Planhat, as maybe you don't need some of those tools any more!


How to set up URL Formula Fields

URL Formula Fields are a subset of custom fields, which you can learn more generally about creating here - and we showed the modal for configuring these custom fields earlier in this article. In short, you should:

  1. Ensure your choice of data model (e.g. Company) is selected in the left-hand column

  2. Select the "Fields" tab

  3. Click "+ New Field"

  4. In the modal, ensure the "Data type" is set to "URL", and the "Formula" checkbox is selected

  5. Enter your URL formula in the "Formula" box

  6. Click "Save"

Let's go through how to work out your URL formula, with a simple worked example.

  1. Firstly, you should look up what your final desired URL should be

    • In this example, I have a Salesforce Developer org for testing purposes, and I want a URL field in Planhat on Company records to link to the relevant Account record in Salesforce

    • I look at an Account record in my Salesforce org to see the specific URL structure in my case - https://planhat61-dev-ed.develop.lightning.force.com/lightning/r/Account/001Qy000019shf2IAA/view

  2. Next, you should identify the part of the URL that's unique to the record, and which field this value is saved in within Planhat

    • In this example, my URL contains the code 001Qy000019shf2IAA, which is the Account record ID in Salesforce

    • I have my Salesforce syncing with Planhat via the Salesforce integration, and this record ID is synced to the standard/default "SourceId (CRM)" field on the Company record

    • I can see (in the "Fields" tab in the "Data" / "Data Model" Global Tool, and in the Planhat API documentation) that the API name for this Planhat field is "sourceId" - this is what I will use in the Formula Field replacement code

  3. Now you can construct the formula for your URL - replace the relevant part of the desired final URL with the appropriate replacement code to specify the correct field

    • As described in our general Formula Field documentation, a standard/default field on the same model as the Formula Field is referenced by using << >>

    • In this example, my URL formula is https://planhat61-dev-ed.develop.lightning.force.com/lightning/r/Account/<<sourceId>>/view

Once you save your field, you can now view it in Planhat like any other field. If you would like it to display in Previews and/or Full-Page Profiles when viewing a record (for a Company as in this example), then remember to modify your Templates - you can read more about this general topic in our separate series of articles starting here.

πŸš€ Tip

When you are building your own URL Formula Field, remember to check what the equivalent target URL will be in your specific case, rather than copying the example exactly. For example, your Salesforce URL Formula Field may be of the format https://yourcompanyname.my.salesforce.com/<<sourceId>>. And of course, if your URL is pointing to a different system (such as your own product), then the base URL will be completely different.

Similarly, check which field in Planhat you want to reference in your specific URL Formula Field - in the example in this article it's <<sourceId>>, but in your case it could be <<externalId>> (e.g. if you are linking to your own product), or something different.

πŸš€ Tip

URL Formula Fields can be more complicated than these simple examples - e.g. you can include Formula Field operations such as "IF". You can read more about Formula Field operations here.

πŸš€ Tip

As we mentioned earlier in this article, URL Formula Fields in upgraded Planhat are the replacement for / equivalent to Link Tags from the previous Planhat platform. If you are upgrading from the earlier version of Planhat (app.planhat.com) to the current newer Planhat (ws.planhat.com), there is an automated migration for Link Tags to URL Formula Fields that is run by your CSM - reach out to your CSM if you would like to discuss this further.

Did this answer your question?