# How to Integrate Retool with Dext (formerly Receipt Bank)

- Tool: Retool
- Difficulty: Intermediate
- Time required: 25 minutes
- Last updated: April 2026

## TL;DR

Connect Retool to Dext (formerly Receipt Bank) via a REST API Resource using Dext's API key authentication. Dext provides OCR-powered receipt and invoice processing; connecting it to Retool lets you build receipt management dashboards, supplier rule panels, and accounting export workflows. Configure the REST API Resource with Dext's base URL and API key header, then query processed documents, suppliers, and client accounts to build a centralized receipt operations panel.

## Why connect Retool to Dext?

Dext excels at the OCR and data extraction layer of expense management — capturing receipts via mobile app, email, or direct upload and turning them into structured records. However, finance teams often need to work with this data in context: reviewing documents before export, applying bulk supplier categorization rules, auditing processing status across multiple client accounts, or reconciling Dext records against accounting software data. Dext's native interface handles individual document review well, but cross-account operations and custom reporting require connecting to the API.

For accounting firms managing multiple Dext client accounts, Retool provides the multi-account operations layer that Dext's native UI cannot offer. A single Retool dashboard can query documents across all client accounts simultaneously, flag items that have been in Dext for more than 48 hours without being exported to QuickBooks or Xero, and allow finance staff to bulk-approve or reject items in a Table with inline editing rather than reviewing them one by one in Dext.

The Dext API provides access to documents (the core data type — each processed receipt or invoice), suppliers (entity recognition and categorization rules), and client account management endpoints. Document records include OCR-extracted fields like total amount, currency, date, vendor name, and category, alongside processing metadata like upload date, processing status, and export status. This structured data is ideal for building exception reports and audit dashboards in Retool that highlight unprocessed items, duplicate detection results, and export failures.

## Before you start

- A Dext account with API access enabled (API access may require a specific Dext plan — check with your Dext account manager)
- Your Dext API key (generated in Dext account settings under Integrations or API)
- At least one client account configured in Dext with documents available for testing
- Familiarity with Retool's REST API Resource configuration
- A Retool account with Resource creation permissions

## Step-by-step guide

### 1. Generate a Dext API key and note the API base URL

Log in to your Dext account at app.dext.com. Navigate to Account Settings — this is typically accessible from the top-right profile menu or the Settings link in the navigation. Look for an Integrations, API Access, or Developer Settings section. In this section, you should find the option to generate or view your API key. Click Generate New Key or copy the existing API key. Treat this key like a password — it provides full access to all document data and client accounts in your Dext organization. Note the Dext API base URL. As of 2024, Dext uses https://api.dext.com/v1 as the base URL for REST API calls. Confirm the current base URL in Dext's official API documentation at developer.dext.com, as API versioning may have updated this. Also note the authentication scheme — Dext uses an Authorization header with the format Authorization: {your-api-key}. Some Dext API versions use a custom header like X-Auth-Token instead of the standard Authorization header — check the documentation for the exact header name and value format required. Store the API key securely — you will add it to Retool as a configuration variable rather than hardcoding it in the Resource settings.

**Expected result:** You have your Dext API key and the confirmed API base URL. The API key is stored securely and ready to be added to Retool as a configuration variable.

### 2. Configure the Dext REST API Resource in Retool

In Retool, click the Resources tab in the left sidebar and click Add Resource. Select REST API from the resource type list. Name the Resource Dext API or Receipt Bank API (either is recognizable to your team). In the Base URL field, enter https://api.dext.com/v1. In the Headers section, add the authentication header that Dext requires. Click Add Header. Set the Name to Authorization and the Value to {{ config.DEXT_API_KEY }}. Before saving the Resource, create the configuration variable: go to Settings → Configuration Variables in Retool, click Add variable, name it DEXT_API_KEY, paste your Dext API key as the value, and check the Mark as secret checkbox. Marking it as secret prevents the key from being accessible in frontend JavaScript or app context. Return to the Resource configuration. If Dext's API documentation specifies a different header (such as X-Auth-Token), use that name instead of Authorization. Also confirm whether the value should be just the raw key, or if it needs a prefix like Token {key} or Bearer {key} — check the exact format in Dext's documentation. Add a second header: Content-Type with value application/json — this is needed for POST and PATCH requests and does not hurt GET requests. Click Save to save the Resource. The Resource is now ready for creating queries.

**Expected result:** The Dext REST API Resource is saved in Retool with the base URL and API key authorization header. A test query to the accounts or clients endpoint returns a successful response with your organization's data.

