Customer Flow

Update a customer flow

Changed on

Updates a flow's title, description, branching mode, linked agents or flow-level expectations. The step graph is replaced through PUT /graph.

put/v1/customer-flow/{flowId}

Request

  • Base URL
    https://api.roark.ai
  • URL
    https://api.roark.ai/v1/customer-flow/{flowId}
  • Auth
    HTTP bearer

Path parameters

flowIdstring uuid required

Request body

titlestring
descriptionstring nullable
scriptAdherence'LOOSE' | 'STRICT'

Scripted flows only. How closely a run follows the script. LOOSE (default) hands the whole script to the simulated customer as one prompt; it keeps the call moving whatever your agent says. STRICT runs the script as a state machine on the agent service: at every agent step the simulated customer waits, silent, until your agent has said the expected line, and only then moves on. Scripted flows only; STRICT needs the agent-service transport and is not available on realtime models.

branchingMode'DETERMINISTIC' | 'ADAPTIVE'

Scripted flows only. How a run walks the graph. DETERMINISTIC ("Simulate every path" in the app) places one call per variant, each following its path exactly whatever the agent says. ADAPTIVE ("Adapt to your agent") collapses the paths into one call PER PERSONA, on which the simulated customer picks a branch from what the agent actually said. Both modes speak the exact authored lines, and neither changes how metrics or expectations grade.

agentIdsstring[]

Replaces the linked agents. Omit to leave them unchanged. An improv flow must keep at least one; a scripted flow can be left with none.

Example request

{
  "agentExpectations": [
    {
      "prompt": "The agent confirmed the new appointment time back to the customer"
    }
  ]
}

Response

The updated customer flow

Example response

{
  "data": {
    "happyPath": {
      "personaOverride": {
        "backstoryPrompt": "A busy professional calling during lunch break",
        "properties": {
          "age": 35,
          "zipCode": "94105",
          "occupation": "Software Engineer"
        },
        "phoneNumber": "+19312830919"
      }
    },
    "edgeCases": [
      {
        "personaOverride": {
          "backstoryPrompt": "A busy professional calling during lunch break",
          "properties": {
            "age": 35,
            "zipCode": "94105",
            "occupation": "Software Engineer"
          },
          "phoneNumber": "+19312830919"
        }
      }
    ]
  }
}

Changes

    • info

      added the required property //// to the response with the status

    • info

      added the required property ///// to the response with the status

    • info

      added the required property //// to the response with the status

    • info

      added the required property ///// to the response with the status

    • info

      added the required property //// to the response with the status

    • info

      added the required property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property /////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ////// to the response with the status