How to Prefill Case Actions?
What is Prefill?
When creating an Inquiry for a specific end user, you can populate end user data into inquiry fields before sharing the inquiry link with the end user. This is known as Prefilling an inquiry. You can also do the same with Case Actions, but instead of providing the required data via the dashboard or via api you can configure the Case Action to pull the data from the Case itself.
The Case Action can also be configured to populate the data from the attached inquiry and/or account and we’ll outline those steps below.
Steps
- Go to the Case Actions page.
- Click and open the Case Action you want to set for Prefill. To learn how to create a Case Action, look here.
- Click the trigger Step at the top of the workflow called On Click. This will open a side panel with the Parameter Scheme.
- Click the pencil edit icon to open the edit modal. Within the modal, each field has a dropdown listing each of the field attributes: Name, Label, PREFILL, Placeholder, Type, Optional, Disabled. Also within the model you’ll see a preview input screen with the relevant input components.
- Select a field, click it’s drop down.
- In the Prefill field, enter
case.fields.<field name>
. So for the example of Business Name above,case.fields.business-name
. Be sure to check that the field name matches the field name from the object. For example, you can go to the Settings of a case template to check how the fields are key’d. You can do the same if you’re populating the values from an inquiry or account.- If you’re populating the values from an inquiry or account, you’ll need to modify the object path in the Prefill field to either,
inquiry.fields.<field name>
oraccount.fields.<field name>
.
- If you’re populating the values from an inquiry or account, you’ll need to modify the object path in the Prefill field to either,
- Once you’ve added all the Prefills required for the Case Action, you’ll need to Save & Publish the Case Action workflow.
Testing
To ensure the Case Action has been configured to prefill correctly, open an existing case using the case template with the case action.
Open the Case Action model using either:
- Clicking the three dots at the top right of the case, and select the case action
- Click the button linked to the case action.
Once you’ve opened and selected the case action, you should see the configured fields populated with the relevant values from the case.