Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Static Value in USERIMPORT in Database Connector

Sanket
New Contributor II
New Contributor II

Hi All,

We are using stored procedure in database connector in place of query.

We need to pass STATIC value as "Employee" in "Employeetype" attribute of Saviynt.

Is it possible via adding that field in USERIMPORT mapping or do we need to have that value in our stored procedure and then we map that with help of sourceproperty?

Any leads will be appreciable.

Thanks!

6 REPLIES 6

Manu269
All-Star
All-Star

Can you please confirm if you need to pass this static value for CREATEACCOUNTJSON?

If Yes, the value can be passed in similar format for you Stored Procedure

Sample :

{
"createaccountqry": "call createaccount(${user.id}, '${user.displayname}', '${user.email}', '${user.employeeid}', '${user.firstname}','${user.lastname}','${user.systemusername}', '${user.username}','${randompassword}')"
}

 

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.

Sanket
New Contributor II
New Contributor II

Hi Manish,

 

We need to have that static value passed in USERIMPORT in DB connector!

Thanks!

You are pulling data using stored Procedure ? - Can you share XML ?

if its SQL query you can do as below

<dataMapping>
	<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="username">
		<![CDATA[SELECT firstname,lastname,enabled,statuskey,primarylogin,locationcode,gnscode,'Employee' as staticValue from users]]>
	</sql-query>
	<importsettings>
		<zeroDayProvisioning>false</zeroDayProvisioning>
		<generateEmail>true</generateEmail>
		<userNotInFileAction>NOACTION</userNotInFileAction>
		<checkRules>false</checkRules>
		<buildUserMap>false</buildUserMap>
		<generateSystemUsername>false</generateSystemUsername>
		<userOperationsAllowed>UPDATE</userOperationsAllowed>
		<userReconcillationField>username</userReconcillationField>
	</importsettings>
	<mapper description="This is the mapping field for Saviynt Field name">
		<mapfield saviyntproperty="username" sourceproperty="primarylogin" type="character"/>
		<mapfield saviyntproperty="firstname" sourceproperty="firstname" type="character"></mapfield>
		<mapfield saviyntproperty="lastname" sourceproperty="lastname" type="character"></mapfield>
		<mapfield saviyntproperty="enabled" sourceproperty="enabled" type="number"></mapfield>
		<mapfield saviyntproperty="statuskey" sourceproperty="statuskey" type="number"></mapfield>
	 <mapfield saviyntproperty="customproperty22" sourceproperty="locationcode" type="number"/> 	<mapfield saviyntproperty="customproperty22" sourceproperty="locationcode" type="number"/>
	 <mapfield saviyntproperty="customproperty20" sourceproperty="staticValue" type="character"/> <mapfield saviyntproperty="customproperty22" sourceproperty="locationcode" type="number"/> 	<mapfield saviyntproperty="customproperty21" sourceproperty="gnscode" type="character"/>
	</mapper>
</dataMapping>

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Sanket
New Contributor II
New Contributor II

Hi Rushikesh,

We are using stored procedure as below.

<dataMapping>
<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="username">
<![CDATA[
EXEC <Stored_Procedure_Name>;
]]>
</sql-query>
<importsettings>
<zeroDayProvisioning>true</zeroDayProvisioning>
<generateEmail>true</generateEmail>
<userNotInFileAction>NOACTION</userNotInFileAction>
<checkRules>true</checkRules>
<buildUserMap>false</buildUserMap>
<generateSystemUsername>true</generateSystemUsername>
<userReconcillationField>username</userReconcillationField>
</importsettings>
<mapper description="This is the mapping field for Saviynt Field name">
<mapfield saviyntproperty="username" sourceproperty="EmployeeCode" type="character"></mapfield>
<mapfield saviyntproperty="employeeid" sourceproperty="EmployeeCode" type="character"></mapfield>
<mapfield saviyntproperty="firstname" sourceproperty="Firstname" type="character"></mapfield>
<mapfield saviyntproperty="lastname" sourceproperty="Lastname" type="character"></mapfield>
<mapfield saviyntproperty="preferedFirstName" sourceproperty="PreferredName" type="character"></mapfield>
<mapfield saviyntproperty="customproperty20" sourceproperty="WorkEmail" type="character"></mapfield>
<mapfield saviyntproperty="title" sourceproperty="Title" type="character"></mapfield>
<mapfield saviyntproperty="customproperty2" sourceproperty="Source" type="character"></mapfield>
<mapfield saviyntproperty="startdate" sourceproperty="StartDate" type="date"></mapfield>
<mapfield saviyntproperty="enddate" sourceproperty="TerminationDate" type="date"></mapfield>
<mapfield saviyntproperty="customproperty8" sourceproperty="MobilePhone" type="character"></mapfield>
<mapfield saviyntproperty="manager" sourceproperty="Manager" type="character"></mapfield>
<mapfield saviyntproperty="customproperty4" sourceproperty="DivisionCode" type="character"></mapfield>
<mapfield saviyntproperty="siteid" sourceproperty="ADSiteCode" type="character"></mapfield>
<mapfield saviyntproperty="location" sourceproperty="ADLocation" type="character"></mapfield>
<mapfield saviyntproperty="state" sourceproperty="State" type="character"></mapfield>
<mapfield saviyntproperty="customproperty3" sourceproperty="PostCode" type="character"></mapfield>
<mapfield saviyntproperty="country" sourceproperty="CountryCode" type="character"></mapfield>
<mapfield saviyntproperty="job_function" sourceproperty="PositionDescription" type="character"></mapfield>
<mapfield saviyntproperty="statuskey" sourceproperty="Status" type="character"></mapfield>
<mapfield saviyntproperty="departmentname" sourceproperty="DepartmentDescription" type="character"></mapfield>
</mapper>
</dataMapping>

Thanks!

You need to update target Stored Procedure 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Manu269
All-Star
All-Star

The only option which I feel is that you need get is to accomodate this static value in your Stored Procedure

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.