Save Data to Case Property Programatically

Hello!

Is there an alternative way to map how data is saved from questions in a
form into the case properties, as well as defining the names of the case
properties, other than the case management tab?

The reason I ask is because we are designing an application that has a lot
of forms, most of which are based on tools that have a matrix format. This
means that we have multiple question groups with the questions inside the
groups repeated. Unfortunately when you select a question from the dropdown
list, only the last question id in the hierarchy is automatically used as
the case property name.

Ideally what I would like to do is save the data from questions in the form
to case properties that have the same syntax as the full question id’s (the
way they appear when you export the data).

Possible through the API or xForm?

Thanks,

Ralph