Skip to main content

Entity Capability

An Entity Capability embeds your own interface on entity pages in epilot 360, for example to show data from an external system next to a contact, a contract or an order.

Your interface is a small web app. It runs in an iframe and uses the App Bridge to get a token, the user's language and the entity being viewed.

Where it appears​

The type of the capability decides where it is shown on the entity page:

TypeWhere it appears
tabAs a tab of its own next to the entity's built-in tabs. Gives you the most space
groupAs a collapsible section inside the entity's detail view
widgetAs a card in the entity's widget area

Creating an Entity Capability​

Add the component in the App Builder, or with the CLI:

epilot app add-component my-tab --type CUSTOM_CAPABILITY --capability-type tab

In the manifest it looks like this:

{
"id": "4f3c…",
"component_type": "CUSTOM_CAPABILITY",
"name": { "de": "Mein Tab", "en": "My Tab" },
"configuration": { "type": "tab", "allowed_schemas": ["contact", "opportunity"] },
"surfaces": { "capability_config": { "app_url": "./components/my-tab/dist/index.html" } },
"assets": { "zip": "./components/my-tab/dist/" }
}
FieldRequiredDescription
configuration.type—tab, group or widget. The CLI defaults to tab
configuration.allowed_schemas—The entity schemas the capability is offered on, e.g. contact. Leave it empty to offer it on all schemas
surfaces.capability_config.app_urlāœ“Entry file of your interface
assets.zipāœ“Directory that is uploaded on deploy

Implementing the interface​

Initialize the App Bridge and read the entity context:

import { initialize, getEntityContext, updateContentHeight } from '@epilot/app-bridge';

const { token, lang } = await initialize();
const { entityId, schema, entity } = await getEntityContext();

// render your interface, then tell epilot how tall it is
updateContentHeight(document.body.scrollHeight);

The context contains the full entity, so you usually don't need to fetch it yourself.

See App Surfaces for the details: keeping the height in sync, reacting to a tab becoming visible, reading app options and authorizing API clients.