Magic Buttons
A Magic Button opens the Assistant from a specific field, already knowing the page, the field, and its value. Users can then ask “What does this mean?” or “What should I enter here?” without explaining where they are.
Magic Buttons are field-level related actions, built with PeopleSoft’s Related Content Framework. They’re configured in the portal, so delivered page definitions stay unchanged.
How it works
Section titled “How it works”- A related content service points to the Assistant’s chat component, with parameters for the context: the component, page, field, and value.
- The service is assigned to page fields as a related action, so it appears among the field’s related actions.
- When a user chooses it, PeopleSoft opens the chat page with the parameters filled in from the page. The chat script reads them from the page’s URL, as data, and sends them to the Assistant service with the user’s first question.
Set it up
Section titled “Set it up”-
Give the chat component its parameters. Add the
RCF_SERVICE_PARAMETERattribute to the chat component’s content reference, listingASSIST_COMPONENT,ASSIST_PAGE,ASSIST_FIELD, andASSIST_VALUE. With it, the Related Content Framework uses these parameters instead of the component’s search keys. -
Define the service. At PeopleTools > Portal > Related Content Service > Define Related Content Service, create a service such as
ZZ_ASK_ASSISTANT, with the PeopleSoft Component URL type, pointing to the chat component. Its label, such as Ask the Assistant, is what users see. -
Assign it to fields. At PeopleTools > Portal > Related Content Service > Manage Related Content Service, open the component whose fields should have a Magic Button, and add the service at page-field level on the Assign Related Actions page.
-
Map the parameters. On the Configure Related Actions page, map
ASSIST_VALUEto the page field, and giveASSIST_COMPONENT,ASSIST_PAGE, andASSIST_FIELDfixed values. Set the service’s security there too, so only the roles that use the Assistant see it. -
Try it. Open the page, choose the field’s related action, and ask a question.
What the Assistant receives
Section titled “What the Assistant receives”For a manager looking at a training request, a Magic Button on the Status field sends this context with the first question:
{ "component": "ZZ_TRAINING_REQ", "page": "ZZ_TRAIN_REQ", "field": "ZZ_TRAIN_STATUS", "value": "P"}The context becomes part of the turn, and the Assistant uses tools to explain it. For “What does
this mean?”, it calls describe_field, whose API returns the field’s label, its description,
and, for a coded field like this one, its translate values:
P means Pending Approval: the request is waiting to be approved. The other statuses are Approved, Denied, and Completed.
Context doesn’t limit the conversation. The user can follow up with any question, such as “Which of my team’s other requests are still pending?”, and the Assistant uses its other tools as usual.
Where Magic Buttons help most
Section titled “Where Magic Buttons help most”- Coded fields, such as statuses and types, where users see a code or a short label and want to know what it means.
- Fields with rules, such as a date that must fall in an open period, where users want to know what to enter before they’re stopped by an error.
- Keys of other records, such as a requisition ID, where the Assistant can look up the record with its other tools and summarize it.
