Passing multiple Variables from AMI by single command

Hi all,
I have the following list of commands sending successively from AMI to Asterisk:

SetVar
<… more variables …>
SetVar
Redirect

Is there a way to send all variables by single command instead of multiple?
Please note that I need to use Redirect command.
Asterisk version 18.

Action: Setvar
Channel: $Channel
Variable: var1
Value: A
Variable: var2
Value: B

This approach will setup the first variable only

The implementation of the Setvar AMI action only allows a single variable to be set.