> ## Documentation Index
> Fetch the complete documentation index at: https://developers.pleo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Create, Update, and Archive Accounts

export const HowToCreateUpdateArchiveAccountsReconciliationDiagram = () => {
  const [isDark, setIsDark] = useState(false);
  useEffect(() => {
    const check = () => setIsDark(document.documentElement.classList.contains("dark"));
    check();
    const observer = new MutationObserver(check);
    observer.observe(document.documentElement, {
      attributes: true,
      attributeFilter: ["class"]
    });
    return () => observer.disconnect();
  }, []);
  const nodeFill = isDark ? "#212222" : "#EEF4F4";
  const nodeStroke = isDark ? "#848989" : "#212222";
  const nodeTextStyle = isDark ? ",color:#EEF4F4" : ",color:#131414";
  const linkStyle = isDark ? "" : "linkStyle default stroke:#848989,stroke-width:1px;";
  const themeVariables = {
    fontSize: "12px",
    ...isDark ? {} : {
      edgeLabelBackground: "#FAFCFC"
    }
  };
  const diagram = `
%%{init: {"themeVariables": ${JSON.stringify(themeVariables)}}}%%
flowchart TD
    A[Fetch active Accounts from AS] --> B[Fetch active and archived Accounts from Pleo]
    B --> C[Match each AS Account to Pleo Account by externalId]
    C -->|Found, active, match| D[Preserve]
    C -->|Found, active, differs| E[Update name / code]
    C -->|Found, archived| F[Unarchive and update if needed]
    C -->|Not found| G[Create new Account]
    D --> H[Next account]
    E --> H
    F --> H
    G --> H
    H --> I{More accounts?}
    I -->|Yes| C
    I -->|No| J[Archive unmatched active Pleo Accounts]
    J --> K[Sync Complete]

    style A white-space:normal,fill:${nodeFill},stroke:${nodeStroke}${nodeTextStyle}
    style B white-space:normal,fill:${nodeFill},stroke:${nodeStroke}${nodeTextStyle}
    style C white-space:normal,fill:${nodeFill},stroke:${nodeStroke}${nodeTextStyle}
    style D white-space:normal,fill:${nodeFill},stroke:${nodeStroke}${nodeTextStyle}
    style E white-space:normal,fill:${nodeFill},stroke:${nodeStroke}${nodeTextStyle}
    style F white-space:normal,fill:${nodeFill},stroke:${nodeStroke}${nodeTextStyle}
    style G white-space:normal,fill:${nodeFill},stroke:${nodeStroke}${nodeTextStyle}
    style H white-space:normal,fill:${nodeFill},stroke:${nodeStroke}${nodeTextStyle}
    style I white-space:normal,fill:${nodeFill},stroke:${nodeStroke}${nodeTextStyle}
    style J white-space:normal,fill:${nodeFill},stroke:${nodeStroke}${nodeTextStyle}
    style K white-space:normal,fill:${nodeFill},stroke:${nodeStroke}${nodeTextStyle}
${linkStyle}
`;
  return <Mermaid chart={diagram} />;
};

export const CreateUpdateArchiveAccountsDiagram = () => {
  const [isDark, setIsDark] = useState(false);
  useEffect(() => {
    const check = () => setIsDark(document.documentElement.classList.contains("dark"));
    check();
    const observer = new MutationObserver(check);
    observer.observe(document.documentElement, {
      attributes: true,
      attributeFilter: ["class"]
    });
    return () => observer.disconnect();
  }, []);
  const nodeFill = isDark ? "#212222" : "#EEF4F4";
  const nodeStroke = isDark ? "#848989" : "#E1E6E6";
  const nodeTextStyle = isDark ? ",color:#EEF4F4" : ",color:#131414";
  const linkStyle = isDark ? "" : "linkStyle default stroke:#848989,stroke-width:1px;";
  const diagram = `
%%{init: {"themeVariables": {"fontSize": "14px"}}}%%
flowchart LR
    S1["1. Create Accounts for New AS Entries"] --> S2["2. Unarchive or Update Existing Accounts"] --> S3["3. Archive Accounts with No Matching AS Entry"]

click S1 "#1-create-accounts-for-new-as-entries"
click S2 "#2-unarchive-or-update-existing-accounts"
click S3 "#3-archive-accounts-with-no-matching-as-entry"

style S1 white-space:normal,fill:${nodeFill},stroke:${nodeStroke}${nodeTextStyle}
style S2 white-space:normal,fill:${nodeFill},stroke:${nodeStroke}${nodeTextStyle}
style S3 white-space:normal,fill:${nodeFill},stroke:${nodeStroke}${nodeTextStyle}
${linkStyle}
`;
  return <Mermaid chart={diagram} />;
};

export const CoASyncWorkflowDiagramTopNav = ({highlight}) => {
  const [isDark, setIsDark] = useState(false);
  useEffect(() => {
    const check = () => setIsDark(document.documentElement.classList.contains("dark"));
    check();
    const observer = new MutationObserver(check);
    observer.observe(document.documentElement, {
      attributes: true,
      attributeFilter: ["class"]
    });
    return () => observer.disconnect();
  }, []);
  const nodeFill = isDark ? "#212222" : "#EEF4F4";
  const nodeStroke = isDark ? "#848989" : "#E1E6E6";
  const nodeTextStyle = isDark ? ",color:#EEF4F4" : ",color:#131414";
  const subgraphFill = isDark ? "#131414" : "#ffffff";
  const subgraphStroke = isDark ? "#848989" : "#6B7070";
  const subgraphTextStyle = isDark ? ",color:#EEF4F4" : ",color:#6B7070";
  const linkStyle = isDark ? "" : "linkStyle default stroke:#848989,stroke-width:1px;";
  const highlightStyle = highlight ? `style ${highlight} stroke:#FEB6FE,stroke-width:2px` : "";
  const shape = (id, label) => `${id}["${label}"]`;
  const diagram = `
%%{init: {"themeVariables": {"fontSize": "14px"}}}%%
flowchart LR

subgraph AS["Accounting System"]
    ${shape("source", "Chart of Accounts")}
end

subgraph Pleo["Pleo APIs"]
    ${shape("A", "1. Fetch and Match Accounts")}
    ${shape("B", "2. Create, Update, and Archive Accounts")}
    A --> B
end

source --> A

click A "/docs/current/how-tos/accounting-integrations/imports/accounts/how-to-sync-accounts"
click B "/docs/current/how-tos/accounting-integrations/imports/accounts/how-to-create-update-archive-accounts"

style A white-space:normal,fill:${nodeFill},stroke:${nodeStroke}${nodeTextStyle}
style B white-space:normal,fill:${nodeFill},stroke:${nodeStroke}${nodeTextStyle}
style source white-space:normal,fill:${nodeFill},stroke:${nodeStroke}${nodeTextStyle}
style AS fill:${subgraphFill},stroke:${subgraphStroke}${subgraphTextStyle}
style Pleo fill:${subgraphFill},stroke:${subgraphStroke}${subgraphTextStyle}

${highlightStyle}
${linkStyle}
`;
  return <Mermaid chart={diagram} />;
};

export const WhatComesNext = ({children, href}) => <div className="mt-4">
    <a href={href} className="btn-primary">
      {children} →
    </a>
  </div>;

export const NoteCallout = ({title, children}) => <div className="callout-box callout-note">
    <div className="callout-row">
      <span className="callout-icon">
        <svg width="22" height="22" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path d="M208,104a79.86,79.86,0,0,1-30.59,62.92A24.29,24.29,0,0,0,168,186v6a8,8,0,0,1-8,8H96a8,8,0,0,1-8-8v-6a24.11,24.11,0,0,0-9.3-19A79.87,79.87,0,0,1,48,104.45C47.76,61.09,82.72,25,126.07,24A80,80,0,0,1,208,104Z" opacity="0.2" /><path d="M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-16,0a72,72,0,0,0-73.74-72c-39,.92-70.47,33.39-70.26,72.39a71.65,71.65,0,0,0,27.64,56.3A32,32,0,0,1,96,186v6h64v-6a32.15,32.15,0,0,1,12.47-25.35A71.65,71.65,0,0,0,200,104Zm-16.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z" /></svg>
      </span>
      <div>
        {title && <div className="callout-title">
            {title}
          </div>}
        <div className="callout-body">
          {children}
        </div>
      </div>
    </div>
  </div>;

