> For the complete documentation index, see [llms.txt](https://docs.mspp.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mspp.io/ninjaone-billing-scripts/also-to-ninjaone-license-sync.md).

# ALSO to NinjaOne License Sync

This script allows you to bring your ALSO subscription information into NinjaOne license management. With the release of NinjaOne 13.0 this license information can be used by NinjaOne Billing as a quantity source to automatically invoice customers.

<figure><img src="/files/dWk6DThViN3tvS3URrlz" alt=""><figcaption></figcaption></figure>

## **Requirements**

Make sure the [Getting Started](/ninjaone-auto-documentation/getting-started.md) guide has been followed

### **NinjaOne Products**

Core RMM

NinjaOne IT Asset Management (included in NinjaOne PSA)

### **Recommended Schedule**

Once per day

### **Role Setting Custom Fields**

<table data-full-width="true"><thead><tr><th>Display Name</th><th width="254.8">Name</th><th>Type</th><th>Permissions</th><th>Description</th></tr></thead><tbody><tr><td>ALSO Instance</td><td>alsoInstance</td><td>Text</td><td><p>Technician: Editable<br>Automations: Read/Write</p><p>API: None</p></td><td>Your ALSO primary domain for example: marketplace.also.co.uk</td></tr><tr><td>ALSO Account ID</td><td>alsoAccountId</td><td>Secure</td><td><p>Technician: Editable<br>Automations: Read/Write</p><p>API: None</p></td><td>Your ALSO Reseller Account ID</td></tr><tr><td>ALSO Username</td><td>alsoUsername</td><td>Secure</td><td><p>Technician: Editable<br>Automations: Read/Write</p><p>API: None</p></td><td>ALSO API User Username</td></tr><tr><td>ALSO Password</td><td>alsoPassword</td><td>Secure</td><td><p>Technician: Editable<br>Automations: Read/Write</p><p>API: None</p></td><td>ALSO API User Password</td></tr></tbody></table>

### **Global Custom Fields**

None

## Setup

First create a User in your ALSO portal to use with the API. Ensure it has read access to your customers, marketplace catalogue and subscription.

Next obtain your Reseller Account ID from ALSO. This can typically be seen in the URL in admin pages.

Finally make a note of your instance URL for example marketplace.also.co.uk and set these values in the ALSO custom fields on your Automation running machine.

Follow the details in the getting started guide for instructions on how to schedule this script.

There is a setting at the top of the script to let you choose to include the organization name in the license name or not.

## Matching

Organizations are matched based on the company name in ALSO to the Organization name in NinjaOne. If your names do not match you can edit the name override section at the top of the script to map the ALSO names to NinjaOne names.

## The Script

{% @github-files/github-code-block url="<https://github.com/lwhitelock/NinjaOneAutomation/blob/main/Billing_Scripts/ALSO_NinjaOne_Sync.ps1>" %}
