- Retrieve active Dimensions from the Accounting System
- Retrieve existing Tag Groups from Pleo
- Apply auto-selection logic on first connection
- Store the selection for use in recurring sync cycles
Prerequisites
Before you begin:- You’re familiar with the Tags Sync Overview and the Integration Design for Dimension Selection
- Your integration is authenticated using one of the supported authentication methods
- Your integration can call Pleo’s Tags API endpoints
Scenario
This how-to uses a concrete example to illustrate each step. The user is connecting their integration to Pleo for the first time. In their Accounting System, they have manually selected Finance, Cost Centre, and Supplier for synchronisation. The integration will also auto-select Department and Project because those codes already match active Tag Groups in Pleo. After the initial connection, Supplier becomes inactive in the AS. On the next scheduled sync cycle, step 5 detects this and automatically deselects it. The table below shows the starting state in both systems before the sync process runs.| Dimension (AS) | AS Status | Tag Group (Pleo) | Pleo Status |
|---|---|---|---|
| Department | Active | Department | Active |
| Project | Active | Project | Active |
| Finance | Active | — | Does not exist |
| Cost Centre | Active | Cost Centre | Archived |
| Supplier | Active | — | Does not exist |
| — | — | Region | Active |
Steps
1. Retrieve Active Dimensions from the Accounting System
Fetch all active (non-archived, non-inactive) Dimensions from the Accounting System. Each Dimension must have:- A unique code
- A human-readable name
Example Response
The response format depends on your Accounting System. The following is a representative example:activeDimensions = Department, Project, Finance, Cost Centre, Supplier
2. Retrieve Existing Tag Groups from Pleo
API Endpoint: GET/v0/tag-groups
Example parameters:
- companyId:
12abc3d4-e567-890e-1234-abc56e78fabc - includeArchived:
false
Example Request
- OAuth 2.0
- API Key
Example Response

3. Apply Auto-Selection on First Connection
On first connection, automatically pre-select Dimensions whose code matches an existing active Tag Group in Pleo. Matching is case-insensitive. Up to 5 Dimensions may be selected in total. Example Pseudo:Example Auto-Selection Result
Using the data from steps 1 and 2:| AS Dimension | Before Connection | Active Pleo Tag Group? | Auto-Selected | Now Selected |
|---|---|---|---|---|
| Department | Not selected | ✓ Matches “Department” | ✓ Yes | ✓ Yes |
| Project | Not selected | ✓ Matches “Project” | ✓ Yes | ✓ Yes |
| Finance | Manually selected | ✗ Does not exist in Pleo | — | ✓ Yes |
| Cost Centre | Manually selected | ✗ Tag Group is archived | — | ✓ Yes |
| Supplier | Manually selected | ✗ Does not exist in Pleo | — | ✓ Yes |
4. Store the Dimension Selection
Persist the selected Dimensions in your integration’s configuration store. The stored selection is used as input to every Tags Sync cycle (Steps 2 and 3). Example Pseudo:Example Stored Selection
| Dimension | Source |
|---|---|
| Department | Auto-selected |
| Project | Auto-selected |
| Finance | Manually selected |
| Cost Centre | Manually selected |
| Supplier | Manually selected |
5. Handle Inactive Dimensions
If a previously selected Dimension is no longer active in the AS, automatically deselect it during the next sync cycle. Example Pseudo:Example Result
Supplier was active at the time of the initial connection but has since become inactive in the AS. On this sync cycle it is detected and deselected:| Dimension | AS Status | Deselected |
|---|---|---|
| Department | Active | No |
| Project | Active | No |
| Finance | Active | No |
| Cost Centre | Active | No |
| Supplier | Inactive | ✓ Yes |
Result
The table below shows what happened to each Dimension across all steps.| Dimension | Retrieved (Step 1) | Auto-Selected (Step 3) | Stored (Step 4) | Step 5 | Final Selection |
|---|---|---|---|---|---|
| Department | Active | ✓ Yes | ✓ Yes | Active (no change) | ✓ Yes |
| Project | Active | ✓ Yes | ✓ Yes | Active (no change) | ✓ Yes |
| Finance | Active | Manually selected | ✓ Yes | Active (no change) | ✓ Yes |
| Cost Centre | Active | Manually selected | ✓ Yes | Active (no change) | ✓ Yes |
| Supplier | Active | Manually selected | ✓ Yes | Inactive (deselected) | ✗ No |
- Department
- Project
- Finance
- Cost Centre
What Comes Next?
this how-to is part of: