Customer Flow

Replace a scripted flow's steps

Replaces a scripted flow's conversation graph with the tree you send. This is a full replace, not a merge: a step you omit is removed.

Include nodeId on a step to update the existing one, omit it to create a new step. Where two branches rejoin, keep the mergeIntoNodeIds references a read gave you. Dropping them un-merges those branches and is refused unless allowUnmerge is set.

A change to the set of paths re-seeds how the flow runs, which the response reports as variantsReshaped along with the resulting happy path and edge cases.

put/v1/customer-flow/{flowId}/graph

Path parameters

flowIdstring uuid required

Request body

allowUnmergeboolean

Confirms a write that drops branches which currently rejoin. Only needed when the request omits mergeIntoNodeIds references the flow already had; a faithful round trip never needs it.

Response

The flow graph after the write

Example response

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

Changes