Page tree
Skip to end of metadata
Go to start of metadata

Method: updateSmartGroup

Permissions to Run the Request

Account Owner, Account Administrators, Department Administrators, or custom roles


credentials (required)credentialsRead the description of the Credentials object.
groupId (required)stringThe ID of a smart group you would like to edit.
name (optional)stringThe name of the smart group.
rules (optional)array

A list of smart group rules.

attributeType (required)int

Can have the following values:

  • 1— department

  • 2 — group

  • 3 — user profile field

attributeId (optional)stringThe user field ID. Should be filled out only if attributeType is 3.
operator (required)int

For departments:

  • 1 — a single department without any daughter departments 
  • 2 — a department and all its daughter departments 

For groups and user fields:

  • always 1
value (required)string 

For departments:

  • the department ID

For groups:

  • the group ID

For user profile fields:

  • the user profile field value (for example, the value for the Last Name field is Smith)

Note: for the Country field, use the country ID, not its name. The country ID can be obtained with the Getting User Profile Fields method.

You can add multiple groups of conditions that should be satisfied to add a user to a smart group. All groups of conditions should be met at the same time.

Inside these groups of conditions, add rules. Any of the rules can be completed so that a user was added to the smart group.

Read more about smart groups, their rules and conditions in the Creating Smart Groups article.

Return Value

After the request has been successfully processed, the system returns an object with the following properties:

successboolTrue if the smart group has been successfully updated.

Possible Errors

Unknown GroupThe smart group is not found.
Permission deniedThe user has no permissions to update smart groups.
Wrong ParametersThe system failed to process the request because it did not contain all necessary parameters.

Sample Request

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV=""
        <name>NEW GROUP</name>
                    <value>Sales Manager</value>

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV=""
  • No labels