Components
Kind: view (fills its container) · Session key: purchaseInbox · React: <FinBazePurchaseInbox />
Create the session#
mutation {
createEmbedSession(input: {
companyId: "…"
user: { externalUserId: "…" }
components: { purchaseInbox: { enabled: true } }
}) { clientSecret }
}
Requirements#
The company must have these features effective: process_documents. A hidden feature makes createEmbedSession fail with FEATURE_DISABLED.
Component features#
Switch these off per session with components.purchaseInbox.features.
| Feature | Default |
|---|---|
upload | on |
approve | on |
emailForwarding | on |
Options#
Passed to instance.create("purchase-inbox", options) or as props.
| Option | Type | |
|---|---|---|
tab | "inbox" | "processed" | Initial tab. |
Every component also takes appearance and navigation ("internal" or "external").
Events#
| Event | React prop |
|---|---|
ready | onReady |
navigate | onNavigate |
error | onError |
document.uploaded | onDocumentUploaded |
document.processed | onDocumentProcessed |
Use it#
import { FinBazePurchaseInbox } from "@finbaze/embed-react";
<FinBazePurchaseInbox />
const component = instance.create("purchase-inbox");
component.mount("#finbaze");