Mapping user profile attributes to report dimensions
Edit Metrics configuration files to map various user profile attributes to Metrics report dimensions.
Before you begin
To edit configuration files, you must use the IBM® WebSphere® Application Server wsadmin client. See Starting the wsadmin client for information about how to start the wsadmin command-line tool.
About this task
Metrics reports support up to three different dimensions, which are based on user profile attributes. For example, the com.ibm.snx_profiles.base.title atribute specifies the user role. By default, you can map the following three attributes:
- com.ibm.snx_profiles.base.countryCode
- Mapped to the "Geography" dimension in Metrics reports.
- com.ibm.snx_profiles.base.orgId
- Mapped to the "Department" dimension in Metrics reports.
- com.ibm.snx_profiles.base.title
- Mapped to the "Role" dimension in Metrics reports.
To see the full list of Profiles attributes that are available through the administration Atom API provided by Profiles, refer to Retrieving the Profiles Administration API service document in the HCL Social Business wiki.
- com.ibm.snx_profiles.base.deptNumber
- com.ibm.snx_profiles.base.countryCode
- com.ibm.snx_profiles.base.orgId
- com.ibm.snx_profiles.base.employeeTypeCode
- com.ibm.snx_profiles.base.workLocationCode
If any of these attributes are used, Metrics shows real values in the reports.
To manage a task, complete the following steps:
Procedure
- Start the wsadmin client. For more information, see the Starting the wsadmin client topic.
-
Start the Wikis Jython script interpreter.
-
Check out the Metrics configuration file metrics-config.xml file by using
the following command:
MetricsConfigService.checkOutConfig("working_directory", "cell_name")
where
- working_directory is the temporary working directory
to which the configuration XML and XSD files are copied. The files are kept in this working
directory while you make changes to them.Note: AIX® and Linux™ only: The directory must grant write permissions or the command will not run successfully.
- cell_name is the name of the WebSphere® Application Server
cell hosting the IBM® Connections
application. This argument is required. If you do not know the cell
name, you can determine it by typing the following command in the
wsadmin command processor:
print AdminControl.getCell()
- working_directory is the temporary working directory
to which the configuration XML and XSD files are copied. The files are kept in this working
directory while you make changes to them.
-
Modify the metrics-config.xml file in a text editor or, alternatively, use
the
MetricsConfigService.updateConfig()
command to update the Profiles attributes mappings. -
Check in the metrics-config.xml file by using the following command:
MetricsConfigService.checkInConfig()
-
Define names for customized attributes with customized product strings by setting new values
for the following properties in Metrics properties file:
com.ibm.connections.metrics.ui.strings.ui_xx.properties, where xx is the language identifier in the metrics.ear/lc.metrics.ui.jar file:
- METRICS.FILTER.DIMENSION.OPTIONS.ATTRIBUTE1
- METRICS.FILTER.DIMENSION.OPTIONS.ATTRIBUTE2
- METRICS.FILTER.DIMENSION.OPTIONS.ATTRIBUTE3
See Customizing product strings for more details.
- Save your changes and restart the application server where the Metrics application is deployed.
What to do next
If you update the mapping of Profiles attributes while IBM Connections is running, your changes
affect new users only. Existing users who were already mapped to the orgid
attribute are not automatically updated with the new mapping.
To apply your changes to all users, run the
MetricsUsersService.reloadUsersAttributes()
metrics administrative command. Before
running this command, make sure that the changes in metrics-config.xml
have
synchronized to the application server(s) running Metrics.
After you run the command, open the METRICS.F_TRX_USERS or
F_TRX_USERS table in the Metrics database and verify that the
attribute2
attribute of all users has a value of
com.ibm.snx_profiles.base.profileType
. An example of this lookup is db2:
CONNECT to METRICS
db2 SELECT ID, EMAIL, ATTRIBUTE1, ATTRIBUTE2,
ATTRIBUTE3 FROM METRICS.F_TRX_USERS
.
- After you update the Metrics database, the expected Group by report is
still not available because the report displays historical data from the power cube. Refresh the
power cubes by running the
build-all
to command. - Despite refreshing the power cubes, the community metrics report might not be updated because that report is static. The report is updated only after the specified date range for the report expires.