Skip to main content

Company Grouping

Company Grouping is a feature that gives you granular control over how users are allowed to interact with data in Flow.

This is done by creating segments, which represents a set of permissions for a role and is applied to a resource like an address or agreement. You'll find a full list of namespaces and endpoints that currently support data segmentation below.

Overview

This guide uses the case of two organisations and two users to demonstrate how Company Grouping can be used.

In our example we have two organisations, Organisation A and Organisation B, and two Users/Roles, User A and User B. User A has a Support role at Organisation A, and User B has a Technician role at Organisation B. Our intention is for User A to be able to access data related to their Support work at Organisation A, and User B to be able to access data related to their Technician work at Organisation B.

Prerequisites

Before you can start using Company Grouping, you need to have the following set up in your Flow instance:

  • Environment variable DATASEGMENTATION_ENABLED=true set on the component.
  • Two organizations, Organization A and Organization B
  • Two roles, Org A - Support and Org B - Technician
  • Two users, User A and User B
  • Two addresses, A Street and B Street

Availability

Company grouping can be used on following components of Flow. Not all endpoints support company grouping, refer to the list at the end of this document.

  • Flow GUI
  • Address
  • Customer
  • Product
  • Inventory
  • Billing
  • Ticket

Creating a segment

To create a segment, you need to log in as an administrator and navigate to the Segments section in the Administration menu. From here, you can create a new segment by clicking the Plus button in the top right corner.

Create a segment

The Create a new segment modal will open. We will create a segment for each of our two organisations, Organisation A and Organisation B.

Create a segment modal

Configuring a segment

To configure the permissions for a segment, you navigate to the Roles section in the Administration menu. From here, you can select the role you want to configure and select what permissions you want to associate with what segment for that role in the Data Segmentation Permissions widget.

Roles

Here, we only show us configuring the permissions for the Support role at Org B but you can configure the permissions for the Technician role at Org A in a similar way. We give the Support role read access to the Address and Outlet namespaces.

Roles

Assigning a segment to a resource

Once you have created a segment and configured the permissions for an associated role, you can assign one or more segments to a resource.

To assign a segment to a resource, you navigate to the resource you want to assign the segment to in the Permission Segment box. By default, resources will be assigned to the Default segment, which does not constrain access.

Default segment

Now, lets remove the default segment and assign the Organisation A segment to the Address resource, resulting in only the Technician role (or other roles with the same permissions on the same segment) being able to access the Address resource.

Assign segment

While we're at it, let's also assign the Organisation B segment to another address so that we can make sure that only the Support role can access the address.

Assign segment

Observing the results of segmentation

Let's take a look at how the results of our segmentation look like. We'll log in as User A and navigate to the Address resource.

Here we can see that the Organisation A segment is applied to the Address resource, and that only the Support role can access the resource.

Address
resource

Conclusion

In this guide, we've demonstrated how to use Company Grouping to control access to data in Flow in a multi-organisation, multi-role environment. We've shown how to create segments, configure permissions for roles, and assign segments to resources.

Our scenario is only a small example of how Company Grouping can be used in a real-world scenario. We hope this can serve as inspiration when using Company Grouping in your own environment.

Full list of namespaces and endpoints that currently support data segmentation

To use an endpoint when company grouping is turned on a user must be admin or a role of the user needs a segemnts permission on the coresponding namespace.

Address component

Uses segments set on the address object. If looking for an outlet, a check against segments attached to the address the outlet is connected to is made.

NamespaceEndpointMethods
address/addressaddress/addressCREATE, OPEN, LIST, UPDATE, DELETE
address/addressaddress/address/extendedOPEN, LIST
address/addressaddress/address/withlabelLIST
address/addressaddress/address/customerLIST
address/addressaddress/address/availableproductsLIST
address/addressaddress/address/agreementLIST
address/addressaddress/address/customeraddressrelationCREATE
address/addressaddress/address/flowaccessLIST
address/outletaddress/outletCREATE, OPEN, LIST, UPDATE, DELETE
address/outletaddress/outlet/extendedOPEN
address/outletaddress/outlet/addressOPEN
address/outletaddress/outlet/accessOPEN
address/outletaddress/outlet/fromportLIST
address/outletaddress/outlet/portfeasibilityOPEN

Customer component

Uses segemnt defined on the customer object.

