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

# ionBIZ - Getting started in Peliqan

> Connect ionBIZ to Peliqan by creating an Application with OData scopes, and use low-code Python scripts to write back relations and other objects.

ionBIZ is a Project Management solution from ionProjects, part of Visma. This article provides an overview to get started with the **ionBIZ** connector in **Peliqan**. Please [contact support](https://peliqan.io/contact) if you have any additional questions or remarks.

## How to connect ionBIZ

First create an "Application" in ionBiz:

1. Login to IonBiz, click on the user profile in the top right corner.
2. Navigate to **Settings > General > Applications**.
3. Add a new **Application**.
4. Include **Odata** scopes, at least the "read" scope: enable **r\_Odata** under **ScopeOdata**, see screenshot below.
5. Also enable the **r\_Odata** scope in the list of tables, for each table that you want to sync, see below.
6. Copy the **Client Id** and **Client Secret** from the Application and paste them in Peliqan.

Adding an Application in ionBIZ:

<img src="https://mintcdn.com/peliqan-9d7f0393/-nwNqUkSPUzSM-9F/images/ionBIZ%20-%20Getting%20started%20in%20Peliqan/Screenshot_2024-10-12_at_17.08.55.png?fit=max&auto=format&n=-nwNqUkSPUzSM-9F&q=85&s=b38089765228c00da6f96c60f2e8dd79" alt="Adding an Application in ionBIZ" width="2892" height="1144" data-path="images/ionBIZ - Getting started in Peliqan/Screenshot_2024-10-12_at_17.08.55.png" />

Enabling the **r\_Odata** scope under **ScopeOdata** and for each desired table:

<img src="https://mintcdn.com/peliqan-9d7f0393/-nwNqUkSPUzSM-9F/images/ionBIZ%20-%20Getting%20started%20in%20Peliqan/Screenshot_2024-10-12_at_17.08.24.png?fit=max&auto=format&n=-nwNqUkSPUzSM-9F&q=85&s=6e5baafe656f748a1109c3760e0ddb6f" alt="Enabling r_Odata scope in ionBIZ" width="2110" height="1232" data-path="images/ionBIZ - Getting started in Peliqan/Screenshot_2024-10-12_at_17.08.24.png" />

## Writeback to ionBIZ

Here's an example on how to add a Relation (e.g. a customer) to ionBIZ using a low-code Python script in Peliqan:

```python theme={null}
ionbiz_api = pq.connect('IonBiz')

relation = {
    'Name': "My new relation name",
}
result = ionbiz_api.add('relation', relation)
st.json(result)
```

Here's an example on how to update a Relation:

```python theme={null}
ionbiz_api = pq.connect('IonBiz')

relation = {
    'id': 5,
    'Name': "My updated relation name",
}
result = ionbiz_api.update('relation', relation)
st.json(result)
```

Here's an example on how to add and update objects in any Model in ionBIZ using generic writeback functions in Peliqan:

```python theme={null}
ionbiz_api = pq.connect('IonBiz')

object = {
    'Name': "My new relation",
    'model': "Relations",
}
result = ionbiz_api.add('object', object)
st.json(result)

object = {
    'id': 123,
    'Name': "My updated relation",
    'model': "Relations",
}
result = ionbiz_api.update('object', object)
st.json(result)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.