accountSortDescending attribute in the Account Attribute transform

Hey, has anyone run into issues using the accountSortDescending attribute in Account Attribute transforms?

What I’m trying to do is when an identity has 2 records in our HR source, specify that accounts should be sorted by a specific attribute and sorted in a descending order. The account attribute I’m sorting on is type string and always has a numeric value. I’ve also attempted to not specify the attribute I’m sorting on and simply provide a non-default value to accountSortDescending attribute, in which case it should default to sorting on “created”.

None of what I’ve done seems to have any consistent effect - I’ve seen the transform work as expected for a single identity while not working the same way for a different one.

Are there any data type constraints for attributes that can be sorted on? E.g would the account attribute data type be Datetime or int? Do I need to run an unoptimised aggregation for the sorting in the transform to properly take effect?

Hi @M_rtenH,

Can you please paste a copy of the transform you are trying to use?

accountSortDescending is a boolean value, but you mentioned providing a non-default value for this attribute and expecting it to default to sorting on “created”. I am unclear on what values you are trying to set where.

accountSortDescending would just be true/false and accountSortAttribute would be where you define the string name of the attribute you want to sort on. Additionally, can you confirm that the attribute you are trying to sort on is part of your account schema?

Thank you,

  • Zach

Hey! Seems I mistyped earlier - I meant providing a non-default value to AccountSortAttribute (which by default will sort accounts on created).

Anyway - I’ve solved the problem now by getting the service to provide an attribute in ISO8601 format (YYYY-MM-DD) - which confirms to me that, at least in our instance, account sorting only works as expected when the attribute used for sorting is a date or datetime attribute in ISO8601.

All the attributes I tried previously were part of the account schema and were either data type string or int.

To add to that - it would be good if someone could confirm that it is in fact a requirement that your accountSortAttribute is in ISO8601 and if that’s the case, it should probably be included in the documentation as well.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.