> ## Documentation Index
> Fetch the complete documentation index at: https://thehyperstack.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Salesforce Integration

> Issue a credential from a Salesforce Contact record by ticking a box, with the Hyperstack package for Salesforce.

The Hyperstack package for Salesforce lets your Salesforce users issue a credential from a Contact record. They tick **Issue Hyperstack Credential** on the Contact and save. The package then issues the credential through the Hyperstack API.

The package:

* Issues in the background, so saving the Contact isn't slowed down.
* Adds a group picker that loads your credential groups from Hyperstack.
* Keeps each credential as a **Hyperstack Credential** record in Salesforce.
* Doesn't issue twice to the same contact for the same group within 24 hours.
* Unticks **Issue Hyperstack Credential** again after it issues.

## Before you start

* **Hyperstack:** you must be an administrator, to create an API key.
* **Salesforce:** an active Salesforce org, and a Salesforce user who can install packages and change the setup.
* At least one [credential group](https://thehyperstack.com/docs/tutorials/credential-setup/creating-credential-group.md) with its design.

## Step 1: Create an API key

In the Studio, go to **Settings → Developers** and click **New API key**. Name it, for example "Salesforce", click **Create key** and copy the key. See [API keys and webhooks](https://thehyperstack.com/docs/tutorials/advanced-setup/developer-settings.md).

![The Developers page in Studio settings with the API keys and the New API key button](https://mintcdn.com/hyperstack/Fy_VkIRy7UBBIHpu/images/developers.webp?fit=max\&auto=format\&n=Fy_VkIRy7UBBIHpu\&q=85\&s=b7027c40e9b39bb1aeb98553654d11ce)

## Step 2: Find your group key

Go to **Credential Groups**. The **Identifier** column shows each group's key, for example `6fc1241a3199`. The package issues from this group unless the user picks another one.

## Step 3: Install the package

**1. In the Studio, click Add integration, then Salesforce**

The Salesforce page lists what the package does. **Setup and details** lists the setup steps you do in Salesforce after you install.

![The Salesforce extension page in the Studio with the Install button](https://mintcdn.com/hyperstack/IU7NSqzlQEbLypeC/images/salesforce-overview.webp?fit=max\&auto=format\&n=IU7NSqzlQEbLypeC\&q=85\&s=0f0b6f37ced063c764bdb5e71af050c5)

**2. Click Install**

The Salesforce package install page opens in a new tab. Sign in to Salesforce and install the package.

## Step 4: Set up the package in Salesforce

**1. Add your API key**

Go to **Setup → Custom Metadata Types → Hyperstack Config → Manage Records** and edit **API Settings**. Enter your API key, set **Default Template** to your group key, and check that the API endpoint is `https://api.thehyperstack.com/v1`.

**2. Assign the permission set**

Go to **Setup → Permission Sets → Hyperstack User → Manage Assignments → Add Assignment**, and select the users who issue credentials.

**3. Add the group picker to the Contact page**

Open a Contact record, click **Edit Page**, and drag **hyperstackTemplatePicker** from the custom components onto the page. Click **Save**, then **Activate**.

**4. Add the Hyperstack fields to the Contact layout**

Go to **Setup → Object Manager → Contact → Page Layouts**, and drag these fields onto the layout: **Issue Hyperstack Credential**, **Hyperstack Group**, **Hyperstack Credential URL** and **Hyperstack Credential Issued Date**.

## Issue a credential

Open a Contact, pick the group in the group picker, tick **Issue Hyperstack Credential** and save. The package issues the credential and keeps a **Hyperstack Credential** record of it in Salesforce.

The credential shows under **Credentials** in the Studio, like any other.

## Troubleshooting

| What you see | What to do |
| - | - |
| Nothing is issued | Check the API key and **Default Template** under **Hyperstack Config**. Check that the key wasn't revoked under **Settings → Developers** in the Studio. |
| Users can't see the Hyperstack fields | Assign them the **Hyperstack User** permission set, and add the fields to the Contact layout. |

> [!NOTE]
>
> The package runs in your Salesforce org: you change or remove it in Salesforce. To stop it issuing at once, revoke its API key under **Settings → Developers**. Credentials already issued stay as they are.

Questions or problems: [support@thehyperstack.com](mailto:support@thehyperstack.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.