Launchpad by Pegasystems icon

Launchpad by Pegasystems

Consume Pega Launchpad API

Agent → Get Final Response

AI-generated

Summary

Retrieves the final response of a Pega Launchpad AI agent conversation by querying the GetAgentFinalResponse data view with a conversation ID.

Inputs

  • Base URL (required) — Base URL of the Pega Launchpad instance, e.g. https://your-pega-domain.com. A trailing slash is stripped. Read from the first input item and used for all items.
  • Conversation ID (required) — ID of the agent conversation to fetch the final response for. Typically the ID returned by Initiate Conversation. Sent as dataViewParameters.ConversationID.
  • Authentication — Authentication method. Only OAuth2 is offered (default), using the pegalaunchpadOAuth2Api credential.

Output shape

One output item per input item. It holds the JSON body returned by the Pega data view, spread at the top level, plus a responseHeaders object with the response headers.

The exact fields depend on what the GetAgentFinalResponse data view returns. A string body that isn't valid JSON is wrapped as { rawBody }. If Continue On Fail is enabled, a failed item returns { error: message }. Otherwise the node throws an API error.

Examples

Example 1: Fetch the agent's answer after sending a message in an existing conversation.

Resource: Agent; Operation: Get Final Response; Base URL: https://mycompany.pega.com; Conversation ID: {{ $json.conversationID }} (from the earlier Initiate Conversation step).

Links

Discussion