Send Data To QBO
Creates or updates records in QuickBooks Online by sending structured data for a specified entity type, handling request formatting and error processing.
Introduction
The "Send Data To QBO" script provides a simplified interface for creating or updating records in QuickBooks Online (QBO). This script handles the complexity of sending data to QBO by constructing the appropriate API request, managing authentication, and processing the response.
This script is essential for integration workflows that need to push data from FileMaker to QuickBooks Online, such as creating new customers, invoices, or updating existing records.
Key Features
- Entity Type Flexibility: Works with any QBO entity type (Customer, Invoice, etc.)
- Structured Data Support: Accepts properly formatted JSON data for the specific entity type
- Standardized API Interaction: Handles all HTTP request formatting and authorization
- Consistent Error Handling: Provides clear error information if the API call fails
- Clean Response Format: Returns just the created/updated record data from QBO
Usage
To use this script, call it using the FileMaker "Perform Script" step:
Script Parameter
The script accepts a single JSON object parameter with the following properties:
| Property | Type | Description |
|---|---|---|
entity | string | The QuickBooks Online entity type (e.g., "Customer", "Invoice") |
record | object | The structured data in the correct format for the specified entity type |
Return Value
On success, the script returns the created or updated record as a JSON object, including any additional fields that QBO may have added (such as IDs or timestamps).
Error Handling
If an error occurs, the script returns an error object with the following structure:
| Property | Type | Description |
|---|---|---|
code | number | Error code |
message | string | A description of the error |
Implementation Details
The script follows this process flow:
- Parameter Validation: Verifies that required parameters are present
- Request Construction: Builds the API request with the appropriate path and data
- API Request: Uses the "Send QBO HTTP Request" script to send the data to QBO
- Response Processing: Extracts the returned entity data from the response
- Result Formatting: Returns the entity data to the calling script
Dependencies
This script depends on:
- The "Send QBO HTTP Request" script for making the actual API call
- Proper formatting of the record data according to QBO API specifications for each entity type
Example
Here's an example of creating a new customer in QBO: