How to set up an integration connection across multiple branches

What is a multi-branch integration connection?

This is a modal window that opens when you click on the “Connect” button in the application card. In it, the user can choose and connect the integration in all branches available to him at a time.

Flow connection integration in multiple branches from the user side:

1. The user clicks on the “Connect” button in the application card.
2. A modal window appears with a choice of branches available to him (available — those in which he can connect the integration, that is, in those where he has the right “Manage user rights”). If only one branch is available to him, the modal window with the choice of branches will not appear. If this integration is already enabled in some branches, they will not be available for selection.
3. The user selects either specific branches, or clicks the checkbox “Select all branches”. There is also a function to search for a branch by name.
4. User clicks on the “Next” button and goes to the rights agreement screen. Clicks on the “Continue” button.
5. The user goes to the integrator's website and registers.
6. In all selected branches, the integration changes to the “Connected” status.

In order to set up an integration connection in your application in several branches, you need to:

1. Go to the Developer's Personal Account.
2. Go to the application in the tab “Settings for development”.
3. Mark the checkbox “Allow to add the application to several branches”.
4. Save changes.


What else is important to know:

1. If the user has selected several branches, when registering, your service will receive not one branch ID, as before, but an array of branch IDs of the form ?salon_ids[]=YYY&salon_ids[]=XXX. The request to activate the integration must be sent to all received branches in the array, otherwise the integration will not be activated, and you, for your part, will not get access to the branches API and will not be able to add your webhooks to these branches.

2. If two settings are selected at the same time — registration via iframe and connection in several branches — an array of IDs will also be transferred to the iframe when selecting several branches (you can read about registration through iframe in this article).

3. If two settings are selected at the same time — data transfer and connection in several branches — as before, user_data + an array of IDs of the selected branches will be transferred to your service (you can read about data transfer in this article).