SDK customization
Learn how to customize the components on the Monite React SDK.
Overview
The Monite components use the default settings by default. However, there are scenarios where you can to customize this settings to match the needs of your business.
Below, see a component settings object, with its parameters and default values. This object must be inserted into the <MoniteProvider>
component:
1 const componentSettings = { 2 general: {}, 3 approvalPolicies: { 4 pageSizeOptions: [20, 50, 100] 5 }, 6 approvalRequests: { 7 pageSizeOptions: [20, 50, 100] 8 }, 9 counterparts: { 10 pageSizeOptions: [20, 50, 100], 11 customerTypes: ["customer", "vendor"] 12 }, 13 payables: { 14 pageSizeOptions: [20, 50, 100], 15 isShowingSummaryCards: true, 16 fieldOrder: ["document_id", "counterpart_id", "created_at", "due_date", "status", "amount", "amount_paid", "pay"], 17 summaryCardFilters: { 18 "Overdue Invoices": { 19 status__in: ["waiting_to_be_paid"], 20 overdue: true 21 }, 22 "High-Value Invoices": { 23 amount__gte: 10000 24 } 25 }, 26 requiredColumns: ["document_id"], 27 optionalFields: { 28 invoiceDate: true, 29 tags: true 30 }, 31 ocrRequiredFields: { 32 currency: true, 33 invoiceDate: true, 34 counterpart: true, 35 invoiceNumber: true, 36 counterpartBankAccount: true, 37 document_issued_at_date: true, 38 dueDate: true, 39 tags: true, 40 counterpartName: true, 41 contactPerson: true, 42 issueDate: true, 43 amount: true, 44 appliedPolicy: true, 45 addedByUser: true, 46 addedOn: true, 47 updatedOn: true 48 }, 49 ocrMismatchFields: { 50 amount_to_pay: true, 51 counterpart_bank_account_id: true 52 }, 53 isTagsDisabled: false 54 }, 55 products: { 56 pageSizeOptions: [20, 50, 100] 57 }, 58 receivables: { 59 pageSizeOptions: [20, 50, 100], 60 tab: 0, 61 tabs: [ 62 { 63 label: "Invoices", 64 query: { type: "invoice" }, 65 filters: ["document_id__contains", "counterpart_id", "due_date__lte"] 66 }, 67 { 68 label: "Quotes", 69 query: { type: "quote" } 70 }, 71 { 72 label: "Credit notes", 73 query: { type: "credit_note" } 74 }, 75 { 76 label: "Financing", 77 query: { type: "financing" } 78 } 79 ], 80 onCreate: (receivableId) => {}, 81 onUpdate: (receivableId, invoice) => {}, 82 onDelete: (receivableId) => {}, 83 onInvoiceSent: (invoiceId) => {}, 84 enableEntityBankAccount: false, 85 bankAccountCountries: ["US", "DE", "GB"], 86 bankAccountCurrencies: ["USD", "EUR", "GBP"] 87 }, 88 tags: { 89 pageSizeOptions: [20, 50, 100] 90 }, 91 userRoles: { 92 pageSizeOptions: [20, 50, 100] 93 }, 94 onboarding: { 95 footerLogoUrl: "https://example.com/logo.png", 96 footerWebsiteUrl: "https://example.com", 97 hideFooter: false, 98 showContinueButton: false, 99 allowedCurrencies: ["USD", "EUR", "GBP"], 100 allowedCountries: ["US", "DE", "GB"], 101 onComplete: () => {}, 102 onContinue: () => {}, 103 onWorkingCapitalOnboardingComplete: (entityId) => {} 104 }, 105 financing: { 106 enableFinanceWidgetButton: true 107 } 108 };
Components settings
This table lists all configurable SDK components with their properties, descriptions, and default values. Use it as a reference to customize the SDK for your needs.
general
Property | Description | Default |
---|---|---|
No properties defined | Empty configuration object | {} |
approvalPolicies
Property | Description | Default |
---|---|---|
pageSizeOptions | Table results per page options | [20, 50, 100] |
approvalRequests
Property | Description | Default |
---|---|---|
pageSizeOptions | Table results per page options | [20, 50, 100] |
counterparts
Property | Description | Default |
---|---|---|
pageSizeOptions | Table results per page options | [20, 50, 100] |
customerTypes | Customer types supported in counterpart forms | ["customer", "vendor"] |
payables
Property | Description | Default |
---|---|---|
pageSizeOptions | Table results per page options | [20, 50, 100] |
isShowingSummaryCards | Show/hide summary cards on table view | true |
fieldOrder | Table columns order | ["document_id", "counterpart_id", "created_at", "due_date", "status", "amount", "amount_paid", "pay"] |
summaryCardFilters | Predefined filters for summary cards | Object with "Overdue Invoices" and "High-Value Invoices" filters |
requiredColumns | Required columns in the table | ["document_id"] |
optionalFields | Optional fields configuration | { invoiceDate: true, tags: true } |
ocrRequiredFields | Required fields for OCR processing | Object with multiple fields set to true (currency, invoiceDate, counterpart, etc.) |
ocrMismatchFields | Fields to check for OCR mismatches | { amount_to_pay: true, counterpart_bank_account_id: true } |
isTagsDisabled | Enable/disable tags functionality | false |
products
Property | Description | Default |
---|---|---|
pageSizeOptions | Table results per page options | [20, 50, 100] |
receivables
Property | Description | Default |
---|---|---|
pageSizeOptions | Table results per page options | [20, 50, 100] |
tab | Index of default open tab | 0 |
tabs | Tabs displayed in the invoicing table. Note: the Financing tab might not show if the entity is in an unsupported country | Array with Invoices, Quotes, Credit notes, and Financing tabs |
onCreate | Callback function when receivable is created | (receivableId) => {} |
onUpdate | Callback function when receivable is updated | (receivableId, invoice) => {} |
onDelete | Callback function when receivable is deleted | (receivableId) => {} |
onInvoiceSent | Callback function when invoice is sent | (invoiceId) => {} |
enableEntityBankAccount | Enable entity bank account feature | false |
bankAccountCountries | Supported countries for bank accounts | ["US", "DE", "GB"] |
bankAccountCurrencies | Supported currencies for bank accounts | ["USD", "EUR", "GBP"] |
tags
Property | Description | Default |
---|---|---|
pageSizeOptions | Table results per page options | [20, 50, 100] |
userRoles
Property | Description | Default |
---|---|---|
pageSizeOptions | Table results per page options | [20, 50, 100] |
onboarding
Property | Description | Default |
---|---|---|
footerLogoUrl | URL for footer logo | "https://example.com/logo.png" |
footerWebsiteUrl | URL for footer website link | "https://example.com" |
hideFooter | Show/hide footer | false |
showContinueButton | Show/hide continue button | false |
allowedCurrencies | Currencies allowed during onboarding | ["USD", "EUR", "GBP"] |
allowedCountries | Countries allowed during onboarding | ["US", "DE", "GB"] |
onComplete | Callback function when onboarding completes | () => {} |
onContinue | Callback function when continue is clicked | () => {} |
onWorkingCapitalOnboardingComplete | Callback when working capital onboarding completes | (entityId) => {} |
financing
Property | Description | Default |
---|---|---|
enableFinanceWidgetButton | Enable/disable finance widget button | true |