Caseblocks Logo

How to use Task Parameters

How to use Task Parameters

Adding task parameters to your tasks allows your users to input options to tasks at runtime, giving you much more options in performing tasks.
There are three types of parameters currently available:

  1. Text – Free form text input
  2. Template – List of templates from the Email Templates defined in the system
  3. Select – A defined list of options displayed in a dropdown selection

You can configure these in the case type task admin area.

Usage in Lifecycle Functions

The task parameters are availabe in the options object, and a supplied in an array with the value property of the object containing the users submission, for example, we have a parameter called `upliftType` and the following code will assign the value of this parameter to a field in the case

payload.location_description = options.task_params.find((param) => { return param.name === "upliftType" }).value
exit(payload)