Skip to main content

Planhat AI connections

How to connect Planhat to your own external AI account, and use that connection in Planhat

Carly Hammond avatar
Written by Carly Hammond
Updated this week

Summary

  • Planhat has connections (integrations) for OpenAI, Azure OpenAI, and Google PaLM 2

  • You can use your choice of connection to link Planhat to your own AI account, entering an API token from your AI provider into Planhat

  • You then use Planhat Automations to send prompts to your AI provider (by making API calls), receive the responses and carry out actions in Planhat

Who is this article for?

  • Anyone who would like to learn more about Planhat's AI connections

  • It's particularly relevant to Tech/Ops Planhat Users who will be setting up one of these connections

Series


Article contents


Introduction

Planhat has always been at the forefront of understanding customers and prospects via data, and taking actions that are both informed by data and automated where appropriate. Artificial Intelligence (AI) is one way that Planhat helps you be more efficient and productive, by enabling you to complete tasks more quickly, gain greater insight into your customers/prospects, and make more informed decisions.

Planhat's data structure is highly compatible with Large Language Models (LLMs). With our AI functionality, you can blend public data that an LLM has been trained on, together with data from within Planhat.

While Planhat includes built-in AI features that use Planhat's connection to Azure OpenAI Service (check out our separate article on Writing Assistant and Conversation Summary here), Planhat also includes a range of connections (integrations) where you use your own business license for your chosen AI provider. You can think of this as "bring your own LLM".

Once you've set up your chosen connection using your credentials from the relevant AI provider, you can set up Planhat Automations using that AI connection.

  • You can create Custom Automations, in which you have full flexibility in design

  • In some circumstances, you can use a Templated Automation instead - they have some elements pre-configured for you for ease. There are a variety of Templated Automations related to AI for you to choose from

The general structure of each Automation will be:

  1. The trigger - what prompts the Automation to run

    • This is the same principle as any other Planhat Automation (i.e. not just AI)

    • E.g. when Company Phase is updated to "Churn Risk"

  2. The prompt that Planhat sends to your AI provider / LLM (OpenAI, Azure or PaLM 2)

    • You can request information from outside of Planhat (publicly available information), but the prompt also can refer to data from within Planhat

    • E.g. ask it to summarize information about the Company whose data you send it, and write a tip for a CSM

  3. The action(s) you want to happen when Planhat receives the response back

    • E.g. save it in a specific place in Planhat, and/or notify the CSM

This is a simple framework, but note that Automations can also be more advanced than this, with additional steps.


What are Planhat's AI connections?

In upgraded Planhat (ws.planhat.com), you can find all the features discussed in this article within the App Center, one of the Global Tools for Planhat builders/admins.

You link Planhat to your own external AI account by using "Connections", which you can find in the bottom left of the App Center. You can choose from Azure Open AI, PaLM 2 and OpenAI.

The App Center is also where you will set up Automations using your AI connection. If you click "+ New app" to open up the Apps Library, you can then:


Why use Planhat's AI connections?

There are a wide variety of possible use cases when you're using a Planhat AI connection combined with Planhat Automations. Rather than needing to choose from pre-set prompts and actions, you have free rein to prompt your LLM how you wish, potentially referring to both public data the LLM has been trained on, and your own Planhat data. You then bring your AI insights into Planhat, where all your customer data is compiled. This ability to blend external/public data and private Planhat data is highly powerful.

Let's look at some example use cases of using an AI connection in an Automation in Planhat.

You firstly choose the trigger that causes each Automation to run. Here you define criteria, which could be a particular data change in Planhat (such as a Company moving into a specific filter), or a schedule (e.g. run every day at 5 am, or run once a week on a Monday at 4 am), or you can even run Automations manually.

The middle stage of the Automation is where you define the prompt that will be sent to your AI provider. What text do you want it to generate for you? There are a vast variety of possibilities here! Below we list some typical use cases that give you an indication of the types of prompts you could write.

  • Categorize NPS comments - prompt OpenAI etc. to assign a product feedback category (e.g. Product A or Product B, or bug report or feature request)

  • Company SWOT analysis (Strengths, Weaknesses, Opportunities, and Threats) - prompt OpenAI etc. to create a SWOT analysis for that Company

  • Company business health (gathering external data) - prompt OpenAI etc. to generate a score from 1 to 10, assessing the organization's performance, business reputation and industry viability

  • Key trends - prompt OpenAI etc. to list the key trends of the industry that that Company is in

  • Account summary - get data about a Company from Planhat, and then prompt OpenAI etc. to gather relevant external information and then summarize the data in a concise way - you can include really granular instructions in your prompt, saying what to include and what to exclude, and the structure/format of the summary (e.g. "Company Description", "Recommended CSM Actions", and so on)

  • Summarize recent Conversations - prompt OpenAI etc. to summarize the last X Conversation records of type Y

  • Sentiment analysis on chats or tickets - get data from a chat or ticket in Planhat and prompt OpenAI etc. to provide a sentiment analysis - e.g. this could be categorizing it into a pre-configured "bucket"

  • Churn risk response (triggered by e.g. a Company being assigned the "Churn Risk" phase) - send the relevant Company data to OpenAI etc. (which could be simply data on the Company model, or perhaps emails and notes on the Conversation model), and ask it to summarize the key data and write a tip for the CSM

