Company

Definition

A company entity in Reflag is used to group users, events and feedback. All data sent to Reflag from your side will be associated with a company in one way or another. For instance, when updating the details of an user, the company ID can be supplied to inform Reflag that the user "has been seen" acting as part of said company. In other cases, if the company is not explicitly identified, Reflag will use the last known company (default) that the user was part of.

Attributes

A company entity, aside from being a group for users acting in its stead, is also a collection of attributes. Each attribute is a keyvalue pair supplied by your application. There is one mandatory attribute each company must have: ID, and two special attributes Reflag uses in its UI for convenience: name and avatar. It is up to you to provide whichever attributes you deem necessary.

Reflag manages a set of computed attributes when you send data to Reflag:

  • First seen and Last seen denote the first and last time the company-related interactions have been sent to Reflag,

  • Event count is updated any time there is a new event received referencing the company.

Some use cases for company attributes could be: "plan" or "tier" to identify the subscription status; "monthly spend"; "geographic location", etc. Any company attribute can be used in company segments, attribute-based features as well as any targeting rule.

In Segment terminology, companies can be thought of as acting as a Group call. Company attributes can be thought of as Group traits.

Associating with users

Events sent to Reflag from your application, are usually identified only by the user that triggered said event. To associate these events with a company, make sure to associate the user with one. You can associate the user with multiple companies — each time the user is seen acting as part of another company, Reflag remembers, and the company becomes the new "default" for the user. Every subsequent event that lacks explicit company information will be associated with the default.

Reflag SDKs automatically maintain the associations between users and companies, as long as you supply their respective details on initialization.

Next steps

Last updated

Was this helpful?