Customers (Tenants)

Before integrations can run, you need to connect your customers' accounts in external apps and deploy integration logic to them.

Customers (also referred to as Tenants) represent people or groups of people who use your application.

Note: The terms "Customer" and "Tenant" are used interchangeably throughout Membrane. You may see "Tenant" in some parts of the Console UI (like Settings) and "Customer" in documentation and API responses.

Every customer in your app has their own set of integrations: credentials for external apps, settings, etc.
Depending on how your app is organized, a "customer" in Membrane could be a single user, a team, or an organization.

Integration Engine adds customers automatically as soon as a new Customer Id is seen in an Access Token used to access its API.

Customer Fields

Each customer has fields that contain any information you need to use in your integration logic.

For example, you can store a user's API Token in fields.apiToken and use it to make requests to your API from within integrations.

Defining the Field Schema

You can define the schema for customer fields in the "Tenant Field Schemas" section of the Settings > General page.

Important: Customer fields will not appear in the Console UI unless you define their schema first. While you can still set field values via authentication tokens or the API, they will only become visible in the Console after you:

  1. Navigate to Settings > General
  2. Define the field schema in the "Tenant Field Schemas" section
  3. Specify the field names, types, and other properties

The schema defines the structure and metadata for your customer fields, making them visible and manageable in the Console interface.

Setting Field Values

You can set user fields in two ways:

  1. By adding a fields claim to the Authentication Token. Whenever Membrane sees a new set of fields in the token, it saves them to be used going forward.
  2. By updating users using PATCH /users or PUT /users methods of the REST API

Test Customer

When you configure or run integrations in Console, your Test User is used.
You can configure the test user's ID, Name, and Fields on the Testing tab of the Settings page.

Access token generated for the test user is available at the bottom of the page—copy it to use in your test code.

Connections

Each customer can have multiple connections to external applications.

Connections provide access to your customers' accounts in external applications. Integration Engine stores and refreshes the customer's credentials in a Connection object.

To create a connection from inside your app, see Connection UI.

For more information on connections, see Connections.

Instances

Before using integrations (running actions or flows, configuring field mappings, etc), you need to deploy their instances to a given connection.

During the deployment, integration engine performs necessary steps to make the integrations work in the context of the connection:

  • Subscribes to webhooks.
  • Saves initial states of elements.
  • Fetches connection-specific field schemas.
  • ...

Ad-hoc Customer-level Integrations

Customer-level integrations are unique to a single customer.

In most cases you will build customer-level integrations as Flows.

To build a customer-level flow:

  • Go to the Customers page
  • Select the customer you need (you can create one if it doesn't exist yet).
  • Go to the "Flows" page inside the customer's page.
  • Create and configure a new flow.

Instead of creating a fully custom flow from scratch, you can build a Universal or App-level integration and then customize it for a specific customer.