web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Slugs not working as expected in agent scripts

(0) ShareShare
ReportReport
Posted on by

Hi,

I'm trying to create some agent scripts.

and I try a simple step , a text instruction step. 

with this code:

Subject: {anchor._subjectid_value@OData.Community.Display.V1.FormattedValue}
{anchor.title}
{anchor.incidentid}


{$odata.incident.prioritycode.?$filter=incidentid eq '{anchor.incidentid}'&$select=prioritycode}

{$odata.incident.title.?$filter=incidentid eq '{anchor.incidentid}'&$select=title}

which results this:

Subject: Product

question about the product

b9aaee53-fb28-488d-a8a1-098bc3e97838

{$odata.incident.prioritycode.?$filter=incidentid eq 'b9aaee53-fb28-488d-a8a1-098bc3e97838'&$select=prioritycode}
{$odata.incident.title.?$filter=incidentid eq 'b9aaee53-fb28-488d-a8a1-098bc3e97838'&$select=title}

the first 3 slugs commands are parsed properly.

but the odata accesses return the slug tag and not the slug evaluated value. 

I can see in the console log that the slug command call the CRM, retrieve the prioritycode and title fields, but at the end what is displayed to the end user:

{$odata.incident.prioritycode.?$filter=incidentid eq 'b9aaee53-fb28-488d-a8a1-098bc3e97838'&$select=prioritycode}
is it a bug?
  • Suggested answer
    Nya Profile Picture
    29,064 on at

    Hi,

    Please try the following expressions:

    • {$odata.incident.prioritycode.?$filter=incidentid eq '{caseId}'&$select=prioritycode}

    • {$odata.incident.title.?$filter=incidentid eq '{caseId}'&$select=title}

    {caseId} is the unique ID of a case. The system displays the case ID only if the case is linked to the conversation.

    Ref - Use automation dictionary to pass parameter keys | Microsoft Docs

  • Jerome P1 Profile Picture
    on at

    thanks.

    I tried that.

    its not working the caseId is not replaced by the value.

    but my problem is that :

    the slugs expression '{anchor.incidentid}' is correctly resolve and returned.

    than the parent slug expression

    {$odata.incident.prioritycode.?$filter=incidentid eq 'b9aaee53-fb28-488d-a8a1-098bc3e97838'&$select=prioritycode}

    is also resolved (I opend the debug console and saw the values properly solved)

    but...

    the final output displays the expression itself:

    {$odata.incident.prioritycode.?$filter=incidentid eq 'b9aaee53-fb28-488d-a8a1-098bc3e97838'&$select=prioritycode}

    instead of the result of this expression, which should by "high" in this case.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Travis South Profile Picture

Travis South 54

#2
11manish Profile Picture

11manish 37 Super User 2026 Season 2

#3
ParthPatel249 Profile Picture

ParthPatel249 33

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans