The
CreateSVAdvisorUser Method allows you to create new
SmartView? Users through
SmartIntegrator.
You have to do it in two requests, one that will create the Advisor Contact record in
SmartOffice and another that will create a User from that Advisor Contact.
To create the Advisor record with minimal data to create a
SmartView? User out of you will need to populated
LastName?,
FirstName?, and Address (email) like in the sample below.
ClientType? 7 means they are an Advisor and
WebAddressType? 1 means it is an Email address, so you can just hard-code those if you want.
<dxoproxy-request version='1.0.1'>
<transaction action='adapter.xmlEngine'>
<data>
<DXOUserName>EVAL6_SDC_BRYAN_ESHELBRENNER</DXOUserName>
<siData>
<request version='1.0'>
<header>
<office/>
<user/>
<password/>
</header>
<insert>
<Agent>
<Contact>
<LastName>Hannes</LastName>
<FirstName>Walter</FirstName>
<ClientType>7</ClientType>
<WebAddresses>
<WebAddress>
<Address>walter.hannes@ebix.com</Address>
<WebAddressType>1</WebAddressType>
</WebAddress>
</WebAddresses>
</Contact>
</Agent>
</insert>
</request>
</siData>
</data>
</transaction>
</dxoproxy-request>
This request will give you a response that looks like this if it is successful:
<dxoproxy-response time="1312908184837" version="1.0.1">
<transaction action="adapter.xmlEngine">
<data>
<response version="1.0">
<header>
<sessionClosed/>
</header>
<insert office="CBIZ" user="aberry">
<Agent id="Agent.1001523711.210" _type="obj" _status="inserted">
<Contact id="Contact.1001523711.211" _type="obj" _status="inserted">
<WebAddresses _type="objs">
<WebAddress id="WebAddress.1001523711.93" _type="obj" _status="inserted"/>
</WebAddresses>
</Contact>
</Agent>
</insert>
<_status>OK</_status>
</response>
</data>
<_status>OK</_status>
</transaction>
</dxoproxy-response>
You need to capture the Agent id attribute and use it in the second request.
The second request will convert this Advisor Contact to a
SmartView? User. Here is the XML Request:
<dxoproxy-request version='1.0.1'>
<transaction action='adapter.xmlEngine'>
<data>
<DXOUserName>EVAL6_SDC_BRYAN_ESHELBRENNER</DXOUserName>
<siData>
<request version='1.0'>
<header>
<office/>
<user/>
<password/>
</header>
<method>
<CreateSVAdvisorUser>
<AgentID>Agent.1001523711.210</AgentID>
<LoginName>Walter.Hannes</LoginName>
<ExtLink>EVAL6_SDC_Walter.Hannes</ExtLink>
<AdvisorVUType>1</AdvisorVUType>
</CreateSVAdvisorUser>
</method>
</request>
</siData>
</data>
</transaction>
</dxoproxy-request>
The
AgentID? is the id attribute you picked up from the response. The
LoginName? is the
SmartOffice User Name. This value is mandatory and must be unique within the office. The
ExtLink? value is the value you are going to pass in
NameID? if you are using SAML SSO.
AdvisorVUType? determine the
SmartView? version (i.e. For Advisors, Cast Status, etc).
--
DavidEshelbrenner - 13 Aug 2012