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:
| Type | Where it appears |
|---|---|
tab | As a tab of its own next to the entity's built-in tabs. Gives you the most space |
group | As a collapsible section inside the entity's detail view |
widget | As 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/" }
}
| Field | Required | Description |
|---|---|---|
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.