Overview
OMS now integrates with Xero Accounting API to create invoices and purchase orders. The integration uses Oauth2 for authorization as specified in the Xero Api documentation
Xero Requirements
1. This integration requires each client to create their own App and obtain the necessary credentials (i.e client_id and client_secret) on the Xero Developer Portal.
While setting up the App, you will be required to provide a Redirect Uri, please enter the value below in the Redirect Uri field:
3. Ensure the Currencies your company supports are added to CurrencyRates page in Xero.
Xero integration Settings
- Name = Company Name
- Company URL or application URL = the customers website URL
- Select 'Web app'
- App Name = E.g Custom Gateway Integration
NOTE: Once you have clicked 'Create App' you will be taken to a new page outlining you app details. You have to click 'Generate Secret' highlighted on the screenshot below to generate the secret required for the xero integration on the Platform integration settings
Obtaining the Access Token:
1. Enter the Client ID, Client Secret (provided by client) and the Redirect Uri into the respective fields as seen in the screenshot below.
2. Click the Save button to save the details just entered.
3. Re-open the settings popup again and click the button 'Get Access Token'
4. This will redirect the user to the client's application and will prompt the user for the access credentials.
5. Once logged in, the user should be redirected back to the integration settings popup screen and should be automatically with the Access Token, Access Token Expiration, Refresh Token and Tenant ID.
6. Click the Save Button again to save the new credentials.
Integration Process Methods:
The integration provides two process methods: Tracked and Untracked.
A 'Tracked' process method creates Purchase orders and Invoices on the clients Xero Dashboard while a 'Untracked' process method only creates Invoices
The default (i.e when nothing is selected) is the same as selecting a process stream of 'Untracked'.
Accounts Setup:
The integration requires a Cost of Goods Sold Expense Account and an Inventory Asset Account for creating Purchase Orders. A Sales Account is needed for creating Invoices.
Xero provides these account types by default but the client can also create their own accounts if desired. The code for each account should be entered in the respective fields as seen in the screenshot below.
If the default accounts are used, you can enter the codes seen in the screenshot below.
Contact Name in Xero:
The API requires each company to have a contact set up in Xero. Enter the name of the contact set up for your company in Xero in this field.