Export users
This action might export users in 2 formats: version 1, version 2.
Version 1 is deprecated – no additional enhancements will be applied to this version.
Version 2 of the output file should be used – is the same as the user API object.
Population | Considerations |
---|---|
User group(s) | There are institutions that handle only some of their users in a SIS. Thus only users of these user groups should be exported. If left empty, users of all user groups will be exported (according to the other parameters). |
Days since creation | Use this option to set a condition, in number of days, that identifies when to include a user in the export. This parameter indicates the number of days since the user record was created in Alma. |
Days since update | Use this option to set a condition, in number of days, that identifies when to include a user in the export. This parameter indicates the number of days since the user record was updated in Alma. |
Days since deletion | Use this option to set a condition, in number of days, that identifies when to include a user in the export. This parameter indicates the number of days since the user record was deleted in Alma. |
Note: one of the “Days since” conditions is mandatory. If more than one of these conditions is defined, user will be exported if they meet at least one of the “days since” conditions.
Output file format
An XSL file may be used to alter the format of the results of the export action. The XSL file, ../xsl/letters/ExportUserLetter.xsl (with the description export user letter xsl), is available and configurable in Customize Letters (Administration > General Configuration > Configuration Menu > General Configuration).
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:for-each select="userRecords/userRecord" > <xsl:value-of select="concat(userDetails/userName, ',',userIdentifiers/userIdentifier/value,',',userDetails/lastName,';',userDetails/firstName,',' ,'NONE',',',userDetails/userGroup,',','' )"/> <xsl:for-each select="userAddressList" > <xsl:if test="userEmail[@preferred = 'true']"><xsl:value-of select="userEmail/email"/></xsl:if> </xsl:for-each> <xsl:value-of select="concat(',',userDetails/expiryDate,',')"/> <xsl:for-each select="userBlockList" > <xsl:if test="userBlock">BLOCKED</xsl:if> </xsl:for-each> <xsl:text> </xsl:text> </xsl:for-each> </xsl:template> </xsl:stylesheet>
Note that the Export Users job exports users in bulks of 100. Every 100 users are exported to a separate file, EXPORT_USERS-{JobId}-{dateInMilliseconds}, with the difference between the file names being the {dateInMilliseconds} suffix.