How to add document into a meatada according to metadata value

My Requirement is i want to create a workflow which will store the document accodring to the value of metadata

ex - i have metadata name “office” which contains 4 sub-cetagory
1. General Office
2. Rural Office
3. Division Office
4. Sub-Division Office

so in the above example if the user choose the General Office Then it Should store in the General Office cabinets Only and Similarly for other.

please help me to solve this problem

I solved a similar problem using cabinets.
Use the following condition for the state action:
{% if workflow_instance.document.metadata_value_of.sample_metadata == “sample” %} True {% endif %}