Question

Office 365 Offer Compatibility Checker requires the file incompatibilitylist.json to have all incompatible service plans included into it. This file is usually generated by the script autoconf.py, see the quote from the Office 365 documentation, the Configuring Offers chapter:

3. The script also creates the incompatibilitylist.json file, which contains the offer compatibility information. You must keep this file because it will be used later in the Configuring Offer Compatibility Checker section.

The file incompatibilitylist.json does not include service plans of resellers, so these plans have to be added manually, see the Configuring Offers for Resellers chapter:

On the branding site of the 2-Tier CSP Distributor of the 2-Tier CSP Reseller, update the incompatibilitylist.json file. You must add the offer compatibility information for the Office 365 service plans of the reseller account of the 2-Tier CSP Reseller. Note that you must use the identifiers of the Office 365 service plans obtained from the reseller account of the 2-Tier CSP Reseller.

However, in case of big number of resellers the maintenance of the file incompatibilitylist.json became too difficult. Is there any way to automate this procedure?

Answer

In order to generate the file incompatibilitylist.json containing all delegated incompatible plans, the script generateIncompatibilityList.py can be used. This script does the following:

  1. It builds list of the resellers which have incompatible plans delegated (only 1-tier resellers are included)

  2. It searches for the list of plans delegated from the incompatible provider plans per reseller and adds these plans to the incompatibility list for every reseller

For example, there is a reseller which has a delegated plan:

Provider (has plan #10)
   |------ 1st tier reseller (has plan #15 created from the delegated #10)

The plan #10 is for the offer Microsoft Office 365 Business Essentials which is not allowed by Microsoft to purchase more than 1 per a tenant. So the file incompatibilitylist.json containing all delegated incompatible plans can be generated the following way:

  1. Download the file generateIncompatibilityList.py to the node, where the Billing database is running

  2. Edit the file. Pay attention to teh following section:

    host = '127.0.0.1'
    db = 'pba'
    login = 'pba'
    passwd = ''
    
    incompatibilitylist_path = "incompatibilitylist.json"
    # Incompatible SP of the provider
    incompatiblePlansArr = [
    # Office 365 Essentials plans
    [], 
    # Office 365 Premium plans
    [],
    # Office 365 Business plans
    []
    ]
    

    specify the password of the user pba the passwd field. The array incompatiblePlansArr has to be composed the following way: every line contains incompatible service plans included into brackets and sepatated by commas. For example, the provider has the following plans:

    • #10 Microsoft Office Essentials
    • #11 Microsoft Office Essentials annual

    both are based on the same offer Microsoft Office 365 Business Essentials, and thus, these plans are incompatible. These plans must be specified the following way:

    # Office 365 Essentials plans
    [10,11], 
    
  3. Save changes and run the script:

    # python generateIncompatibilityList.py
    

    the generated file incompatibilitylist.json will have the content like below:

    {
    "10": [
    "10",
    "11"
    ],
    "11": [
    "10",
    "11"
    ],
    "15": [
    "15",
    "16"
    ],
    "16": [
    "15",
    "16"
    ]
    }
    

    here, the plans 10,11 belong to the provider, and 15,16 belong to the reseller (copied from the delegated 10 and 11).

  4. Use the generated file to configure Offer Compatibility Checker

Internal content