# Using Custom Response Schemas in Workflows

> Generate a response schema from a live test request, add custom fields from your connected system, and use them in later Workflow steps.

Source: https://help.withpersona.com/articles/YORIwowYmVNRIAZqnochwA/
Section: Workflows > Introduction > Using Workflows

## What is a custom response schema?

A **custom response schema** tells Persona which fields to recognize in the response from a connected system, and what type each field has. Use one when an API returns fields that Persona's default schema does not recognize, such as an employee badge ID in an Okta profile, a customer-specific field on a Salesforce record, or a nested field or array in a Jira ticket.

Without a schema, those fields are in the response but unavailable to later steps. With one, you configure the fields in the Dashboard and reference them like any other value in your Workflow. You do not need custom extraction code.

When enabled, your custom schema replaces the default response schema for this step. Include all fields that later steps need, not just your custom fields.

## Before you start

You need:

- A supported integration action step in your Workflow with a credential selected.
- Valid sample input for the request, such as a real user ID or record ID in a test account.
- An API that already returns the fields you want. A schema does not create data. The credential must also have access to read those fields.

☝️

**Make Request** runs the selected operation against your connected system. It is not a simulation. Depending on the operation, it can create, update, or delete data. Use test credentials and sample records, not production personal information.

## Generate a schema

1.  In the Dashboard, go to **Workflows > All Workflows** and open the Workflow you want to edit.
2.  Select the integration action step, then choose the credential and operation, and enter sample input for the request.
3.  Open **Advanced configuration** and find **Custom Schema Override**.
4.  Click **Make Request**. Persona makes a live call with your credential and sample input.
5.  When the call returns a successful response (HTTP 2xx) with a non-empty JSON body, Persona fills **Schema Preview** with the fields it finds and infers each field's type.

Make Request is unavailable until the step has a credential and an operation. Each successful schema generation replaces the schema currently in the editor. Generate it before making manual edits.

A failed request or failed schema generation does not necessarily erase the existing schema.

## Edit the schema

1.  In **Schema Preview**, review the generated fields. The preview sits next to the step's other settings, so you can edit it in place.
2.  Click the **Expand schema editor** icon for a larger view.
3.  Add or change the fields you need, including nested fields and arrays. Each field name must match its name in the API response, and its type must match the data the API returns.
4.  Select **Configure custom schema** so the step uses your schema. The checkbox is available after a schema exists.
5.  Close the editor. Save and publish the Workflow when you are ready to use it.

## Use the fields in later steps

After you save the schema, its fields appear as values you can reference in later steps, for example in a **Conditional** step or in the fields of an action step. Click **+** next to a value and choose the field from this step's response, the same way you reference any other value in the Workflow. You don't need Workflow Variables to reference this step's response. For optional guidance on storing or updating values, see [Using Workflow Variables](https://help.withpersona.com/articles/3tWNwJv7w6ZjmTKcguGyvI/).

## Replace sample values before you publish

Make Request reads the request values from the step itself, so testing means entering a specific user ID, record ID, or other identifier in the step. Leave it there and the Workflow runs every request against that one sample.

After you generate the schema, replace each temporary sample value with the dynamic reference you intend, such as a field from the inquiry or account that started the run. Check the request settings one more time before you save and publish.

## If it does not work

- **A banner says Persona could not generate a response schema.** Click **View the integration log for details** to see the request and response. Fix the problem the log shows, then click **Make Request** again.
- **Make Request is unavailable.** Select a credential and an operation for the step.
- **The request does not return a successful response.** Check the sample input and confirm the credential has access to the record. Persona generates a schema only from a successful response (HTTP 2xx) with a non-empty JSON body.
- **A field you expect is missing.** Adding a field by hand does not make the API return it. Test with a sample record that contains the field, confirm the credential can read it, and keep the field's exact name and nesting from the response.
- **A field has the wrong type.** Change the type in the editor to match the data the API returns.
- **Your edits disappeared.** Make Request replaces the schema. Run it first, then edit.
- **You do not see Custom Schema Override.** Confirm you are using a supported integration action step. If the option is still missing, contact your Persona account team.
