Amberflo · Arazzo Workflow

Amberflo Offboard Customer If No Invoices

Version 1.0.0

Look up a customer, check for invoices, and delete them only when none exist.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub Usage-Based BillingMeteringFinOpsAI Cost ManagementBillingMonetizationArazzoWorkflows

Provider

amberflo

Workflows

offboard-customer-if-no-invoices
Delete a customer only when they have no invoices.
Resolves a customer, lists their invoices, and deletes the customer when the invoice list is empty; otherwise it ends without deleting.
3 steps inputs: apiKey, customerId outputs: customerId, deletedCustomerId
1
getCustomer
Retrieve the customer by ID to confirm it exists before evaluating.
2
listInvoices
List the customer's invoices, branching on whether any exist.
3
deleteCustomer
Delete the customer because they have no invoices on record.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Amberflo Offboard Customer If No Invoices
  summary: Look up a customer, check for invoices, and delete them only when none exist.
  description: >-
    A safe offboarding flow that prevents deleting customers that still have
    billing history. It resolves the customer, lists their invoices, and branches:
    when no invoices are present it deletes the customer, otherwise it stops and
    leaves the customer in place. Every step spells out its request inline so the
    flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
sourceDescriptions:
- name: customersApi
  url: ../openapi/amberflo-customers-api-openapi.yml
  type: openapi
- name: invoicesApi
  url: ../openapi/amberflo-invoices-api-openapi.yml
  type: openapi
workflows:
- workflowId: offboard-customer-if-no-invoices
  summary: Delete a customer only when they have no invoices.
  description: >-
    Resolves a customer, lists their invoices, and deletes the customer when the
    invoice list is empty; otherwise it ends without deleting.
  inputs:
    type: object
    required:
    - apiKey
    - customerId
    properties:
      apiKey:
        type: string
        description: Amberflo API key supplied in the X-API-KEY header.
      customerId:
        type: string
        description: Unique identifier of the customer to evaluate for offboarding.
  steps:
  - stepId: getCustomer
    description: >-
      Retrieve the customer by ID to confirm it exists before evaluating.
    operationId: getCustomerById
    parameters:
    - name: X-API-KEY
      in: header
      value: $inputs.apiKey
    - name: customerId
      in: path
      value: $inputs.customerId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      customerId: $response.body#/customerId
  - stepId: listInvoices
    description: >-
      List the customer's invoices, branching on whether any exist.
    operationId: listInvoices
    parameters:
    - name: X-API-KEY
      in: header
      value: $inputs.apiKey
    - name: customerId
      in: query
      value: $steps.getCustomer.outputs.customerId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      invoices: $response.body
    onSuccess:
    - name: noInvoices
      type: goto
      stepId: deleteCustomer
      criteria:
      - context: $response.body
        condition: $.length == 0
        type: jsonpath
    - name: hasInvoices
      type: end
      criteria:
      - context: $response.body
        condition: $.length > 0
        type: jsonpath
  - stepId: deleteCustomer
    description: >-
      Delete the customer because they have no invoices on record.
    operationId: deleteCustomer
    parameters:
    - name: X-API-KEY
      in: header
      value: $inputs.apiKey
    - name: customerId
      in: path
      value: $steps.getCustomer.outputs.customerId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      deletedCustomerId: $steps.getCustomer.outputs.customerId
  outputs:
    customerId: $steps.getCustomer.outputs.customerId
    deletedCustomerId: $steps.deleteCustomer.outputs.deletedCustomerId

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/amberflo-offboard-customer-if-no-invoices-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.