### 3. Query documents from Dext and build the primary data layer

Create your first meaningful query targeting the documents endpoint. In your Retool app, open the Code panel and click Create new query. Select the Dext API Resource. Set Method to GET. In the Path field, enter /documents — this is the primary endpoint for processed receipts and invoices. In the URL Parameters section, add filtering parameters. Dext's API typically supports: client_id (filter by specific client account), status (filter by processing status — values like 'published', 'pending', 'processing', 'failed'), date_from and date_to (date range in YYYY-MM-DD format), and page and per_page for pagination. Wire the date parameters to a DateRangePicker component using {{ dateRangePicker.startDate }} and {{ dateRangePicker.endDate }}. If querying across multiple client accounts, you may need to create one query per client or query without the client_id filter to get all documents, then filter client-side in a transformer. Set the query Run mode to Manual (triggered by button) for initial setup. Run the query and examine the raw response. Dext document records typically include: id, date, amount, currency, supplier_name, category, account_code, status, export_status, upload_date, and thumbnail_url. Write a JavaScript transformer in the query's Advanced → Transform panel to flatten and normalize this data for a Retool Table.

```
// JavaScript transformer for Dext documents API response
// Adjust field paths based on actual Dext API response structure
const raw = data;
const docs = raw?.documents || raw?.data || raw?.items || raw || [];

if (!Array.isArray(docs)) return [];

return docs.map(doc => {
  const amount = parseFloat(doc.total || doc.amount || 0);
  const uploadDate = doc.uploaded_at || doc.created_at || doc.upload_date || '';
  const docDate = doc.date || doc.document_date || '';
  const hoursSinceUpload = uploadDate
    ? Math.floor((Date.now() - new Date(uploadDate)) / 3600000)
    : null;

  return {
    id: doc.id || doc.document_id || '',
    supplier: doc.supplier_name || doc.merchant || doc.vendor || 'Unknown',
    amount: amount ? `${doc.currency || 'USD'} ${amount.toFixed(2)}` : 'N/A',
    amount_raw: amount,
    currency: doc.currency || 'USD',
    document_date: docDate,
    upload_date: uploadDate,
    hours_pending: hoursSinceUpload,
    status: doc.status || doc.processing_status || 'unknown',
    export_status: doc.export_status || doc.exported || 'not_exported',
    category: doc.category || doc.expense_category || '',
    account_code: doc.account_code || '',
    client_id: doc.client_id || doc.company_id || '',
    client_name: doc.client_name || doc.company_name || '',
    thumbnail: doc.thumbnail_url || doc.image_url || '',
    is_overdue: hoursSinceUpload !== null && hoursSinceUpload > 72
  };
});
```

**Expected result:** The documents query returns a flat array of receipt and invoice records with supplier name, amount, date, processing status, and export status. The data is ready to bind to a Retool Table.

### 4. Build the document review dashboard UI

With the documents query returning data, build the dashboard. At the top of the canvas, add a filter bar in a Container. Add a DateRangePicker component for filtering by document date or upload date. Add a Select component named statusFilter with options: All, Published, Pending, Failed — and wire its value to the status URL parameter in your query. Add a Select component named clientFilter populated from a separate query to /clients that lists all client accounts, and wire its value to the client_id URL parameter. Add a Button labeled Refresh Documents with an event handler to trigger the documents query. Below the filter bar, drag a Table component onto the canvas. Set its Data source to {{ getDextDocuments.data }}. Configure columns: Supplier (text), Amount (text), Document Date (date), Upload Date (date), Status (tag — use green for published/exported, yellow for pending, red for failed), Client (text), Category (text). Enable conditional formatting: highlight rows where is_overdue is true with a light red background. This flags documents that have been pending for more than 72 hours. Add Row click event to trigger a detail query at /documents/{{ documentsTable.selectedRow.id }} and show results in a right-side Container with all extracted OCR fields and a link to view the original document image at the thumbnail URL. At the top of the dashboard, add three Stat components: Total Documents ({{ getDextDocuments.data.length }}), Pending Export ({{ getDextDocuments.data.filter(d => d.export_status === 'not_exported').length }}), and Overdue Items ({{ getDextDocuments.data.filter(d => d.is_overdue).length }}).

**Expected result:** A functional document review dashboard shows filtered Dext documents in a Table with status indicators, overdue highlighting, and summary Stat components. A detail panel opens when a document row is selected.

### 5. Add supplier management and export workflow capabilities

