Account web services
Use the AccountAPI web service to add documents to accounts, add notes to accounts, and find account public IDs.
Add documents to an account
Use the addDocumentToAccount method to add a document to an account. The method is relatively straightforward, taking an account’s public ID and a Document object and adds the document to the account. PolicyCenter returns the public ID of the newly added document.
Add notes to an account
Use the addNoteToAccount method to add a note to an account. The method is relatively straightforward, taking an account’s public ID and a Note object and adds the document to the account. PolicyCenter returns the public ID of the newly added note.
Find accounts
There are two ways to find accounts, either by account number or by complex criteria.
Use the findAccountPublicIdByAccountNumber
method to find an account’s public ID given its account number. It
returns the public ID of the account, or null if there is no such account.
accountPublicID = accountAPI.findAccountPublicIdByAccountNumber("ABC-00001");In contrast, the findAccounts method is more robust
and allows you to search for multiple accounts that fit certain criteria.
For example, you could find accounts that match a certain account status
or from a certain city. To use it, create a new AccountSearchCriteria object,
fill in properties that match what you want to search for, and pass it
to findAccounts.
AccountSearchCriteria acs = new AccountSearchCriteria();
acs.setCity("San Francisco");
accounts = accountAPI.findAccounts(acs);
// get first result in the array...
accountPublicID = accounts[0];
Assign activities
You can remotely add and assign an activity for an account by using the addAndAutoAssignActivityForAccount method. PolicyCenter generates an activity based on the activity type and the activity pattern code and then auto-assigns the activity.
It takes a String account public ID, an ActivityType object, a String activity pattern code,
a String activity pattern
code, and an array of activity properties of type ActivityField. The method has
no return value.
Add contacts to an account
You can remotely add a contact to an account
by using the addContactToAccount
method. It takes a String
account public ID and an account contact of type AccountContact.
The method adds the given account contact
to the account, and returns the public ID of the new AccountContact.
Add location to an account
You can remotely add a location to an account
by using the addLocationToAccount
method. It takes a String
account public ID, an AccountLocation
object, and returns the String
public ID of the new AccountLocation
entity.
Retrieve account numbers
You can remotely get the location to an account
by using the getAccountNumber
method. It accepts a String
account public ID and returns the associated String account number.
Check for active policies
You can remotely check for active policies
for the account by using the hasActivePolicies
method. A policy is considered active if it has any PolicyPeriod entities that are
issued and are effective at the current date and time.
The method accepts a String account public ID. The
method returns true if
the account has active policies, otherwise, false.
Insert accounts
You can remotely insert an account by using the insertAccount method. The method accepts an ExternalAccount entity, which is a parallel to the Account entity. The ExternalAccount entity contains a subset of the properties on the internal non-SOAP Account entity due to the necessity to simplify the entity for serialization across the SOAP protocol.
After importing the external account into
PolicyCenter as an Account
entity, PolicyCenter returns the resulting String public ID of the new Account entity.
Merge accounts
You can remotely merge two accounts by using the mergeAccounts method. This task is available from this web service but is not provided in the PolicyCenter reference implementation in the user interface. You must decide which account is the merged account and which account to discard after the merge is complete.
The method takes two String account public IDs. The
first public ID represents the source account to be copied then discarded
afterward. The second public ID represents the destination account to
have the source destination account merged with it. The method returns
nothing.
See also
- To customize the operations that are performed after merging accounts, see Account plugin.
Transfer policies
You can remotely transfer policies from one
account to another by using the transferPolicies
method. Provide an array of String
policy public IDs, the public ID of the source account, and the public
ID of the destination account.
See also
- To customize the operations that are performed after transferring accounts, see Account plugin.
Update account contacts
You can remotely update the contact information
for account contacts by using the updateAccountContact
method. You provide a String
account public ID, a String
contact display name, and account contact information encapsulated in
an AccountContactInfo
entity. Notice that this argument is the AccountContactInfo entity and
not the AccountContact
entity. AccountContactInfo
simply encapsulates an Address
entity in its PrimaryAddress
property. Populate an Address
entity with the new information and set the PrimaryAddress property on the
AccountContactInfo entity.
PolicyCenter looks at the specified account
and finds the contact with the provided display name. PolicyCenter then
updates the contact with the information in the AccountContactInfo.
