Account contact roles

Each contact associated with an account can be assigned roles on the account and on the policies. Some of these roles are dependent on the LOB, or are shared between the account and the policy. This topic describes how to manage account-level contact roles.

Note:

The roles discussed in this topic are the roles users have on an account, such as Driver or NamedInsured. If you’re looking for information on API roles related to authentication, see Cloud API Developer Guide.

The base configuration of PolicyCenter includes several roles that can be assigned to a contact at the account level. The list of available roles is in the AccountContactRole typelist. The account contact endpoint provides properties that can be set to add and remove these roles to and from the account contact.

Adding roles to an account contact

Setting a role property on an account contact to true gives that contact the corresponding role. For example, setting the secondaryContact property to true will add the SecondaryContact role to the account contact. Setting it to false will remove the role from the contact.

You can add roles to an account contact when you create the contact, and you can also update those roles later. The following example creates an account contact on account pc:202 with the roles accountingContact and secondaryContact.

Command

POST /account/v1/accounts/pc:202/contacts

Request

{
  "data": {
    "attributes": {
        "contactSubtype": "Person",
        "firstName": "Samantha",
        "lastName": "Stewart",
        "primaryAddress": {
          "addressLine1": "2850 S. Delaware St.",
          "city": "San Mateo",
          "postalCode": "94403",
          "state": {
            "code": "CA"
          }
        },
        "accountingContact": true,
        "secondaryContact": true
    }
  }
}

Use the following command to update the roles on an existing account contact:

PATCH /account/v1/accounts/{accountID}/contacts/{contactID}

For example, the following request removes the SecondaryContact role from account contact pc:444 on account pc:202 and adds the NamedInsured role

Command

PATCH /account/v1/accounts/pc:202/contacts/pc:444

Request

{
  "data": {
    "attributes": {
        "namedInsured": true,
        "secondaryContact": false
    }
  }
}

Any roles you set to true will be added to existing roles already assigned to the account contact. For example, if contact pc:444 in the preceding example already had the role Driver, that contact would now have three roles assigned: NamedInsured, AccountingContact, and Driver.

Note:

Attempting to remove a role (setting the value to false) will return an error if the role is in use at the policy level for the contact.

Querying for contacts with a specified role

You can filter on accountContactRoles to retrieve all account contacts with a given role. This example retrieves all contacts in account pc:202 that have the role AccountingContact:

Command

GET /account/v1/accounts/pc:202/contacts?fields=id,accountContactRoles&filter=accountContactRoles:in:AccountingContact

Response

{
    "data": [
        {
            "attributes": {
                "accountContactRoles": [
                    {
                        "code": "AccountingContact",
                        "name": "AccountingContact"
                    },
			...
                ],
                "id": "pc:444"
            }
        }
    ]
…
}