Alloy now supports string outputs to better accommodate more complex credit policies and make the outputs more readable and accessible, minimizing client dev work.
String datatype can now be used as a possible output for:
Matrix Models
- When you’re setting up a Matrix Model, you’ll now see 2 datatype options from the drop-down. One of them will be “string”: this is referring to the cell outputs, not the axis header datatypes (note: those do not have to match the datatype of the cells).
- You can now edit the datatype of a Matrix Model after you create it - hit “Edit Matrix Model” from top right of the Edit panel.
Outputs Attributes
- When you’re creating a new Output Attribute, you’ll now see our new Attributes panel. You’ll see there are now 3 datatype options: Integer, Decimal, and String.
You should be able to create & use your “string” type output attribute in same way as integer-type that you are used to, except that you are limited to only 1 thing inside of the expression, and you can leave it empty (we’ll just return null in the API response if you do). You cannot use any of the math operators, of course! Just add 1 thing and that’s it. You can use JQ, however.