We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Now Assist Custom Skill Kit Context Menu JSON format

EdmarsonF
Tera Contributor
I have a Now Assist skill that, when tested in the Skill Kit test page, returns a plain text response as expected. However, when invoking the same skill via the Now Assist Context Menu in the UI, the response appears as JSON instead of plain text. I need help ensuring the Context Menu renders the generated result as plain text (same as Skill Kit).

EdmarsonF_0-1769162986370.png

EdmarsonF_1-1769163041799.png

 

 

2 REPLIES 2

HarshitaN
Tera Contributor

Hello, 
To resolve this issue, you need to go to OneExtend Capability Definitions table:-

         1. Find your skill, using the "Name" field.
         2. Under the Postprocessor, add script:-

outputs = JSON.parse(outputs);
var modelOutput = JSON.parse(outputs.result.response).model_output;
outputs.result.response = modelOutput;
return outputs;

         3. Update the record.

Please mark my response as solution accepted and helpful, if this resolved your issue.
Regards, 
H. Negi

rpriyadarshy
Kilo Sage

@EdmarsonF 

 

The "sys_one_extend_capability_definition" table is part of the Now Assist Skill Kit's underlying data structure. It is one of several tables that may have records automatically generated when creating a new Now Assist Skill Configs record. These records are related to the configuration and management of OneExtend Capabilities within the platform. 

 

(1) Open the CAPABILITY Record in Table sys_one_extend_capability_definition

 

Just for your Reference SUMMARIZE SKILL  as an Example

 

rpriyadarshy_1-1769999912308.png

POST Processor Script for Summarize

 

rpriyadarshy_2-1769999966346.png

 

 

 

 

 (2) ADD a POSTPROCESSOR Script (SERVER SIDE).

 

=================================================================

// Normalize output to plain text for display

outputs = JSON.parse(outputs);

//If response is a stringified JSON, parse it


try {
if (typeof outputs.result.response === 'string') {
var parsed = JSON.parse(outputs.result.response);
// Prefer model_output if present, else fallback to whole parsed content

if (parsed && parsed.model_output) {
outputs.result.response = parsed.model_output;
} else if (parsed && parsed.output) {
outputs.result.response = parsed.output;
} else {
// If it's plain text already, keep as is; if object, stringify

outputs.result.response = (typeof parsed === 'string') ? parsed : JSON.stringify(parsed);
}
}
} catch (e) {
// If parsing fails, leave response as-is so you can troubleshoot
}

// Ensure the response is a string to render

if (typeof outputs.result.response !== 'string') {
outputs.result.response = String(outputs.result.response || '');
}

return outputs;

=================================================================

 

(3)  Update the capability record.

 

Hope This Helps.

 

Regards

RP