Integration Patterns & Best Practices

Common implementation patterns, workflows, and troubleshooting

Provisioning Workflow

What Ottimate Configures (Before You Start)

During the onboarding process, Ottimate configures:

  1. Client Account - Top-level account entity with unique racc_ identifier
  2. Company Structure - One or more companies based on the client’s accounting structure
  3. Location Setup - All locations within each company
  4. Groups (if applicable) - Location groupings for multi-company accounts
  5. API Credentials - Client ID and Client Secret for OAuth authentication scoped to an API User
  6. Feature Enablement - Activates features based on client subscription (InstantCapture, Catalog Match, etc.)
  7. ERP Connection (if applicable) - Configures Ottimate-hosted ERP integrations

By the time you receive API credentials, your account structure is fully configured and ready for integration.

What You Verify First

After receiving your Sandbox credentials:

  1. Verify account structure - List companies and locations to understand the hierarchy
  2. Test API User scope - Confirm you can access all required companies/locations
  3. Map identifiers - Create a mapping between your system’s IDs and Ottimate’s company_id / location_id values
$# Step 1: List companies
$GET /v1/accounts/{account_id}/companies
$
$# Step 2: List locations
$GET /v1/accounts/{account_id}/locations
$
$# Step 3: Verify access to specific resources
$GET /v1/vendors?ottimate_company_id=123
$GET /v1/invoices?ottimate_company_id=123&ottimate_location_id=456

What You Configure via API

After verifying your account structure, you’ll typically:

  1. Sync Dimensions - Push or pull chart of accounts from the ERP
  2. Sync Vendors - Push or pull vendor list from the ERP
  3. Configure Catalog (optional) - Sync inventory items for catalog matching
  4. Test Invoice Creation - Create test invoices to validate the workflow

See Accounting Integration for detailed sync procedures.

Managing Changes

Change TypeMethod
Add/modify dimensionsAPI: POST /v1/dimensions or POST /v1/dimensions/bulk-create
Add/modify vendorsAPI: POST /v1/vendors or POST /v1/vendors/bulk-create
Add/modify catalog entriesAPI: POST /v1/catalog/entries or POST /v1/catalog/entries/bulk
Modify account structure (companies/locations/groups)Contact Ottimate Partner Manager
Change API User scopeContact Ottimate Partner Manager
Change ERP connectionContact Ottimate Partner Manager

Common Integration Patterns

Pattern 1: Single Company, Single Location

Use Case: Small business with centralized AP

Account: Small Business Inc
└── Company: Small Business Inc
└── Location: Headquarters

API Usage:

  • All requests use the same ottimate_company_id
  • All invoices use the same ottimate_location_id
  • Simplest integration pattern

Example:

$# All API calls use the same IDs
$POST /v1/invoices
${
> "ottimate_company_id": 123,
> "ottimate_location_id": 456,
> ...
>}

Pattern 2: Single Company, Multiple Locations

Use Case: Restaurant chain, retail chain, or multi-site business

Account: Restaurant Group
└── Company: Restaurant Group Inc
├── Location: Store #001
├── Location: Store #002
└── Location: Store #003

API Usage:

  • All requests use the same ottimate_company_id
  • Invoices are assigned to appropriate ottimate_location_id based on which location received the goods/services
  • Vendors and dimensions are shared across all locations

Integration Considerations:

  • Map your system’s location identifiers to Ottimate location IDs
  • Route invoices to correct location based on purchase order, delivery address, or other business logic
  • Users may be restricted to view only their assigned locations

Pattern 3: Multiple Companies

Use Case: Holding company, MSP managing multiple clients

Account: Holding Company
├── Company: Subsidiary A (NetSuite)
│ ├── Location: HQ
│ └── Location: Warehouse
└── Company: Subsidiary B (QuickBooks)
└── Location: Office

API Usage:

  • Each company has separate dimensions, vendors, and invoices
  • No data sharing between companies
  • Each company typically connects to a different ERP instance

Integration Considerations:

  • Maintain separate dimension/vendor mappings per company
  • Handle each company’s invoice workflow independently
  • May require separate sync schedules per company

Best Practices

  • Verify structure first - Before writing integration code, list all companies and locations to understand the account hierarchy and your API User’s access scope.
  • Document mappings - Maintain a clear mapping between your system’s identifiers and Ottimate’s company_id and location_id values.
  • Understand your API User scope - Test which companies/locations you can access. Don’t assume account-level access.
  • Cache company/location lists - Account structure rarely changes, so fetch once during initialization and cache locally.
  • Validate scope before creation - Always verify that ottimate_company_id and ottimate_location_id exist and are correctly paired before creating invoices.
  • Test with production structure - Ensure your Sandbox environment mirrors your production account structure for accurate testing.
  • Refresh mappings periodically - If your client adds new locations, implement a process to refresh your location mappings.

Next Steps

Now that you understand account structure and integration patterns, proceed to set up accounting data: