Skip to main content
Ця сторінка також доступна українською.

Overview

When the AI assistant performs actions during a chat conversation, the backend signals the frontend via frontend_actions — an array of string values included in every chat message response.
{
  "role": "assistant",
  "content": "Done! I've updated the budget.",
  "frontend_actions": ["update_campaign_draft"]
}
The array can contain zero or more actions per message. Handle each one independently.

All actions

ActionContextWhen it’s sentWhat the frontend should do
enable_submit_buttonOnboarding onlyAssistant finished onboarding and the user can proceedEnable the “Submit” / “Continue” button
disable_submit_buttonOnboarding onlyAssistant needs more input before onboarding can completeDisable the submit button
update_campaign_draftCampaign wizardAssistant modified draft data (keywords, ad groups, RSAs, extensions, etc.)Re-fetch the campaign draft from the API to show updated data
set_campaign_draft_step_1Campaign wizardAssistant wants to navigate to Step 1 (Campaign Settings)Switch the wizard UI to step 1
set_campaign_draft_step_2Campaign wizardAssistant wants to navigate to Step 2 (Ad Groups)Switch the wizard UI to step 2
set_campaign_draft_step_3Campaign wizardAssistant wants to navigate to Step 3 (Ads / RSAs)Switch the wizard UI to step 3
set_campaign_draft_step_4Campaign wizardAssistant wants to navigate to Step 4 (Extensions)Switch the wizard UI to step 4
enable_submit_button and disable_submit_button are used exclusively in the onboarding flow. They are not related to campaign creation. Do not confuse them with campaign wizard actions.

Handling details

update_campaign_draft

This is the most common action. It fires whenever the assistant creates, updates, or deletes any part of a draft — ad groups, keywords, RSAs, extensions, bidding strategy, etc. Expected behavior: re-fetch the full draft via GET /api/v1/campaigns/drafts/{id} and update the wizard UI with the fresh data.

enable_submit_button / disable_submit_button

These actions are onboarding-specific. The assistant toggles the submit button during the onboarding conversation flow. They are not sent during campaign creation.

set_campaign_draft_step_N (new)

Pure navigation signals. The assistant sends these when it wants to direct the user’s attention to a specific wizard tab — e.g., after editing keywords it may navigate to Step 2 so the user can review. Expected behavior: switch the active tab to step N (1–4). No data refetch needed — these are often sent alongside update_campaign_draft, which already handles the data refresh.

Example: multiple actions in one message

The assistant can send several actions at once. For example, after editing keywords and wanting to show the Ad Groups tab:
{
  "role": "assistant",
  "content": "I've added 5 keywords to the 'Brand' ad group. Take a look!",
  "frontend_actions": [
    "update_campaign_draft",
    "set_campaign_draft_step_2"
  ]
}
Process both: re-fetch the draft and switch to step 2.