Sitemap
Marina Eremina

Marina Eremina

I enjoy learning new things and sharing what I’ve learned

Formatting URLs in Agentforce agent response

3 min readOct 18, 2026

--

Press enter or click to view image in full size

When building an Agentforce agent, small formatting details can make its responses easier to read and use.

I tested three ways to improve how an agent displays links: replacing raw URLs with descriptive labels, applying brand colors, and formatting links as call-to-action buttons.

All three use the same basic idea: give the agent explicit formatting instructions.

1. Replace raw URLs with descriptive labels

Long URLs can make a response harder to scan. Instead, ask the agent to display a short, meaningful label while keeping the original URL as the link destination.

Add this instruction to the agent’s system instructions:

URL formatting: Always display URLs as HTML anchor elements 
using the format <a href="URL">Label</a>,
where URL is the full address and Label is a short,
human-readable description.
Never display raw URLs as plain text.

For example, instead of displaying a long order URL, the agent can return a link labeled Return Policy Details.

Raw URL

Descriptive link label

Add this instructions in the system block so that all subagents could reuse them, or in the individual subagent's instructions.

2. Apply your brand color

You can add a nice touch to the responses and make links match your company’s branding.

URL formatting: Always use <a href="URL">Label</a>, 
where URL is the full address and Label is a short,
human-readable description.
Set the link text color to the brand color #HEXCOLOR.
Never display raw URLs as plain text.

Replace #HEXCOLOR with your preferred brand color.

Get Marina Eremina’s stories in your inbox

Join Medium for free to get updates from this writer.

The result is still a regular link, but with styling that better fits your interface.

3. Turn links into call-to-action buttons

Sometimes a link represents the main action the user should take next. You can make it more prominent by asking the agent to display it as a call-to-action button.

Option 1: Describe the desired style in plain English

URL formatting: Always render action links as HTML anchor 
elements using <a href="URL">Label</a>.
Use a short, action-oriented label, such as "View Order Details".
Display the link as a call-to-action button on its own line.
Style the link using inline CSS: background color #75352A,
text color #FFFFFF, padding: 10px 16px and border-radius: 4px.
Never display raw URLs as plain text.

Option 2: Specify the HTML styling directly

If you want more explicit control over the appearance, include the styling in the HTML element itself:

URL formatting: Always render action links as HTML anchor elements 
using <a href="URL" style="display: inline-block; background-color: #75352A;
color: #FFFFFF; padding: 10px 16px; border-radius: 4px;
text-decoration: none;">Label</a>.
Use a short, action-oriented label, such as "View Order Details".
Place the button on its own line.
Never display raw URLs as plain text.

The first version describes the desired appearance; the second provides the exact styling properties.

A few things to keep in mind

These examples are prompt-level formatting instructions, not a guarantee that every Salesforce interface will render the HTML as intended.

Always test the result in your actual Salesforce interface. The rendering component must support HTML and the relevant styling for the button to appear as intended.

If the HTML is displayed as plain text or the styling is stripped, changing the prompt alone may not solve the problem.

Conclusion

A descriptive label improves readability. Brand colors add visual consistency. A call-to-action button makes the next step more prominent.

--

--

Marina Eremina

Written by Marina Eremina

I enjoy learning new things and sharing what I’ve learned