Extend the dashboard with supplier management and export tracking. Create a second section or tab in the Retool app for Supplier Rules. Create a query at /suppliers or /supplier-rules with the selected client's ID as a parameter. Display supplier rules in a Table with columns for supplier name, category, account code, and tax code. Enable inline editing on the category and account code columns so finance staff can update categorization rules directly in the Table. Add a Save Changes button that triggers a PATCH or PUT query to /suppliers/{{ suppliersTable.selectedRow.id }} with a body using {{ suppliersTable.changesetObject }} to send only the changed values back to Dext. For the export workflow, add a section tracking export status over time. Create a query that counts documents by export_status using a JavaScript transformer on the documents data, and display the results in a Chart component (bar chart showing published vs. pending vs. failed counts). Add a Workflows integration point: create a Retool Workflow (separate from the app) that runs on a schedule and sends a Slack notification when the count of pending documents exceeds a threshold. For accounting firms managing complex multi-client Dext environments with custom export rules and reconciliation workflows, RapidDev's team can help architect a comprehensive Retool solution.

```
// PATCH query body for updating a supplier rule
// Method: PATCH
// Path: /suppliers/{{ suppliersTable.selectedRow.id }}
// Body type: JSON
{
  "category": "{{ suppliersTable.selectedRow.category }}",
  "account_code": "{{ suppliersTable.selectedRow.account_code }}",
  "tax_code": "{{ suppliersTable.selectedRow.tax_code }}",
  "description": "{{ suppliersTable.selectedRow.description }}"
}
```

**Expected result:** The dashboard includes a supplier rules Table with inline editing and a Save Changes button that successfully updates supplier categorization in Dext. Export status tracking shows document processing pipeline health across client accounts.

## Best practices

- Store the Dext API key in a Retool configuration variable marked as secret (Settings → Configuration Variables) rather than embedding it directly in the Resource — this enables key rotation without editing the Resource and prevents exposure in frontend context.
- Build document queries with explicit status filters and date range limits rather than fetching all documents — Dext accounts can accumulate thousands of documents, and unbounded queries will be slow and may hit API rate limits.
- Use Retool Table conditional formatting to highlight overdue documents (pending for more than 48-72 hours) in red — this turns the dashboard into a proactive exception management tool rather than a passive list view.
- Create separate queries for each client account if managing multiple Dext clients, and use a Tab component or Select dropdown to switch between clients — this keeps individual queries fast and avoids cross-client data mixing.
- Combine Dext document data with accounting software data (QuickBooks or Xero via their own Retool Resources) to build a reconciliation dashboard that identifies documents in Dext that have not yet appeared in the accounting system.
- Add Retool query caching (5-minute cache) for supplier rules queries since supplier categorization data changes infrequently — this reduces API load when multiple finance staff use the dashboard simultaneously.
- Use Retool Workflows to schedule automated checks for stalled documents rather than requiring manual monitoring — a nightly workflow that counts pending documents older than 24 hours and posts to Slack creates a proactive alert system.

## Use cases

### Multi-client document review panel for accounting firms

Build a Retool dashboard that queries unprocessed Dext documents across all client accounts, displays them in a unified Table with client name, document date, vendor, amount, and processing status. Finance staff can filter by client account, date range, or document type. Selecting a document row shows the extracted OCR data alongside the document image URL, allowing quick review without opening Dext for each item individually.

Prompt example:

```
Build a Retool document review panel that queries the Dext API for all documents across client accounts filtered by status 'pending' or 'processing'. Show a Table with columns for client name, document date, vendor, amount, currency, and status. Add a date range picker filter and client account Select dropdown at the top. When a row is selected, show a detail panel with all extracted document fields and a link to view the source document.
```

### Supplier rules management dashboard

Create a Retool panel for managing Dext supplier categorization rules across client accounts. Query supplier rules from the Dext API, display them in an editable Table with supplier name, category mapping, tax code, and account code columns. Allow finance managers to update category assignments and tax codes directly in the Table with inline editing, and submit updates back to the Dext API via a Save button with a POST query.

Prompt example:

```
Build a Retool supplier rules manager that queries the Dext API for all supplier rules for a selected client account. Show an editable Table with supplier name, description, category, tax rate, and account code. Add a Save Changes button that sends the modified supplier rules back to the Dext API. Include a search text input that filters the table client-side by supplier name.
```

### Receipt export status and reconciliation dashboard

Build an export status dashboard that tracks which Dext documents have been successfully exported to accounting software versus those stuck in a pending state. Query Dext for all documents in a date range, group them by export status, and show counts and totals in Stat components. Display unexported items in a Table with days-since-upload calculated, highlighting items older than 3 days in red using conditional formatting.

