Trace the interaction that saves the file to Box and you will learn what the rules are that are involved in forming the REST request which includes the folder and/or filename that is constructed.
There are either available rules or extension points that you can specialize into which you can implement your own algorithm for the path to the filename.
I've not done it for Box but I've done it for Sharepoint Online which uses corresponding Data Pages. We went to the level of having a different folder per Case ID. It has been a few years, I don't remember whether you then also have to - as part of that interaction:
Call a "Folder Exists" API to check that the folder for your case type exists; and/or
Call a "Create Folder" API to create the folder if it doesn't exist
... and in any event Box may require different behavior here. Obviously this can start to get intricate, so error checking at each point is essential.