Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/embeddable-ui-components.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "Prebuilt UI components"
description: "Embed Ampersand's React components to let customers connect SaaS accounts, configure integrations, and manage or uninstall existing installations."
---

## Project setup
Expand Down Expand Up @@ -92,6 +93,17 @@ The `getToken` function should return a promise that resolves to a valid JWT tok

The `InstallIntegration` component prompts your customer for their SaaS credentials, and then guides them through the installation flow for an integration. If they've already installed this integration, then the component will display the current configuration of the integration and allow them to update it.

#### Install, manage, and uninstall states

The component renders one of two states based on whether an installation already exists for the current `groupRef` and `integration`:

* **Not installed:** Shows the connect and configure flow. When the consumer finishes, the `onInstallSuccess` callback fires with the new `installationId` and `Config`.
* **Already installed:** Shows the manage view with the current configuration. From here, the consumer can update objects, fields, and mappings, or uninstall the integration.
* Saving configuration changes fires `onUpdateSuccess` with the `installationId` and updated `Config`.
* Uninstalling removes the installation and its configuration, fires `onUninstallSuccess` with the `installationId`, and returns the component to the not-installed state so the consumer can install again.

You render the same `InstallIntegration` component in both states — you do not need a separate component or route for the manage or uninstall flow.

Please note that each [group](/terminology#group) is able to install the integration once, so if someone else with the same `groupRef` has already installed the integration, then the user will not be able to install the same integration again.

The parameters of the component are:
Expand Down
Loading