How to Write AI Agent Actions in ZazzyAgent System Prompts
ZazzyAgent AI Agents can do more than generate replies.
You can give an agent actions that allow it to update customer information, trigger automation, call APIs, work with ecommerce stores, assign conversations and perform other supported operations.
Actions are added directly inside the AI Agent's System Prompt.
The basic action format
Write an action using:
##action_name## : id
You do not normally need to manually discover the ID.
Use autocomplete
Inside the System Prompt editor, type:
##
The editor can show the available actions and connected resources.
Choose the action and select the resource you want to use.
The interface displays resource names, while the prompt stores the corresponding internal numeric ID.
The most important rule
Write the condition first. Put the action after it.
Bad:
##add_label## : 12
Better:
When the customer confirms that they are interested in purchasing,
add the Interested Buyer label.
##add_label## : 12
The first instruction explains when the action should happen.
The action tells ZazzyAgent what to execute.
Subscriber and automation actions
Add a label
##add_label## : 12
Use this when a customer should be placed into a specific labelled audience.
Example:
When the customer confirms that they want to purchase,
add the Interested Buyer label.
##add_label## : 12
Remove a label
##remove_label## : 12
Example:
When the customer confirms that they have completed the purchase,
remove the Interested Buyer label.
##remove_label## : 12
Assign a sequence
##assign_sequence## : 8
Use this when a conversation should start a follow-up sequence.
Example:
When the customer requests more information but is not ready to purchase,
start the Product Follow-up sequence.
##assign_sequence## : 8
Remove a sequence
##remove_sequence## : 8
Use this when the customer should leave an active sequence.
Example:
When the customer completes the purchase,
remove them from the pre-purchase follow-up sequence.
##remove_sequence## : 8
Save a custom field
##save_custom_field## : 42
Use this to save information collected during the conversation.
Example:
When the customer provides their preferred product category,
save the value to the Product Interest custom field.
##save_custom_field## : 42
HTTP API actions
HTTP API actions are useful when the AI needs information or needs to trigger something in another system.
Call an API and reply using selected response fields
##call_http_api## : 5 | reply_with_response | status, message
This can be used when the API response contains information the customer should receive.
Example:
When the customer asks for the status of their support request,
call the support-status API.
##call_http_api## : 5 | reply_with_response | status, message
The AI can then explain the returned information naturally.
Call an API and send a fixed reply
##call_http_api## : 5 | reply_with_static_reply | Thank you! We received your request.
This is useful when the API performs the task but the customer should receive a predefined confirmation.
Example:
When the customer submits a callback request,
call the callback API.
##call_http_api## : 5 | reply_with_static_reply | Thank you! We received your request.
Call an API without replying
##call_http_api## : 5 | no_reply
Use this when the action should happen silently.
Example:
When the customer updates their preferred callback time,
save the information through the callback API without sending
an additional customer message.
##call_http_api## : 5 | no_reply
Shopify actions
Shopify actions require the Shopify store to be selected first.
Connect the Shopify store
##shopify_store## : 12
You must select the connected Shopify store before using the Shopify actions that depend on it.
Check an order
##shopify_get_order_details##
Use this when the customer asks about an existing order.
Example:
When the customer asks for the status of an existing order,
ask for the order number if it has not already been provided,
then check the Shopify order.
##shopify_get_order_details##
Do not guess order information.
Recommend products
##shopify_recommend_products##
Example:
When the customer asks for product recommendations,
search the connected Shopify store and recommend relevant products.
##shopify_store## : 12
##shopify_recommend_products##
Update an order tag
##shopify_update_order_tag## : whatsapp-connected
This adds the exact configured tag to the Shopify order.
Use the exact tag value you want.
Cancel an order
##shopify_cancel_order##
Only use this when the customer clearly asks to cancel the order and the configured workflow allows the action.
Do not interpret vague statements as cancellation requests.
Shopify rule
Always configure the store first:
##shopify_store## : 12
Then use the Shopify actions.
WooCommerce actions
WooCommerce uses the same general concept.
Select the WooCommerce store
##woocommerce_store## : 12
Check an order
##woocommerce_get_order_details##
Recommend products
##woocommerce_recommend_products##
Add an order note
##woocommerce_update_order_note## : whatsapp-connected
The value after the colon should be the exact note you want added.
Cancel an order
##woocommerce_cancel_order##
Again, use cancellation only when the customer clearly requests it.
WooCommerce rule
Select the store before using WooCommerce actions:
##woocommerce_store## : 12
Human handoff actions
AI should not try to handle every conversation itself.
Assign to a specific team member
##assign_human_member## : 335
Example:
When the customer explicitly asks to speak with John,
assign the conversation to John.
##assign_human_member## : 335
Assign to a team role
##assign_human_role## : 3
This can be used when the customer should be assigned to an available member of a team role.
Example:
When the customer requests human sales assistance,
assign the conversation to an available sales team member.
##assign_human_role## : 3
Transfer to another AI Agent
##transfer_agent## : 18
Use this when a different AI specialist should take over.
Example:
If the customer changes from a product discussion to an
existing-order question, transfer the conversation to the Order Support Agent.
##transfer_agent## : 18
The underlying AI Agent system supports both AI-to-AI transfer and AI-to-human assignment.
Conversation control actions
Mark conversation as solved
##mark_as_solved##
Use this after the issue has actually been resolved.
Example:
When the customer's support question has been answered
and no further action is required, mark the conversation as solved.
##mark_as_solved##
Block a subscriber
##block_subscriber##
Use this only for genuine spam.
Examples:
Scam links
Repeated junk
Automated flooding
Clearly malicious messages
Do not use this action simply because a legitimate customer is angry.
Skip a reply
##skip_reply##
Use this when the agent should take no customer-facing action.
Example:
If the customer sends a message that does not require a response,
do not send an unnecessary reply.
##skip_reply##
Follow-up reminders
##follow_up## : 24
This sets an internal staff follow-up reminder for the specified number of hours from now.
Example:
When a customer asks for a callback tomorrow,
create an internal follow-up reminder for the appropriate time.
##follow_up## : 24
The reminder is for your team; it is not a customer-facing message.
Internal notes
##add_note## : Customer wants a callback
This adds an internal note to the inbox conversation.
Example:
When the customer asks for a callback,
save an internal note saying that the customer requested a callback.
##add_note## : Customer wants a callback
The note is not sent to the customer.
A complete action-based example
Here is an example for a Shopify Sales Agent:
You are the Sales Agent for our ecommerce store.
Help customers discover products, compare options and make purchases.
Use the connected knowledge source for product information,
shipping policy and return policy.
Never invent price, stock, discount or delivery information.
When customers ask for product recommendations,
search our Shopify store.
##shopify_store## : 12
##shopify_recommend_products##
When a customer confirms that they want to purchase,
add the Interested Buyer label.
##add_label## : 12
When useful, save the customer's product preference
to the Product Interest custom field.
##save_custom_field## : 42
If the customer asks about an existing order,
do not answer using assumptions.
Transfer the conversation to the Order Support Agent.
##transfer_agent## : 18
If the customer explicitly asks to speak to a human,
assign the conversation to the support team.
##assign_human_role## : 3
Notice the pattern.
Instruction → condition → action
The prompt explains why each action exists.
Common action mistakes
Mistake 1: Adding every action available
Don't.
Only give an agent the tools it needs.
Mistake 2: Adding an action without explaining when to use it
Don't simply list:
##add_label## : 12
##assign_sequence## : 8
##call_http_api## : 5
Tell the agent when each action should happen.
Mistake 3: Using the wrong resource ID
Use the ## autocomplete in the System Prompt editor and select the resource rather than guessing IDs.
Mistake 4: Forgetting the ecommerce store action
Shopify actions require:
##shopify_store## : 12
WooCommerce actions require:
##woocommerce_store## : 12
Select the connected store before using the related actions.
Mistake 5: Letting the AI guess live information
Never instruct an agent to guess order status, stock, payment status or similar live data.
Use the relevant connected action or API.
Mistake 6: Putting image URLs into the System Prompt
Do not put product/gallery image URLs into the prompt.
Add product and gallery images through Knowledge Sources → Media so the agent can use the configured media when customers ask for photos.
The safest action pattern
For important actions, use this structure:
CONDITION
What must be true?
ACTION
Which action should run?
RULE
What must the agent avoid?
CUSTOMER RESPONSE
What should the customer be told afterward?
Example:
When the customer clearly asks to cancel their order,
check the order information first.
##shopify_get_order_details##
Only cancel when the customer's cancellation request is clear.
##shopify_cancel_order##
After the action completes, explain the result naturally.
Do not claim cancellation succeeded if the action fails.
That structure produces much more predictable AI behavior than simply giving the agent a list of tools.
