Package com.segment.analytics.messages
Class GroupMessage
java.lang.Object
com.segment.analytics.messages.GroupMessage
- All Implemented Interfaces:
Message
public abstract class GroupMessage extends Object implements Message
The group API call is how you associate an individual user with a group—be it a company,
organization, account, project, team or whatever other crazy name you came up with for the same
concept! It also lets you record custom traits about the group, like industry or number of
employees. Calling group is a slightly more advanced feature, but it’s helpful if you have
accounts with multiple users.
Use builder(java.lang.String)
to construct your own instances.
- See Also:
- Group
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GroupMessage.Builder
Fluent API for creatingGroupMessage
instances.Nested classes/interfaces inherited from interface com.segment.analytics.messages.Message
Message.Type
-
Constructor Summary
Constructors Constructor Description GroupMessage()
-
Method Summary
Modifier and Type Method Description static GroupMessage.Builder
builder(String groupId)
Start building anGroupMessage
instance.abstract String
groupId()
GroupMessage.Builder
toBuilder()
abstract Map<String,?>
traits()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.segment.analytics.messages.Message
anonymousId, context, integrations, messageId, timestamp, type, userId
-
Constructor Details
-
GroupMessage
public GroupMessage()
-
-
Method Details
-
builder
Start building anGroupMessage
instance.- Parameters:
groupId
- A unique identifier for the group in your database.- Throws:
IllegalArgumentException
- if the event name is null or empty- See Also:
- Group ID
-
groupId
-
traits
-
toBuilder
-