Skip to main content

Last updated: 2024-06-07


CreateSVAdvisorUser Method


In this topic:


Overview


The CreateSVAdvisorUser method creates a SmartView for Advisors user account for a specified advisor contact.


The CreateSVAdvisorUser method is invoked using the method operation.


The advisor contact must exist in the database before this method can be used. If the advisor contact does not exist, create it first using the insert operation.


Parameters


Parameter NameTypeRequired?Description
AgentIDStringYesThis is the object ID of the advisor contact record.
LoginNameStringYesThis is the user name that the advisor will use to sign in to SmartOffice. The user name must be unique in the office.
TaxIDStringNoThis is the value passed in NameID when SAML SSO is used.
AdvisorVUTypeStringNoThis specifies the format of the SmartView for Advisors user account being created. Valid values are 0 (SmartView for Advisors) or 1 (SmartView Case Status). If this parameter is not specified, it defaults to 0.

Example


First, use the insert operation to create the advisor contact if it does not exist. At minimum, specify the advisor's last name, first name and e-mail address. You will also specify the client type (7) for advisor contacts:


XML
<request version='1.0'>
    <header>...</header>
    <insert>
        <Agent>
            <Contact>
                <LastName>Hannes</LastName>
                <FirstName>Walter</FirstName>
                <ClientType>7</ClientType>
                <WebAddresses>
                    <WebAddress>
                        <Address>walter.hannes@example.com</Address>
                        <WebAddressType>1</WebAddressType>
                    </WebAddress>
                </WebAddresses>
            </Contact>
        </Agent>
    </insert>
</request>

The response confirms that the advisor record was created:


XML
<response version="1.0">
    <header>
        <sessionClosed/>
    </header>
    <insert>
        <Agent id="Agent.1.210" _type="obj" _status="inserted">
            <Contact id="Contact.1.211" _type="obj" _status="inserted">
                <WebAddresses _type="objs">
                    <WebAddress id="WebAddress.1.93" _type="obj" _status="inserted"/>
                </WebAddresses>
            </Contact>
        </Agent>
    </insert>
    <_status>OK</_status>
</response>

Next, capture the Agent ID from the response for use in the next request, which creates the SmartView for Advisors user account:


XML
<request version='1.0'>
    <header>...</header>
    <method>
        <CreateSVAdvisorUser>
            <AgentID>Agent.1.210</AgentID>
            <LoginName>walter.hannes</LoginName>
            <ExtLink>EVAL6_SDC_Walter.Hannes</ExtLink>
            <AdvisorVUType>1</AdvisorVUType>
        </CreateSVAdvisorUser>
    </method>
</request>

The response indicates the the SmartView for Advisors account was created successfully and returns the object ID of the new user account:


XML
<response version="1.0">
    <header>
        <sessionClosed />
    </header>
    <method>
        <CreateSVAdvisorUser>
            <User id="User.1.9" _type="obj" _status="inserted" />
        </CreateSVAdvisorUser>
    </method>
    <_status>OK</_status>
    <_systime>2017-03-13T23:58:29</_systime>
    <!-Cost 1083 mill seconds.-->
</response>