NamespaceEndpointMethods
customer/customercustomer/customerCREATE, OPEN, LIST, UPDATE, DELETE
customer/customercustomer/customer/organisationCREATE, LIST, DELETE
customer/customercustomer/customer/profileCREATE
customer/customercustomer/customer/addressCREATE, LIST
customer/customercustomer/customer/extendedOPEN, LIST
customer/customercustomer/customer/fromaddressLIST
customer/customercustomer/customer/availableproductsLIST
customer/customercustomer/customer/agreementCREATE, LIST
customer/customercustomer/customer/facilitiesLIST

Product component

Uses segments defined on product or agreement object.

NamespaceEndpointMethods
catalogue/agreementcatalogue/agreementCREATE, OPEN, LIST, UPDATE, DELETE
catalogue/agreementcatalogue/agreement/createCREATE
catalogue/agreementcatalogue/agreement/restartCREATE
catalogue/agreementcatalogue/agreement/extendedOPEN, LIST
catalogue/agreementcatalogue/agreement/extendedfromaddressOPEN, LIST
catalogue/agreementcatalogue/agreement/extendedfromproductOPEN
catalogue/agreementcatalogue/agreement/extendedfromcustomerOPEN
catalogue/agreementcatalogue/agreement/serviceinstanceOPEN
catalogue/agreementcatalogue/agreement/customerOPEN
catalogue/agreementcatalogue/agreement/addressOPEN
catalogue/agreementcatalogue/agreement/operationOPEN
catalogue/agreementcatalogue/agreement/settingsLIST
catalogue/agreementcatalogue/agreement/outletsLIST
catalogue/agreementcatalogue/agreement/fromoutletOPEN
catalogue/agreementcatalogue/agreement/msmusernamesettingOPEN
catalogue/agreementcatalogue/agreement/msmsubscriberreferencesettingOPEN
catalogue/agreementcatalogue/agreement/flowaccessLIST
catalogue/agreementcatalogue/agreement/startbillingCREATE
catalogue/agreementcatalogue/agreement/stopbillingCREATE
catalogue/agreementcatalogue/agreement/alertsLIST
catalogue/agreementcatalogue/agreement/lightOPEN
catalogue/productcatalogue/productCREATE, OPEN, LIST, UPDATE, DELETE
catalogue/productcatalogue/product/priceitemLIST
catalogue/productcatalogue/product/productorderLIST
catalogue/productcatalogue/product/settingsLIST
catalogue/productcatalogue/product/labelCREATE, LIST, DELETE
catalogue/productcatalogue/product/fromserviceLIST
catalogue/productcatalogue/product/availabilityLIST
catalogue/productcatalogue/product/organisationLIST
catalogue/productcatalogue/product/extendedLIST
catalogue/productcatalogue/product/msmsubscriberreferencesettingOPEN
catalogue/productcatalogue/product/msmusernamesettingOPEN
catalogue/productcatalogue/product/msmsubscriptionreferencesettingOPEN
catalogue/productcatalogue/product/msmstaticipsettingOPEN
catalogue/productcatalogue/product/flowaccessOPEN, LIST
catalogue/productcatalogue/product/conditionsLIST

Billing component

Uses segment on the agreement the billing is assoicated with.

NamespaceEndpointMethods
billing/billingbilling/billingCREATE, OPEN, LIST, UPDATE, DELETE
billing/billingbilling/billing/addCREATE
billing/billingbilling/billing/economyUPDATE
billing/billingbilling/billing/productUPDATE
billing/billingbilling/billing/addressUPDATE
billing/billingbilling/billing/customerUPDATE
billing/billingbilling/billing/terminateUPDATE
billing/billingbilling/billing/childrenLIST

Ticket component

Currently there is no way in the GUI to set segment on a ticket. Create an event for creating and updateing a ticket to make sure segement is correctly set on the ticket.

NamespaceEndpointMethods
ticket/ticketticket/ticketCREATE, OPEN, LIST, UPDATE, DELETE
ticket/ticketticket/ticket/labelCREATE, LIST, DELETE
ticket/ticketticket/ticket/commentLIST
ticket/ticketticket/ticket/extendedOPEN
ticket/ticketticket/ticket/showcontactOPEN
ticket/ticketticket/ticket/affectedLIST
ticket/ticketticket/ticket/subscribedLIST
ticket/ticketticket/ticket/flowaccessOPEN, LIST
ticket/ticketticket/ticket/flowaccess/contactinfoOPEN
ticket/ticketticket/ticket/quickLIST