export const RememberCallout = ({title, children}) => <div className="callout-box callout-remember">
    <div className="callout-row">
      <span className="callout-icon">
        <svg width="22" height="22" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path d="M229.66,98.34,172.39,155.8c11.46,22.93-1.72,45.86-10.11,57a8,8,0,0,1-12,.83L42.34,105.76A8,8,0,0,1,43,93.85c29.65-23.92,57.4-10,57.4-10l57.27-57.46a8,8,0,0,1,11.31,0L229.66,87A8,8,0,0,1,229.66,98.34Z" opacity="0.2" /><path d="M235.32,81.37,174.63,20.69a16,16,0,0,0-22.63,0L98.37,74.49c-10.66-3.34-35-7.37-60.4,13.14a16,16,0,0,0-1.29,23.78L85,159.71,42.34,202.34a8,8,0,0,0,11.32,11.32L96.29,171l48.29,48.29A16,16,0,0,0,155.9,224c.38,0,.75,0,1.13,0a15.93,15.93,0,0,0,11.64-6.33c19.64-26.1,17.75-47.32,13.19-60L235.33,104A16,16,0,0,0,235.32,81.37ZM224,92.69h0l-57.27,57.46a8,8,0,0,0-1.49,9.22c9.46,18.93-1.8,38.59-9.34,48.62L48,100.08c12.08-9.74,23.64-12.31,32.48-12.31A40.13,40.13,0,0,1,96.81,91a8,8,0,0,0,9.25-1.51L163.32,32,224,92.68Z" /></svg>
      </span>
      <div>
        {title && <div className="callout-title">
            {title}
          </div>}
        <div className="callout-body">
          {children}
        </div>
      </div>
    </div>
  </div>;

<CoASyncWorkflowDiagramTopNav highlight="B" />

<div className="border-[1px] rounded-none p-4 bg-[#ffffff] border-[#FEB6FE] dark:bg-[#131414] dark:border-[#FEB6FE]">
  <CreateUpdateArchiveAccountsDiagram />
</div>

This how-to covers the write operations for Chart of Accounts Sync: creating new Accounts, updating or unarchiving existing Accounts, and archiving Accounts that are no longer active in the Accounting System.

Run this after [How to Sync Accounts](/docs/current/how-tos/accounting-integrations/imports/accounts/how-to-sync-accounts), which covers fetching and matching accounts from both systems.

## Prerequisites

Before you begin:

