You can streamline your Data Zone management by setting the Active Slot property directly from your Flow response, eliminating redundant structure and complexity.
When a Flow is attached to a Data Zone, you can tell the Data Zone which child content to display (like a Spinner or the main Repeater) by returning the activeSlot property in your JSON response.
- The correct, clean pattern is to place the
activeSlotproperty at the root level of the JSON, outside of thedataobject. - This allows the Data Zone to handle both state switching and data delivery in a single, simple response, avoiding the unnecessary creation of multiple, nested Data Zones.
The Clean Flow Response
To enable both state switching and data fetching, structure your successful Flow response as follows. The activeSlot property tells the Data Zone which component to display, while the data object passes the actual payload:
JSON
{
"activeSlot": "TheNameOfTheSlotToDisplay",
"data": {
"key": "value"
}
}
By ensuring activeSlot is returned as a peer to the data object, the Data Zone will successfully set its state and display the correct child component that has a matching Slot property value.
