Allocate OpenMic voice costs by agent in PostgreSQL

Record the USD cost of completed OpenMic phone calls by internal cost center, with separate speech and language-model costs.

7 stepsFinanceOperations

Free to start, no card required.

How it works

  1. When this happens

    Receive the completed call reference

    OpenMic AI

  2. Step 1 · Code

    Check the OpenMic call reference

  3. Step 2

    Check for a completed call report

    Follows the first path that matches

    • Completed call reference

      1. Step 3 · OpenMic AI

        Read itemized call costs

      2. Step 4 · Code

        Verify the call and its USD costs

      3. Step 5

        Check for an ended phone call

        Follows the first path that matches

        • Ended phone call with costs

          1. Step 6 · Postgres

            Assign costs to the agent’s cost center

        • Otherwise

          Nothing happens

    • Otherwise

      Nothing happens

Before you start

Set the post-call webhook on the OpenMic agents and use a PostgreSQL connection for this OpenMic workspace. Grant read access to voice_cost_centers(agent_id text primary key, cost_center text) and add one mapping per agent. Grant SELECT and INSERT on voice_call_costs(call_id text primary key, agent_id text, cost_center text, ended_at timestamptz, total_usd numeric, llm_usd numeric, tts_usd numeric, stt_usd numeric).

Accounts to connect

See all 200 in Finance

Your first automationstarts with one sentence.

Start free with 1,000 credits, no card needed. Rather have it done for you? Our team builds it.

Use template