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

# Connect a host org

> Link a Salesforce org so people can build and use Wisty apps with their Salesforce login.

Open **Host orgs**, then **Add host org**, to let people build and use Wisty apps inside Salesforce. You need to be a Wisty team admin, and [Wisty must be installed](/docs/salesforce-setup/install) in that Salesforce org.

A [connected org](/docs/getting-started/key-concepts#connected-org) is your personal Salesforce connection for building and using apps in the Wisty web app. A [host org](/docs/getting-started/key-concepts#host-org) links a Salesforce org to your Wisty team. Its users can open shared apps and, with builder access, create projects and publish apps inside Salesforce. Connecting your own Salesforce login doesn't create that team link.

## Link the org

<Steps>
  <Step title="Start in Wisty">
    In the Wisty web app, open **Host orgs** and click **Add host org**.

    If the package isn't installed, use **Install package** in the dialog and complete [installation](/docs/salesforce-setup/install).
  </Step>

  <Step title="Copy the activation code">
    Click **Copy code**. The activation code is single-use and expires after an hour.

    <Frame caption="The dialog waits while you paste the code in Salesforce, and shows how long the code remains valid.">
      <img src="https://mintcdn.com/wisty/p0KgmgXmvqDkXTFQ/images/connect-host-org.png?fit=max&auto=format&n=p0KgmgXmvqDkXTFQ&q=85&s=ef8cffcc3452e1534adb70a99726a255" alt="Add host org dialog with three steps: Install the Wisty package, Open the Wisty tab in Salesforce, and Paste this code, showing an activation code, a Copy code button, and a Still waiting for the code in Salesforce status." width="552" style={{ width: "100%", maxWidth: "552px" }} data-path="images/connect-host-org.png" />
    </Frame>
  </Step>

  <Step title="Open Wisty in Salesforce">
    In Salesforce, open **Wisty** from the App Launcher. Complete **Connect Wisty** if Salesforce asks you to approve access.
  </Step>

  <Step title="Paste the code">
    On **Connect this Salesforce org to Wisty**, paste the code and click **Connect**.

    <Frame caption="The Wisty tab in Salesforce shows this one-time setup screen until the org is linked.">
      <img src="https://mintcdn.com/wisty/p0KgmgXmvqDkXTFQ/images/connect-salesforce-filled.png?fit=max&auto=format&n=p0KgmgXmvqDkXTFQ&q=85&s=c1c6ecf169af891e543e35146585058e" alt="Connect this Salesforce org to Wisty screen inside Salesforce, with an activation code pasted into the code field and a Connect button." width="532" style={{ width: "100%", maxWidth: "532px" }} data-path="images/connect-salesforce-filled.png" />
    </Frame>
  </Step>

  <Step title="Check the link in Wisty">
    Return to Wisty. The dialog closes after the code is accepted, and the org appears under **Host orgs**.

    <Frame caption="Each host org shows its pinned apps and whether sharing is on.">
      <img src="https://mintcdn.com/wisty/p0KgmgXmvqDkXTFQ/images/host-orgs.png?fit=max&auto=format&n=p0KgmgXmvqDkXTFQ&q=85&s=a7aeda1ffc9450a491284a9923581a6b" alt="Host orgs page listing ACME Prod and ACME Sandbox, each with 2 pinned apps and Sharing on." width="2000" height="660" data-path="images/host-orgs.png" />
    </Frame>
  </Step>
</Steps>

If the code expires, click **Generate new code** and use the new one. If the Wisty tab is missing, check the [package and tab visibility](/docs/salesforce-setup/install#show-the-wisty-tab-to-viewers) before generating another code.

## Build inside Salesforce

Give the people who should build apps the [**Wisty Builder** permission set](/docs/salesforce-setup/control-access#grant-building-access-in-salesforce). They can then open the **Wisty** tab, describe what they need, and generate, refine, and publish an app using their Salesforce login.

Each project created this way stays tied to the Salesforce org where it was created. For example, a project created in ACME Prod always uses ACME Prod. You can't switch it to another org, and its published app can be shared only within ACME Prod. Opening the app through a Salesforce Web link doesn't change that association.

Projects start private. Builders can generate and publish apps for their own use without enabling [org-wide sharing](#choose-whether-to-allow-sharing).

## Choose whether to allow sharing

Sharing is optional and starts off for a new host org. Leave it off if builders should generate and publish apps only for their own use.

Turn on **Sharing** to let app owners share their published apps with other users in the same org. It also lets your Wisty team share apps created in the Wisty web app with this org. Turning it on doesn't share apps automatically: each app owner chooses which published apps to share.

To allow sharing:

1. In the Wisty web app, open the org under **Host orgs**.
2. Select the **Sharing** tab.
3. Turn on the switch. The status changes to **Sharing on**.

With sharing enabled, an app owner can [share their published app with this host org](/docs/publishing/share-apps#change-who-can-open-an-app). Have another user in the org open the **Wisty** tab in Salesforce to check the result. They can find the shared app under **All apps** and open it using their own Salesforce permissions.

You can [turn sharing off again](/docs/salesforce-setup/control-access#turn-off-sharing-for-an-org) without removing anyone's builder access.

## Turn on Salesforce Web links

[Salesforce Web](/docs/getting-started/key-concepts#salesforce-web) lets people open shared apps from a link outside Salesforce. It's off by default, and you can leave it off if everyone opens apps inside Salesforce.

1. Under **Host orgs**, open the org and select **Salesforce Web**.
2. Turn on the switch. The status changes to **Salesforce Web on**.
3. Follow [Copy a Salesforce Web link](/docs/publishing/share-apps#copy-a-salesforce-web-link) to get a link for a published, shared app.

Viewers click **Sign in with Salesforce** and use a login from the linked org. Logins from other orgs are rejected.

Turning this switch off immediately blocks Salesforce Web access, including existing sessions. Wisty then removes the stored Salesforce Web sessions and credentials. The in-Salesforce experience can keep running independently.

## Pin apps for the org

Use pins to put the apps people need most at the front of the Salesforce launcher.

1. Open the host org and select **Pinned apps**.
2. Click **Pin an app** and select a published app shared with the org.
3. Drag the pinned apps to put them in the order you want.

Viewers find them under **Pinned** in the Wisty launcher. If an app isn't available to pin, check that it's published and shared with this org.

## Add shared org knowledge

The host org's **Org knowledge** tab holds instructions used when Wisty builds projects for that org. Use it for business definitions, naming conventions, and other context that applies across projects. See [Add org knowledge](/docs/building/org-knowledge) for examples and how these instructions are used.

## Next steps

<Columns cols={2}>
  <Card title="Add an app to Salesforce" icon="panels-top-left" href="/docs/publishing/embed-in-salesforce">
    Place a published app on a record page or in the utility bar.
  </Card>

  <Card title="Manage builders and viewers" icon="lock" href="/docs/salesforce-setup/control-access">
    Give people builder access, manage sharing, or remove this link.
  </Card>
</Columns>