* You have completed [How to Sync Accounts](/docs/current/how-tos/accounting-integrations/imports/accounts/how-to-sync-accounts) and determined what action is needed for each account
* Your integration is authenticated using one of the [supported authentication methods](/docs/current/integration-design/auth/integration-design-auth-overview#authentication-policy-overview)
* Your integration can call Pleo's Chart of Accounts API endpoints

## Scenario

This how-to continues from the [How to Sync Accounts](/docs/current/how-tos/accounting-integrations/imports/accounts/how-to-sync-accounts) scenario. After matching, the following actions are required:

| AS Account             | Pleo Account           | Action    |
| ---------------------- | ---------------------- | --------- |
| 1000 - Office Supplies | 1000 - Office Supplies | No action |
| 2000 - Travel          | 2000 - Travel          | Unarchive |
| 3000 - Software        | —                      | Create    |
| 4000 - Marketing       | 4000 - Advertising     | Update    |
| —                      | 5000 - Entertainment   | Archive   |

The diagram below shows where these operations fit in the full reconciliation loop.

<HowToCreateUpdateArchiveAccountsReconciliationDiagram />

## Steps

### 1. Create Accounts for New AS Entries

**API Endpoint**: POST [`/v1/chart-of-accounts`](/reference/accounts/create-a-new-account)

If an AS account has no matching Pleo Account, create a new Account.

**Example Pseudo:**

```pseudo theme={null}
if matchedAccount is null:
    newAccount.externalId = account.externalId
    newAccount.code       = account.code
    newAccount.name       = account.name
    newAccount.archived   = false
    POST newAccount to Pleo
```

#### Example Request

<Tabs>
  <Tab title="OAuth 2.0">
    ```bash theme={null}
    curl -X POST "https://external.staging.pleo.io/v1/chart-of-accounts" \
      -H "Authorization: Bearer <access_token>" \
      -H "Content-Type: application/json" \
      -d '{
            "companyId": "12abc3d4-e567-890e-1234-abc56e78fabc",
            "externalId": "ext-3000",
            "code": "3000",
            "name": "Software",
            "archived": false
          }'
    ```
  </Tab>

  <Tab title="API Key">
    ```bash theme={null}
    curl --request POST \
      -u "pls_1ab2cd3e4f5g6h7a89b012c34de56f78_gabc90:" \
      -H "Accept: application/json;charset=UTF-8" \
      -H "Content-Type: application/json" \
      "https://external.staging.pleo.io/v1/chart-of-accounts" \
      -d '{
            "companyId": "12abc3d4-e567-890e-1234-abc56e78fabc",
            "externalId": "ext-3000",
            "code": "3000",
            "name": "Software",
            "archived": false
          }' \
    | jq
    ```
  </Tab>
</Tabs>

#### Example Response

```json theme={null}
{
  "data": {
    "id": "e5f6g7h8-i901-234i-5678-efg90i12defg",
    "companyId": "12abc3d4-e567-890e-1234-abc56e78fabc",
    "externalId": "ext-3000",
    "code": "3000",
    "name": "Software",
    "archived": false
  }
}
```

#### What it looks like in Pleo Web App

<div style={{ textAlign: "center" }}>
  <img src="https://mintcdn.com/pleo-61d4d38b/VP2WvZ7pPDGk7Esn/images/current/accounting-integrations/imports/chart-of-accounts/ui-chart-of-accounts-tab-active-software-added.png?fit=max&auto=format&n=VP2WvZ7pPDGk7Esn&q=85&s=11fb2a4706f940b87acae8d483ce117e" alt="Active Accounts with Software created" width="100%" style={{ display: "block", margin: "0 auto" }} data-path="images/current/accounting-integrations/imports/chart-of-accounts/ui-chart-of-accounts-tab-active-software-added.png" />
</div>

<br />

<NoteCallout>
  If you have a large number of accounts to create, you can send up to 1000 in a single request using the batch endpoint. See [How to Create Multiple Accounts in a Single Request](/docs/current/how-tos/accounting-integrations/imports/accounts/how-to-batch-create-accounts).
</NoteCallout>

***

### 2. Unarchive or Update Existing Accounts

**API Endpoint**: PUT [`/v1/chart-of-accounts/{accountId}`](/reference/accounts/update-an-account)

If a matching Account is found:

* **AS account is active, Pleo Account is archived:** Unarchive by setting `archived: false` and update name and code if they differ.
* **AS account is active, Pleo Account name or code differs:** Update the Account to match the AS.
* **AS account is active, Pleo Account name and code match:** No action required.

**Example Pseudo:**

```pseudo theme={null}
if matchedAccount.archived == true:
    matchedAccount.archived = false
    matchedAccount.name     = account.name
    matchedAccount.code     = account.code
    PUT matchedAccount to Pleo

else if matchedAccount.name != account.name or matchedAccount.code != account.code:
    matchedAccount.name = account.name
    matchedAccount.code = account.code
    PUT matchedAccount to Pleo
```

### Unarchive

#### Example Request

The "2000 - Travel" Account is unarchived in this example.

<Tabs>
  <Tab title="OAuth 2.0">
    ```bash theme={null}
    curl -X PUT "https://external.staging.pleo.io/v1/chart-of-accounts/d8371c2d-3f62-47df-a8d6-6a3ba6387e00" \
      -H "Authorization: Bearer <access_token>" \
      -H "Content-Type: application/json" \
      -d '{
            "externalId": "ext-2000",
            "code": "2000",
            "name": "Travel",
            "archived": false
          }'
    ```
  </Tab>

  <Tab title="API Key">
    ```bash theme={null}
    curl --request PUT \
      -u "pls_1ab2cd3e4f5g6h7a89b012c34de56f78_gabc90:" \
      -H "Accept: application/json;charset=UTF-8" \
      -H "Content-Type: application/json" \
      "https://external.staging.pleo.io/v1/chart-of-accounts/d8371c2d-3f62-47df-a8d6-6a3ba6387e00" \
      -d '{
            "externalId": "ext-2000",
            "code": "2000",
            "name": "Travel",
            "archived": false
          }' \
    | jq
    ```
  </Tab>
</Tabs>

#### Example Response

```json theme={null}
{
  "data": {
    "id": "d8371c2d-3f62-47df-a8d6-6a3ba6387e00",
    "companyId": "12abc3d4-e567-890e-1234-abc56e78fabc",
    "externalId": "ext-2000",
    "code": "2000",
    "name": "Travel",
    "archived": false
  }
}
```

#### What it looks like in Pleo Web App

<div style={{ textAlign: "center" }}>
  <img src="https://mintcdn.com/pleo-61d4d38b/VP2WvZ7pPDGk7Esn/images/current/accounting-integrations/imports/chart-of-accounts/ui-chart-of-accounts-tab-active-travel-unarchived.png?fit=max&auto=format&n=VP2WvZ7pPDGk7Esn&q=85&s=2215a008ed17747e76b3b818112776ff" alt="Active Accounts with Travel unarachived" width="100%" style={{ display: "block", margin: "0 auto" }} data-path="images/current/accounting-integrations/imports/chart-of-accounts/ui-chart-of-accounts-tab-active-travel-unarchived.png" />
</div>

<br />

<div style={{ textAlign: "center" }}>
  <img src="https://mintcdn.com/pleo-61d4d38b/VP2WvZ7pPDGk7Esn/images/current/accounting-integrations/imports/chart-of-accounts/ui-chart-of-accounts-tab-archived-empty.png?fit=max&auto=format&n=VP2WvZ7pPDGk7Esn&q=85&s=d2e108eee3cf4450a1abdaff34b2a85f" alt="Archived Accounts Empty" width="100%" style={{ display: "block", margin: "0 auto" }} data-path="images/current/accounting-integrations/imports/chart-of-accounts/ui-chart-of-accounts-tab-archived-empty.png" />
</div>

### Update

#### Example Request

The "4000 - Advertising" Account is renamed to "4000 - Marketing" to match the AS in this example.

<Tabs>
  <Tab title="OAuth 2.0">
    ```bash theme={null}
    curl -X PUT "https://external.staging.pleo.io/v1/chart-of-accounts/a470bfbe-8046-4b43-a4d9-4f5796acdd93" \
      -H "Authorization: Bearer <access_token>" \
      -H "Content-Type: application/json" \
      -d '{
            "externalId": "ext-4000",
            "code": "4000",
            "name": "Marketing",
            "archived": false
          }'
    ```
  </Tab>

  <Tab title="API Key">
    ```bash theme={null}
    curl --request PUT \
      -u "pls_1ab2cd3e4f5g6h7a89b012c34de56f78_gabc90:" \
      -H "Accept: application/json;charset=UTF-8" \
      -H "Content-Type: application/json" \
      "https://external.staging.pleo.io/v1/chart-of-accounts/a470bfbe-8046-4b43-a4d9-4f5796acdd93" \
      -d '{
            "externalId": "ext-4000",
            "code": "4000",
            "name": "Marketing",
            "archived": false
          }' \
    | jq
    ```
  </Tab>
</Tabs>

#### Example Response

```json theme={null}
{
  "data": {
    "id": "a470bfbe-8046-4b43-a4d9-4f5796acdd93",
    "companyId": "12abc3d4-e567-890e-1234-abc56e78fabc",
    "externalId": "ext-4000",
    "code": "4000",
    "name": "Marketing",
    "archived": false
  }
}
```

#### What it looks like in Pleo Web App

Before update:

<div style={{ textAlign: "center" }}>
  <img src="https://mintcdn.com/pleo-61d4d38b/VP2WvZ7pPDGk7Esn/images/current/accounting-integrations/imports/chart-of-accounts/ui-chart-of-accounts-tab-active-travel-unarchived.png?fit=max&auto=format&n=VP2WvZ7pPDGk7Esn&q=85&s=2215a008ed17747e76b3b818112776ff" alt="Active Accounts showing 4000 - Advertising" width="100%" style={{ display: "block", margin: "0 auto" }} data-path="images/current/accounting-integrations/imports/chart-of-accounts/ui-chart-of-accounts-tab-active-travel-unarchived.png" />
</div>

<br />

After Update:

<div style={{ textAlign: "center" }}>
  <img src="https://mintcdn.com/pleo-61d4d38b/VP2WvZ7pPDGk7Esn/images/current/accounting-integrations/imports/chart-of-accounts/ui-chart-of-accounts-tab-active-advertising-renamed-to-marketing.png?fit=max&auto=format&n=VP2WvZ7pPDGk7Esn&q=85&s=f26c1620a0888f9ee2f2564d071bd868" alt="Active Accounts showing 4000 - Marketing" width="100%" style={{ display: "block", margin: "0 auto" }} data-path="images/current/accounting-integrations/imports/chart-of-accounts/ui-chart-of-accounts-tab-active-advertising-renamed-to-marketing.png" />
</div>

***

### 3. Archive Accounts with No Matching AS Entry

**API Endpoint**: PUT [`/v1/chart-of-accounts/{accountId}`](/reference/accounts/update-an-account)

If a Pleo Account is active but its corresponding AS account is no longer active (or does not exist), archive the Account.

Do not delete Accounts. Archiving is non-destructive and reversible.

**Example Pseudo:**

```pseudo theme={null}
activeASExternalIds = activeASAccounts.map(a => a.externalId)

for account in pleoAccounts where archived == false:
    if account.externalId not in activeASExternalIds:
        account.archived = true
        PUT account to Pleo
```

#### Example Request

<Tabs>
  <Tab title="OAuth 2.0">
    ```bash theme={null}
    curl -X PUT "https://external.staging.pleo.io/v1/chart-of-accounts/7ea2006f-180e-4c52-a2bb-562d3a62fd48" \
      -H "Authorization: Bearer <access_token>" \
      -H "Content-Type: application/json" \
      -d '{
            "externalId": "5000",
            "code": "5000",
            "name": "Entertainment",
            "archived": true
          }'
    ```
  </Tab>

  <Tab title="API Key">
    ```bash theme={null}
    curl --request PUT \
      -u "pls_1ab2cd3e4f5g6h7a89b012c34de56f78_gabc90:" \
      -H "Accept: application/json;charset=UTF-8" \
      -H "Content-Type: application/json" \
      "https://external.staging.pleo.io/v1/chart-of-accounts/7ea2006f-180e-4c52-a2bb-562d3a62fd48" \
      -d '{
            "externalId": "5000",
            "code": "5000",
            "name": "Entertainment",
            "archived": true
          }' \
    | jq
    ```
  </Tab>
</Tabs>

<RememberCallout title="Remember">
  As this is a PUT action, include the current values for all fields; only `archived` should change.
</RememberCallout>

#### Example Response

```json theme={null}
{
  "data": {
    "id": "7ea2006f-180e-4c52-a2bb-562d3a62fd48",
    "companyId": "12abc3d4-e567-890e-1234-abc56e78fabc",
    "externalId": "5000",
    "code": "5000",
    "name": "Entertainment",
    "archived": true
  }
}
```

#### What it looks like in Pleo Web App

<div style={{ textAlign: "center" }}>
  <img src="https://mintcdn.com/pleo-61d4d38b/VP2WvZ7pPDGk7Esn/images/current/accounting-integrations/imports/chart-of-accounts/ui-chart-of-accounts-tab-active-no-match-entertainment.png?fit=max&auto=format&n=VP2WvZ7pPDGk7Esn&q=85&s=ce3df63cb248b56874e175c4f78023c5" alt="Archive Accounts showing that Entertainment is not longer part of the list" width="100%" style={{ display: "block", margin: "0 auto" }} data-path="images/current/accounting-integrations/imports/chart-of-accounts/ui-chart-of-accounts-tab-active-no-match-entertainment.png" />
</div>

<br />

<div style={{ textAlign: "center" }}>
  <img src="https://mintcdn.com/pleo-61d4d38b/VP2WvZ7pPDGk7Esn/images/current/accounting-integrations/imports/chart-of-accounts/ui-chart-of-accounts-tab-archived-entertainment.png?fit=max&auto=format&n=VP2WvZ7pPDGk7Esn&q=85&s=21d8c9316610b633f664947372f9de1c" alt="Archive Accounts showing that Entertainment was archived" width="100%" style={{ display: "block", margin: "0 auto" }} data-path="images/current/accounting-integrations/imports/chart-of-accounts/ui-chart-of-accounts-tab-archived-entertainment.png" />
</div>

***

## Result

The table below recaps what happened to each Account across all steps.

| Account                | AS Status | Pleo State Before     | Action     | Final Pleo State |
| ---------------------- | --------- | --------------------- | ---------- | ---------------- |
| 1000 - Office Supplies | Active    | Active, matches       | No action  | Active           |
| 2000 - Travel          | Active    | Archived              | Unarchived | Active           |
| 3000 - Software        | Active    | Does not exist        | Created    | Active           |
| 4000 - Marketing       | Active    | Active, name differed | Updated    | Active           |
| 5000 - Entertainment   | Not in AS | Active                | Archived   | Archived         |

Pleo now reflects the current Chart of Accounts from the AS.

| Account                | Final State in Pleo | In AS? | Aligned? |
| ---------------------- | ------------------- | ------ | :------: |
| 1000 - Office Supplies | Active              | Yes    |   ✓ Yes  |
| 2000 - Travel          | Active              | Yes    |   ✓ Yes  |
| 3000 - Software        | Active              | Yes    |   ✓ Yes  |
| 4000 - Marketing       | Active              | Yes    |   ✓ Yes  |
| 5000 - Entertainment   | Archived            | No     |   ✓ Yes  |

***

## What Comes Next?

<WhatComesNext href="/docs/current/guides/accounting-integrations/imports/accounts-sync-workflow-guide">
  Chart of Accounts Sync Workflow Guide
</WhatComesNext>

***

<div className="text-xs uppercase" style={{ fontVariant: 'small-caps' }}>
  this how-to is part of:
</div>

<div className="mt-4 flex flex-wrap gap-2">
  <a
    href="/docs/current/guides/accounting-integrations/imports/accounts-sync-workflow-guide"
    className="inline-flex items-center rounded-full border border-gray-300 dark:border-gray-600
px-3 py-1 text-xs font-medium
bg-white dark:bg-[#1f262b] text-black dark:text-white
hover:bg-gray-100 dark:hover:bg-[#2b2f33]
transition-colors"
  >
    Chart of Accounts Sync Workflow Guide
  </a>
</div>

***

## Related Reading

* [How to Sync Accounts](/docs/current/how-tos/accounting-integrations/imports/accounts/how-to-sync-accounts)
* [Sync Accounts Integration Design](/docs/current/integration-design/accounting-integrations/imports/accounts/integration-design-accounts-sync)
* [Data Mapping](/docs/current/integration-design/accounting-integrations/imports/accounts/integration-design-accounts-data-mapping)
* [Platform Capabilities: Chart of Accounts Sync](/docs/current/platform/accounting-integrations/imports/accounts/accounts-sync-overview)

***
