Skip to content

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.

  1. A related content service points to the Assistant’s chat component, with parameters for the context: the component, page, field, and value.
  2. The service is assigned to page fields as a related action, so it appears among the field’s related actions.
  3. 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.
  1. Give the chat component its parameters. Add the RCF_SERVICE_PARAMETER attribute to the chat component’s content reference, listing ASSIST_COMPONENT, ASSIST_PAGE, ASSIST_FIELD, and ASSIST_VALUE. With it, the Related Content Framework uses these parameters instead of the component’s search keys.

  2. 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.

  3. 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.

  4. Map the parameters. On the Configure Related Actions page, map ASSIST_VALUE to the page field, and give ASSIST_COMPONENT, ASSIST_PAGE, and ASSIST_FIELD fixed values. Set the service’s security there too, so only the roles that use the Assistant see it.

  5. Try it. Open the page, choose the field’s related action, and ask a question.

For a manager looking at a training request, a Magic Button on the Status field sends this context with the first question:

Page context
{
"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.

  • 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.