add Contacts To Group
Adds multiple contacts to a specific group.
This method adds a list of contacts, identified by contactIds, to a group specified by groupId. The result is returned as a RainbowResult, indicating success or failure. Upon success, the group's details are updated in the groups property.
Validation Rules:
groupIdmust not be null or empty.contactIdsmust not be empty. Null or empty IDs within the list will be ignored.
Behavior:
If
groupIdis null or empty, the function returns a Failure with an appropriate error message.If
contactIdsis empty, the function fails with an error.If all contacts are successfully added, a RainbowResult success is returned.
If some contacts fail to be added, a Failure containing a list of errors is returned.
Return
A RainbowResult indicating success or failure (list of errors).
Parameters
The unique identifier of the group to which the contacts will be added. Must not be null or empty.
A list of unique identifiers for the contacts to add. Must not be empty after filtering out null/empty values.