add Contact To Group
Adds a contact to a specific group.
This method adds a contact, identified by contactId, 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.contactIdmust not be null or empty.
Behavior:
If
groupIdorcontactIdis null or empty, the function returns a Failure with an appropriate error message.If the contact is successfully added, a Success is returned.
If the operation fails, a Failure containing an error is returned.
Return
A RainbowResult indicating success or failure.
Parameters
The unique identifier of the group to which the contact will be added. Must not be null or empty.
The unique identifier of the contact to add to the group. Must not be null or empty.