Hi Mandeep,
That is correct, you can use self.online_user to retrieve user demographic information. Their business phone can be found via the self.online_user.work_phone property you mentioned, or the demographic_info attribute that we provide (self.online_user.demographic_info) which would contain other bits of information about the user (see https://docs.q2developer.com/api_references/q2_sdk/shared_models/demographic.html). It could be utilized to grab a list of phones (which could be filtered by PhoneType to retrieve the business phone) and grab a list of addresses (filter by AddressType for business address information). I don't believe we currently provide a way to differentiate user email as "Business" or other, however the DemographicInfo object does return a list of emails for that user. You can also make use of our DBObjects to retrieve customer/user information (see https://docs.q2developer.com/api_references/q2_sdk/db/db_objects/user.html and https://docs.q2developer.com/api_references/q2_sdk/db/db_objects/customer.html)
You can find more detail about access and user rights through our UserPropertyDataElement (https://docs.q2developer.com/api_references/q2_sdk/db/db_objects/user_property_data_element.html) and UserPropertyData (https://docs.q2developer.com/api_references/q2_sdk/db/db_objects/user_property_data.html) DBObjects. The UserPropertyElement DBObject is used to define the types of things the user can do (refered to as elements) while the UserPropertyData DBObject serves as a mapping with the User DBObject to determine which of those elements are turned on for a particular user). We also provide a couple of methods within our PolicyData DBObject that allow you to retrieve policy information (generated transaction rights, accounts, subsidiaries, features) for a user, customer, group and update it (see https://docs.q2developer.com/api_references/q2_sdk/db/db_objects/policy_data.html).
Thanks,
Solène