Welcome to the Jungle Commerce Xero App
This app integrates your Jungle Commerce account with your Xero account.
Configuration
After authenticating with Xero, you can configure the app from its home page.
Xero Account Codes
You must select the Xero accounts to use for synchronisation:
- Cost of Goods Sold Account — used for COGS entries in inventory movement journals
- Inventory Account — used for purchase order and bill line items, credit note line items, and inventory movement journals
- Inventory Adjustment Account — used for inventory adjustment entries in journals
Purchase Order Synchronisation
Use the Enable synchronization of Jungle purchase orders to Xero purchase orders checkbox to control whether Jungle purchase orders are synchronised as purchase orders in Xero. This toggle only controls the purchase order itself; draft bill creation on PO close is controlled separately by the next setting.
Draft Bill On Purchase Order Close
Use the Automatically create a draft purchase bill in Xero when a Jungle purchase order is closed checkbox to control whether closing a Jungle purchase order produces a draft bill in Xero. When unchecked, closed Jungle purchase orders will not generate a bill — leaving the bill to be entered manually in Xero. This setting is enabled by default.
Bill Synchronisation
Use the Enable synchronization of Jungle bills to Xero draft bills checkbox to control whether Jungle bills are synchronised to Xero as draft bills. This is separate from the purchase order settings above — a Jungle bill is a distinct entity from a purchase order, and from the draft bill that can be created when a purchase order is closed. This setting is disabled by default.
Location Filtering
If enabled, the Synchronize data for specific Jungle locations only option allows you to restrict synchronisation to selected Jungle locations. When this option is not enabled, data from all locations will be synchronised.
Sales Channel Filtering
If enabled, the Synchronize COGS for specific sales channels only option lets you restrict cost of goods sold (COGS) synchronisation to selected Jungle sales channels. When this option is not enabled, COGS from all sales channels is synchronised.
This applies to the COGS entries in the daily inventory-movement manual journal. Both fulfilment (consumed inventory from sales orders) and customer returns are filtered by the same selected channels, so the journal's debits and credits stay balanced. Movements that are not tied to a sales order — such as inventory adjustments and transfers — are always synchronised regardless of this setting. Movements whose originating order has no known sales channel are excluded while this option is enabled.
This setting can be combined with Location Filtering: a movement must satisfy both filters to be synchronised.
Inventory Adjustment Journal Lines
The Synchronize inventory adjustment journal lines option (enabled by default) controls whether inventory-adjustment entries are included in the daily manual journal. When unchecked, the adjustment-account lines from inventory adjustments are omitted entirely, leaving only the COGS entries (consumed inventory from sales orders, and received inventory for customer returns). Combined with Sales Channel Filtering, this lets a merchant send only the COGS for selected sales channels to a Xero account, and nothing else.
Purchase Orders
Whenever a purchase order is created in Jungle, this app will create the same purchase order in Xero. If the PO supplier doesn't yet exist in Xero, it will be created. Jungle will set the Xero purchase order number to the Jungle purchase order reference.
If the purchase order supplier already exists as a contact in Xero, the purchase order will be linked to that contact. If the contact doesn't already exist in Xero, it will be created.
If the Jungle purchase order has no supplier, it will be created in Xero against a contact
called Default Jungle Supplier.
Whenever a purchase order is updated in Jungle, the updates will be applied in Xero.
If the Jungle purchase order has a status of Closed and the Automatically create a
draft purchase bill in Xero when a Jungle purchase order is closed setting is enabled
(the default), this app will also create a corresponding purchase bill (invoice) in Xero.
The purchase bill will be created with a DRAFT status, and will be updated in Xero if
the Jungle purchase order is modified thereafter.
Purchase order (and bill) line items will be created using the inventory account code configured in the app. You can set this account code (along with other account codes) from the app's configuration page after authenticating with Xero. Jungle does not explicitly set the tax rate on these line items. Instead, it relies on the default tax rate for the account in question.
Purchase Order Status
The status of a purchase order is mapped from Jungle to Xero as follows:
| Jungle Status | Xero Status |
|---|---|
Draft |
DRAFT |
Approved |
AUTHORISED |
Submitted |
AUTHORISED |
Accepted |
AUTHORISED |
Closed |
BILLED |
Voided |
DELETED |
Bills
A Jungle bill is a distinct entity from a purchase order. When Enable synchronization of
Jungle bills to Xero draft bills is enabled, this app creates a draft bill (an ACCPAY
invoice) in Xero for each Jungle bill, and keeps it up to date as the bill changes in Jungle.
Jungle emits an event for the bill and for each of its line items, and the app reacts to all of them — so a bill that is edited line by line still ends up correct in Xero. Repeated events for the same unchanged bill are deduplicated, so the stream of events Jungle emits for one bill results in a single write to Xero.
The bill is created with a DRAFT status, using the Jungle bill's reference as the Xero
invoice number. If a matching draft bill already exists in Xero it is updated in place; if a
bill with that number already exists in any other status, it is left untouched. Once a bill
has been synced, the app records the Xero invoice's ID against the Jungle bill so the two
stay linked.
The bill supplier is resolved to a Xero contact the same way as for purchase orders — an
existing contact is reused, otherwise a new one is created, and a bill with no supplier is
created against the Default Jungle Supplier contact. Bill line items are created using the
configured inventory account code, relying on that account's default tax rate.
Xero Manual Journals From Jungle Inventory Movements
This app will synchronise inventory movement information from Jungle to Xero. The app will periodically retrieve Jungle inventory movements of relevant types, and will convert these to manual journal entries. These movements are mapped as follows:
| Jungle Inventory Movement | Xero Manual Journal Entry |
|---|---|
| Consumed inventory from sales orders | Cost of inventory is added as a positive number to the COGS account, and a negative number to the inventory account |
| Received inventory for customer returns | Cost of inventory is added as a negative number to the COGS account, and a positive number to the inventory account |
| Unpacked inventory from sales order allocations | Cost of inventory is added as a negative number to the COGS account, and a positive number to the inventory account (reversing the original COGS entry) |
| Positive inventory adjustments | Cost of inventory is added as a negative number to the adjustment account, and a positive number to the inventory account |
| Negative inventory adjustments | Cost of inventory is added as a positive number to the adjustment account, and a negative number to the inventory account |
Inventory adjustments that reverse (unpack) an allocation to a transfer, purchase return, or customer return are not reflected in the manual journal. These are treated symmetrically with the original packing movements, which are also not journalled.
The COGS entries above (consumed inventory from sales orders, and received inventory for customer returns) can optionally be restricted to specific sales channels — see Sales Channel Filtering.
This app creates one manual journal per day in Xero. The app marks the start and end of day according to the AEST timezone.
Journal line items are created with a tax rate of: BAS Excluded.
Credit Notes
When a supplier return is Approved in Jungle, this app will create a corresponding credit note in Xero. The credit note will be linked to the same supplier on the supplier return (in Xero this may create a new supplier if none exists with the same name and id).
Credit notes will include line items for each returned product, with quantities and pricing (cost price of the product). Line items use the configured inventory account code. The tax rate is not explicitly set — it relies on the default tax rate for the account. The credit note will be created with a DRAFT status in Xero.
Credit notes in Xero will not be updated if they have any status other than DRAFT; however, credit notes with DRAFT status will be updated when line item changes occur.