AiAgentTurn
Wrapper returned by every conversational-agent mutation (workflow builder,
segment builder, future actions chat). The payload is the same union
persisted on ChatMessage rows, so the UI uses one renderer registry for
both live mutation responses and polled history. chatConversationId is
populated on the very first turn of a new session so the client can stash
it and switch into "resume" mode for subsequent calls.
type AiAgentTurn {
payload: ChatMessagePayload!
chatConversationId: ID
openBuild: AiAskOpenBuild
campaignBuildTurn: CampaignBuildTurnResult
}
Fields
AiAgentTurn.payload ● ChatMessagePayload! non-null union
AiAgentTurn.chatConversationId ● ID scalar
AiAgentTurn.openBuild ● AiAskOpenBuild object
Paminga IQ only: the build the chat has open once the turn ends, so the panel can re-show its questions under the latest message whatever the turn was about. Null on every other agent's turn, and when nothing is open.
AiAgentTurn.campaignBuildTurn ● CampaignBuildTurnResult object
Campaign Builder only: what the turn did to the plan. Null on every other agent's turn.
Returned By
aiAskTurn mutation ● aiCampaignBuildTurn mutation ● aiMarketingCampaignAgentTurn mutation ● aiSegmentBuilderChat mutation ● aiWorkflowAgentTurn mutation


