# Connecting and Disconnecting

Source: https://docs.astalty.com.au/guide/integrations/myob-integration/connecting-and-disconnecting

> Connect a MYOB company file to Astalty, check the connection, and disconnect it.

Connect a MYOB company file to Astalty, check the connection, and disconnect it.

## Connecting MYOB

> **MYOB invoicing is in beta**
>
> MYOB invoicing is enabled per account while in beta. Contact Astalty Support at <support@astalty.com.au> to turn it on.

You need the **Settings** update permission in Astalty, and a MYOB administrator sign-in for the company file.

Head to the [Integrations settings page](https://app.astalty.com.au/settings/integrations) and click **Connect** on the **MYOB** card.

![The MYOB card on the Integrations settings page, below the Xero card, with Connect](https://docs.astalty.com.au/assets/myob-card.png)

## Choose the Company File

MYOB then asks you to choose the company file and allow Astalty access to it. You may need to sign in to MYOB first, as an administrator of the company file.

1. Under **Select the business you'd like to connect**, choose the company file.
2. Click **Connect**.

![MYOB's connect screen with the company file chosen under Select the business you'd like to connect](https://docs.astalty.com.au/assets/myob-connect-company-file.png)

MYOB returns you to Astalty, which checks the connection straight away, then shows *Connected to* followed by the company file name. If the check fails, a refusal notice shows instead; see [Checking the Connection](#checking-the-connection).

![MYOB Integration Settings showing the company file Sunrise Community Care, Connection Connected, Default Income Account 4-5100 and Automatic Invoice Sync Enabled](https://docs.astalty.com.au/assets/myob-integration-settings.png)

The company file is chosen on MYOB's screen, not in Astalty. To switch to a different one, click **Actions**, then **Reconnect**, and choose it there.

Next, set the default income account: see [Configuring the Integration](https://docs.astalty.com.au/guide/integrations/myob-integration/configuring-the-integration). No invoice syncs until it is set, and whoever finalises a batch before then is emailed *We couldn't sync your invoices with your accounting platform*.

> **When the connection doesn't finish**
>
> Cancelling on MYOB's screen shows *MYOB did not finish the connection. Start the connection again and choose a company file.* Taking longer than 10 minutes shows *This MYOB connection was not started from this Astalty account, or took too long to finish. Start the connection again.* Either way nothing is saved, so click **Connect** again.

## Checking the Connection

Click **Actions**, then **Check Connection**. Astalty asks MYOB for the company file and shows *MYOB answered for the connected company file.* when it works.

![The Actions menu on the MYOB settings page with Check Connection, Reconnect and Disconnect](https://docs.astalty.com.au/assets/myob-check-connection.png)

If MYOB refuses, a **MYOB Did Not Confirm the Company File** notice gives MYOB's reason:

| Reason                                                                                                                  | What to do                                                                                                                  |
| ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| *MYOB no longer serves the company file this connection was made against. Reconnect and choose a company file.*         | [Reconnect](https://docs.astalty.com.au/guide/integrations/myob-integration/reconnecting-myob) and choose the company file. |
| *The MYOB connection has been disconnected and must be reconnected.*                                                    | [Reconnect](https://docs.astalty.com.au/guide/integrations/myob-integration/reconnecting-myob).                             |
| *MYOB rejected this connection and it must be reconnected:* followed by MYOB's reason                                   | [Reconnect](https://docs.astalty.com.au/guide/integrations/myob-integration/reconnecting-myob).                             |
| *MYOB rejected the refresh token:* followed by MYOB's reason                                                            | [Reconnect](https://docs.astalty.com.au/guide/integrations/myob-integration/reconnecting-myob).                             |
| MYOB's own access denied message                                                                                        | The MYOB user who connected can no longer reach the company file. Reconnect as a MYOB administrator of it.                  |
| *MYOB did not respond. Try again shortly.* or *MYOB could not be reached to check the company file. Try again shortly.* | Try again shortly.                                                                                                          |

Check Connection can be used 6 times a minute per account, and the automatic check after connecting counts towards that.

## Disconnecting MYOB

1. Open **Settings → Integrations → [MYOB](https://app.astalty.com.au/settings/integrations/myob)**.
2. Click **Actions**, then **Disconnect**.
3. Click **Disconnect** to confirm.

![The Actions menu on the MYOB settings page with Disconnect highlighted](https://docs.astalty.com.au/assets/myob-disconnect.png)

Astalty forgets straight away:

- the connection and the company file
- the Charge Item income account mappings and the cost code Job mappings

Astalty keeps:

- the default income account, which is used again if you reconnect. It is kept as an account number, so after connecting a different company file, choose the default income account again: the same number may not exist there, or may be a different account.
- invoices already in MYOB, which stay in MYOB and stay linked in Astalty

After disconnecting, payments recorded in MYOB no longer come back. Voiding an invoice that is in MYOB voids it in Astalty only: the invoice gets a sync error, the person who voided it gets an in-app notification and, unless another accounting platform has since been connected, the email *We couldn't void your invoice in your accounting platform*, and you delete or reverse it in MYOB yourself.

> **Disconnect Astalty in MYOB too**
>
> Disconnecting in Astalty doesn't remove Astalty from MYOB. MYOB still lists it as a connected app for the company file until a MYOB administrator removes it.

### Removing Astalty From MYOB

After disconnecting, Astalty shows **Disconnect Astalty in MYOB Too**.

1. Click **Open MYOB Connected Apps**.
2. Sign in to MYOB as an administrator.
3. Click **Disconnect** next to Astalty.

![MYOB's App Connections page listing Astalty with Renew connection and Disconnect](https://docs.astalty.com.au/assets/myob-connected-apps.png)
