Skip to main content

Last updated: 2024-06-07


AssignContactstoAgent Method


In this topic:


Overview


The AssignContactstoAgent method mass assigns a SmartView for Advisors user to multiple contact records under specific conditions. This method works when office security is enabled.


The AssignContactstoAgent method is invoked using the method operation.


The user invoking this method must have the Mass Assignments user right in SmartOffice.


A user assignment is created successfully when any of the following conditions exist:


  • The SmartView for Advisors user is the contact's primary advisor.
  • The SmartView for Advisors user is an advisor on any of the contact's policies or investment accounts.

If none of these conditions are met, or if the request parameters contain incorrect values, the XML response contains the message "No contacts for Assignment."


Parameters


Parameter NameTypeRequired?Description
AgentIDStringYesThis is the ID of the advisor record linked to the SmartView for Advisors user account. Note that this value is the primary key (e.g., 112), not the full object ID (e.g., Agent.1.112).
AgentOfficeIDStringYesThis is the ID of the office in which the SmartView for Advisors user account resides. Note that this value is the primary key (e.g., 1), not the full object ID (e.g., Office.1).

Example


The following example request assigns a SmartView for Advisors user (whose agent ID is 112) to all contacts that meet the method's assignment conditions:


XML
<request version='1.0'>
    <header>...</header>
    <method>
        <AssignContactstoAgent>
            <AgentID>112</AgentID>
            <AgentOfficeID>1</AgentOfficeID>
        </AssignContactstoAgent>
    </method>
</request>

The response includes the advisor's object ID and a confirmation message:


XML
<response version="1.0">
    <header>
        <sessionClosed/>
    </header>
    <method>
        <AssignContactstoAgent>
            <Response id="Agent.1.112">Contact Assignment is Done</Response>
        </AssignContactstoAgent>
    </method>
    <_status>OK</_status>
    <_systime>2015-10-09T22:49:16</_systime>
    <!--Cost 90 mill seconds.-->
</response>