Prompt example:

```
Build a Retool export status dashboard that queries Dext documents for a selected client account and date range. Show Stat components for total documents, exported count, and pending count. Display a Table of pending (not yet exported) documents sorted by upload date ascending, with conditional formatting highlighting rows older than 72 hours in red. Include a button to manually trigger export for selected documents.
```

## Troubleshooting

### API returns 401 Unauthorized despite entering the API key correctly

Cause: The Authorization header format is incorrect — Dext may require a specific prefix (such as Token or Bearer) before the API key, or the API uses a custom header name like X-Auth-Token rather than Authorization.

Solution: Check Dext's official API documentation at developer.dext.com for the exact authentication header name and value format. Common formats include Authorization: Token {key}, Authorization: Bearer {key}, or a custom header like X-Dext-Api-Key: {key}. Update the Resource header configuration in Retool to match the exact format specified in the documentation.

### Documents query returns an empty array but Dext shows documents in the web interface

Cause: The query is filtered to a specific client_id that does not match the account containing the documents, or the status filter is excluding documents that are in a different status than expected.

Solution: Remove all URL parameters from the documents query temporarily and run it without filters to see all documents. Gradually add filters back to identify which parameter is causing the empty result. Verify the client_id values available by querying the /clients endpoint first and confirming which client accounts have documents.

### Transformer shows 'Cannot read property of undefined' for document fields like supplier_name or total

Cause: Dext's API response wraps documents in a parent object and uses different field names than expected — the exact field names vary between Dext API versions.

Solution: Temporarily set the transformer to return data; and examine the exact JSON structure in Retool's query result panel. Look for the actual field names used (e.g., merchant instead of supplier_name, or net_amount instead of total). Update the transformer to use the correct field paths found in the actual response.

```
// Debug: return raw response to inspect field names
return data;
// Check the query result panel for actual field names and response structure
```

### PATCH query to update supplier rules returns 404 Not Found

Cause: The supplier ID used in the endpoint path is incorrect, or the endpoint for updating suppliers uses a different URL structure (such as /clients/{client_id}/suppliers/{supplier_id} with client scoping).

Solution: Check the Dext API documentation for the exact endpoint path format for supplier updates. Many Dext API endpoints are scoped under a client ID path prefix. Ensure the full path includes the client_id if required: /clients/{{ clientFilter.value }}/suppliers/{{ suppliersTable.selectedRow.id }}.

## Frequently asked questions

### Does Dext provide a public REST API for all account tiers?

Dext's API access is not available on all pricing tiers — it is typically included in higher-tier plans aimed at accounting firms and enterprise customers. If you do not see API settings in your Dext account, contact Dext support or your account manager to confirm whether API access is included in your current plan and request it to be enabled if needed.

### Can Retool write data back to Dext, or is it read-only?

Retool can both read from and write to Dext's API, depending on the endpoints available. Common write operations include updating supplier categorization rules, updating document categories or account codes, and triggering document exports to connected accounting software. Use POST and PATCH queries in Retool targeting the appropriate Dext endpoints, and always add confirmation dialogs before write operations.

### How does Dext compare to direct accounting software integration in Retool?

Dext handles the receipt capture and OCR layer — turning paper receipts and PDFs into structured data. Accounting software like QuickBooks and Xero holds the finalized, reconciled financial records. A complete Retool accounting dashboard for an accounting firm would ideally connect to both: Dext for tracking incoming receipt processing and exception management, and QuickBooks or Xero for finalized transaction data and reporting.

### Can I access multiple client Dext accounts from a single Retool Resource?

Yes — if your Dext account is an accounting firm account with multiple client sub-accounts, the API key authenticates at the firm level and can access all client accounts. Use the client_id URL parameter in your queries to filter documents to specific clients, and populate a Select component with client options from a /clients query to make the dashboard multi-client capable.

### How do I handle Dext's pagination for large document volumes?

Dext's API typically uses page and per_page parameters for pagination. Set per_page to 100 (or the maximum allowed) and wire the page parameter to a Retool Pagination component. For dashboards that need to export or process all documents (not just one page), use a Retool Workflow with a Loop block that iterates through pages until the API returns an empty results set, collecting all documents into a combined dataset.

---

Source: https://www.rapidevelopers.com/retool-integrations/receipt-bank-now-dext
© RapidDev — https://www.rapidevelopers.com/retool-integrations/receipt-bank-now-dext
