Forum Discussion

adtucs's avatar
adtucs
Helper
19 days ago

Which entity to refer for knowing user to badge mapping in XML data dump

I'm working with XML data dump of my community and I'm able to access users and badge data individually. However, I'm unable to parse user to badge mapping i.e what all badges a specific user has been assigned 

Which entity or relation I should look for in the XML data dump to get that mapping or help me with any XML data dump related documentation if any

1 Reply

  • LucyL's avatar
    LucyL
    Khoros Staff
    10 days ago

    In the Khoros Community Standard XML Export, the user <--> badge mapping lives in the *Badges_Users* table (underlying DB table: tblia_badges_users).

     Pure junction table:
    - User_ID --> FK to Users.User_ID- Badge_ID --> FK to Badges.Badge_ID- award timestamp

    So for "what badges does user X have":

    1. Users → user master list2. Badges → badge definitions (name, description, icon, retroactive flag)3. Badges_Users → one row per user-badge award

    Ranks work differently — 1:1, stored as Users.rank_id referencing Ranks. Rank history (not just current) is in User_Node_Ranking (tblia_user_node_ranking).

    Full schema is in the *Khoros Community Standard XML Export Description* document bundled with export delivery. If you don't have a copy, you can request on via the support portal.