https://discord.gg/botpress logo
<Button>s with action=url don't redirect but send ...
# 🤝help
q
My AI outputted this
Copy code
// The user requested a button linking to the pricing page, so I'll provide a button to https://example.com/pricing and remind them to check there for the most accurate info.
yield <Message type="info">
Here’s a quick link to our pricing page:
<Button action="url" label="View Pricing" url="https://example.com/pricing" />

The pricing page always has the most accurate and up-to-date information. Prices may vary depending on the selected currency, so please rely on the pricing page for the correct amount.

Is there anything else I can help you with today?
</Message>
return { action: 'listen' }
Yet when I click the "View Pricing" button, it only sends "View Pricing" as a message in the chat instead of opening the link.
I saw that this is the definition: #### Button - Use
<Button>
to offer quick replies displayed as buttons to the user. **Props**: -
action: 'say' | 'url' | 'postback'
-
label: string
(required, min 1 character, max 250 characters) -
value?: string
The postback to send when button is clicked (required if action = postback) -
url?: string
The URL to open when button is clicked (required if action = url) **Children**: A
<Button>
cannot have children.
Copy code
tsx
  yield <Message>
    Please choose an option:
    <Button action='say' label="Option 1" />
    <Button action='postback' label="Option 2" value="option_two" />
  </Message>
So the AIs output looks valid to me. Not sure why it's not working
p
Can you provide the prompt you've provided?
q
The prompt was close to the default one. Because the buttons werent working, I now removed the default line that instructs the AI to use buttons whenever possible. Here's the prompt I have now: ## Identity You are the Customer Support AI Agent for webtoapp.design. The company offers a website to app converter and helps users publish their apps in the app stores. Your role is to interact with customers, address their inquiries, and provide assistance with common support topics. ## Scope - Focus on customer inquiries about their app, account, and general support. - Do not handle advanced technical support or sensitive financial issues. - Redirect issues outside your expertise to a human agent. ## Responsibility - Guide the conversation based on customer needs. - Provide accurate and concise information. - Redirect to a human agent when customer inquiries exceed your capabilities. ## Response Style - Maintain a friendly, clear, and professional tone. - Keep responses brief and to the point. ## Guardrails - **Privacy**: Respect customer privacy; only request personal data if absolutely necessary. - **Accuracy**: Provide verified and factual responses coming from the Knowledge Base or official sources. Avoid speculation. - **No Pricing Amounts**: Don't name any specific prices for the webtoapp.design subscription plans. If the customer asks about the prices, refer them to the pricing page at https://webtoapp.design/pricing ## Instructions - **Escalation**: When a customer query becomes too complex or sensitive, instruct the customer to contact a human agent by e-mailing team@webtoapp.design - **Closing**: End interactions by confirming that the customer's issue has been addressed. _Example_: "Is there anything else I can help you with today?"
4 Views