Once your AI provider has generated the requested data and sent it to Planhat, the final part of your Automation defines what to do with that data. This is typically one or both of:

  • Save the information in Planhat in a specified place; for example, save it as a specific custom Conversation Type associated with the relevant Company, or save it as a Document Page, as described in a separate article (coming soon)

  • Notify the CSM (Account Owner) that the information is available, and they should take action. Planhat notifications can be in-app, Slack, email or desktop

Both of these options means that it's easy for you to take data-driven action, as well as visualize and analyze your data.


How to set up an AI connection in Planhat

  1. Go to the App Center, and click on "Connections" in the bottom left

    Click the image to view it enlarged

  2. Click "+ Connection" in the top right, and select your choice of AI provider from the list

  3. Enter your API token in the "API Token" box

  4. Follow the instructions for your specific provider/Integration below:

    If you're setting up the OpenAI Integration, enter the "organization ID", which you can find in OpenAI, into the box shown annotated below:

    If you're setting up the Azure OpenAI Service Integration:

    • In the "API Base URL with Base Path:" box, you will see https://[[resourceName]].openai.azure.com/

      • Enter your own "resourceName" in place of [[resourceName]] - so you will end up with a URL of the format https://myopenairesource.openai.azure.com/

      • The "resourceName" is the name of the specific Azure OpenAI resource that you've created in your Azure portal. It uniquely identifies your instance of the OpenAI Service in Azure

      • To find the resourceName, go to the Azure portal, navigate to your OpenAI resource, and use the name assigned to that resource.

    • You don't need to enter anything in the "Auth Headers" section of the Integration. You will see values for "api-key" and "Content-Type" prefilled for you; leave these as-is

    If you're setting up the PaLM 2 Integration, you won't see anything prefilled here, and you don't need to add anything.

  5. Click "Save"

πŸš€ Tip

You can just leave everything else as-is - e.g. leave the toggle switch(es) under the "Endpoints" section turned on.

  • These endpoints will be selected when you set up your Automations

  • "Prompt" is the main endpoint you will be using in your Automations in the vast majority of cases (and it's the only option for PaLM 2). This is used for one-time input without maintaining an interactive conversation flow

  • "Chat" is for multi-turn interactions, maintaining context over several exchanges


Next steps: Automations

When you first set up an AI connection - and haven't yet used it - you will see the message "No apps yet / Explore App library" for that connection.

As we have previously discussed, in order to use your AI connection, you'll need to set up Automations, which you also do in the App Center. You click "+ New app" in the top right of the App Center, and then either create a Custom Automation, or select one of the Templated Automations for OpenAI that are located in the "Integrations" (rather than "Automations") part of the Apps Library.

Click the image to view it enlarged

As a quick overview, your Automation will include:

  1. The trigger - what that prompts the Automation to run

  2. The prompt that Planhat sends to your AI provider (OpenAI, Azure or PaLM 2)

  3. The action(s) you want to happen when Planhat receives the response back

Note that this is a simplification. For example, your Automation may contain additional steps, such as gathering information from Planhat before using it in the prompt sent to your AI provider.

You can learn more about Automations in our article series here.

Once you've set up Automations using your AI connection, you will see them listed in the Connections list, similar to this:

Click the image to view it enlarged

You can click into each of these Automation titles to open up the Automation.


Security considerations

Using one of these AI connections has the advantage that the AI account is yours - your choice of AI provider, and your credentials. This means you have control over it, as opposed to using Planhat's connection to an AI provider. You can conduct your own internal security review, and choose the AI provider (LLM) that best meets your needs, and then connect your account to Planhat. If you have any questions about data location and AI training etc., those would be answered by your AI provider.

Once you set up an AI connection, Planhat then has access to the AI provider, and can send your choice of prompts to it via its API. Your AI provider does not have access to Planhat data and can't request data from Planhat, although you can fetch any Planhat data within a Planhat Automation and then include it in a prompt to your AI provider.


Commercial considerations

You use your own AI account (with OpenAI, Azure or Google) when you're using Planhat AI connections, which means there no additional cost on the Planhat side - the AI credits that are required for Planhat native AI features (Writing Assistant and Conversation Summary) do not apply here.


Additional resources

  • To read an overview of all of Planhat's AI features, see here

  • You can also view our "AI in Planhat" video here - this was made for original Planhat (app.planhat.com), but the principles remain the same

Did this answer your question?