Components
Kind: view (fills its container) · Session key: customers · React: <FinBazeCustomers />
Create the session#
mutation {
createEmbedSession(input: {
companyId: "…"
user: { externalUserId: "…" }
components: { customers: { enabled: true } }
}) { clientSecret }
}
Requirements#
The company must have these features effective: relations. A hidden feature makes createEmbedSession fail with FEATURE_DISABLED.
Component features#
Switch these off per session with components.customers.features.
| Feature | Default |
|---|---|
create | on |
edit | on |
Options#
Passed to instance.create("customers", options) or as props.
| Option | Type | |
|---|---|---|
customerId | string | Open this customer instead of the list. |
Every component also takes appearance and navigation ("internal" or "external").
Events#
| Event | React prop |
|---|---|
ready | onReady |
navigate | onNavigate |
error | onError |
customer.created | onCustomerCreated |
customer.updated | onCustomerUpdated |
customer.selected | onCustomerSelected |
Use it#
import { FinBazeCustomers } from "@finbaze/embed-react";
<FinBazeCustomers />
const component = instance.create("customers");
component.mount("#finbaze");