Trying to centralize some common logic using the Architect Common Modules feature. The idea is to have a single shared flow that handles IVR menu navigation, then call that from three different inbound call flows to keep maintenance sane.
I’m building this via the Architect API (POST /api/v2/architect/flows) rather than the UI, since I need to version control the JSON.
The issue is referencing the common module inside the inbound flow’s JSON. I’ve got the common module deployed and I have its id. When I try to add a common_module node type in the inbound flow definition, the validation passes, but when I test the flow, the call just drops. The trace shows the flow engine can’t resolve the target.
Here’s the snippet I’m injecting into the inbound flow’s nodes array:
{
"id": "start_common",
"label": "Start Common Module",
"type": "common_module",
"events": [
{
"id": "1",
"type": "onEnter",
"nextNode": "common_module_ref",
"conditions": [],
"actions": []
}
],
"properties": {
"targetFlowId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"inputParameters": {
"callerNumber": "${contact.attributes.callerNumber}"
}
}
}
I’ve double-checked the targetFlowId. It matches the ID returned from GET /api/v2/architect/flows for the common module. The common module itself is valid and tested independently. The inbound flow works fine if I replace this node with a standard transfer node.
Is there a specific permission scope I’m missing for the API user creating the flow? Or is the JSON structure for common_module nodes different than what I’ve pieced together from the docs? The docs are pretty light on the exact property keys for this node type.
Also, does the common module need to be in a specific environment to be referenced? Everything is in the same org and environment.