Hi,
You can use dynamic configuration just like for dynamic file naming to indicate which directory should be used based on a field value in the payload. The only thing that is different is the key name is Directory instead of FileName and in the communication channel you would make sure ASMA attributes are selected and the path parameter has a value of passdirectory.
Regards,
Ryan Crosby