Digital Assistant and Mobile

Get Involved. Join the Conversation.

Topic

    Asser
    Where is the user's data stored in the DB?
    Topic posted August 1, 2018 by Asser Green Ribbon: 100+ Points, last edited August 1, 2018, tagged Analytics, API, Facebook, Messaging, OMCE 
    101 Views, 1 Comment
    Title:
    Where is the user's data stored in the DB?
    Summary:
    I want to make a list of all users that have interacted with my bot, displaying their first name, last name etc.
    Content:
    I want to make a list of all users that have interacted with my bot, displaying their first name, last name etc. I want to get this data from the database.

    Info about the bot:
    My bot asks the user a few questions. After answering the questions, a custom field/property is set to true for that user.
     
    questionsend:
        component: "System.SetVariable"
        properties:
          variable: "questionsanswered"
          value: true
        transitions: {}
    save:
        component: "System.CopyVariables"
        properties:
          from: "questionsanswered"
          to: "user.questionsanswered"
        transitions: 
          return: "save"
    
    Now my question is: Where is all this data stored in the db?
     
    So far, I have found a conversation history in the BOTS schema, table BOTS_CONVERSATION_HISTORY_. 
    Here is the user's ID (under CHANNEL_USER_ID) but I can't find where it's linked to (no foreign key here, see attached image).
    I couldn't find any tables containing channel users, or all bot users in general (users interacting with bots, not users of the database).
    image1
     



     

    As I said, there's no foreign key or so that I could track it



    Where do I get the user's first name from the database? As in ${profile.firstName}. And where do I get the custom fields from? As in ${user.age}
        component: "System.CommonResponse"
        properties:
          metadata:
            responseItems:
            - type: "text"
              text: "Hey ${profile.firstName}!..."
    

    Comment

     

    • Frank Nimphius

      Hi,

      actually its the user scope you use. If you want to collect user information I suggest to use the Oracle Mobile Cloud Database API and create your own table. The user scope is not really made for this but designed as a persistence for user settings.

      Frank