When I am trying to open Plesk panel object (Customer, Service Plan, etc.) in Business Manager by using 'Business Manager' link in Plesk, one of the following errors is shown:
Error: Customer not found: guid=d4630b35-4a91-4411-a99a-d3e7c1ca1c74 Unable to find the customer account in Business Manager
Or for service plans:
Error: Plan not found: guid=149617ea-bcce-4241-b3cb-e8fefaa01513
Broken links between CBM and Plesk.
Field named external_id for client in Plesk database ("psa") does not correspond value in "billing" database.
To make those links work again, we need to link-up objects from Plesk database with objects from CBM database.
Note: There is no definite and quick way to sync up the information from 2 databases because the only thing that shows definite relations of one object to another is
external_id and it is already broken. This means that the criteria you are using to associate objects is purely heuristic (similar names, similar emails and the like) and all opertaions have to be performed by hand for each object.
You need to find the corresponding object in CBM (CBM client for Plsek customer and CBM plan for Plesk service plan). It is recommended to create a text file with relations if there are many broken links. Include ID of object from Plesk and corresponding ID of object from CBM.
- After that, you can start fixing objects one by one with the following queries:
For customers (clients in CBM):
UPDATE `psa`.`clients` SET `psa`.`clients`.`external_id` = (SELECT `billing`.`clients`.`external_id` FROM `billing`.`clients` WHERE `billing`.`clients`.`client_id`=<CBM client ID>) WHERE `psa`.`clients`.`id`=<Plesk customer ID>;
<CBM client ID> and
<Plesk customer ID> with respective numbers (can be found via GUI).
For service plans (products in CBM):
UPDATE `psa`.`Templates` SET `psa`.`Templates`.`external_id` = (SELECT `billing`.`products`.`external_id` FROM `billing`.`products` WHERE `billing`.`products`.`product_id`=<Service plan ID in CBM>) WHERE `psa`.`Templates`.`id`=<Service plan ID in Plesk>;
<Service plan ID in CBM> and
<Service plan ID in Plesk> with respective numbers (can be found via GUI).
Above, billing is CBM database and psa is Plesk database.
After that, CBM links in Plesk should work again.