Add selectable outputs to an action card

With Connector Builder, you can inspect a list of output fields chosen by the connector's end user. As a developer of a connector, you can retrieve these fields for your connector flows.

This feature is useful when building a connector against a third-party service that retrieves a large payload of data. Such third-party services may allow a developer of a connector to specify which fields should be returned in a response.

For example, Get Issue in the Jira REST API allows a developer to pass a fields array of comma-separated keys to include in a response. If no fields are provided, then the service returns all of them.

However, since Jira issues can have hundreds of fields, an unfiltered response may be large and impact performance. By specifying a specific subset of fields, you reduce the size of the payload and decrease the time waiting for a third-party service to respond.

Connector Builder provides a list of outputs selected by a user for your connector. This list exists, whether the third-party service accepts a list of fields as requested in a response.

If the list of selected outputs isn't used by your third-party service, you can ignore the list.

Selected output fields in action flow

Outputs are the fields on a card that return data during the execution of a flow. Such fields can be mapped (by drag-and-drop) to input fields of other cards in a flow.

When you create an Action flow, the Connector Action card displays a SELECTED OUTPUTS section. Until you add a group of output fields, this section remains empty. After you add a group of output fields to a card, a draggable output field is added to the section. Okta adds a separate output field for each output group that is created.

To add output fields using the Outputs dialog, see Add input and output fields to connector cards.

Object shape for selected outputs

When the third-party service returns the fields in the Selected Outputs section, each group has the format:

Copy
{
"field A":
{
"type": "Text",
"collection": false
},
"field B":
{
"type": "Object",
"collection": true
},
"field C":
{
"type": "True/False",
"collection": false
}
}

This list can be processed into a comma-delimited text string using the Object Keys and List to Text function cards. If required, you can then use the Object Construct function card to format the string as a query object.

For static fields, the top-level key for Selected Outputs is the value for the Field ID field in the Outputs dialog. This value is generated automatically for each output field.

For fields created with the Dynamic Fields option, the top-level keys are the name field that is used in the list of objects that represent the field list. For example:

Copy
[
{
"displayname":"Field A",
"name":"fieldA",
"type":"Text",
"collection":false
},
{
"displayname":"Field B",
"name":"fieldB",
"type":"Object",
"collection":true
},
{
"displayname":"Field C",
"name":"fieldC",
"type":"True/False",
"collection":false
}
]