# Build a Quable App

## What is a Quable App?

A **Quable App** is external code — not built inside Quable’s PIM — that **appears and interacts directly with the PIM interface**.  
It goes beyond a classic integration that would only use the API in the background:  
with a Quable App, users **see, click, and work with your code inside Quable**.

In other words:  
- If your tool only consumes the API from outside → it’s just an **integration**.  
- If your tool is embedded in the PIM interface → it’s a **Quable App**. ✅  

**Examples of Quable Apps:**
- A **configuration page** for managing your app settings inside the PIM administration panel.  
- An **action button** on a product (e.g., "Send to Translation" or "Export to Shopify").  
- A **custom tab** in a product page that shows analytics, external data, or AI-generated content.  

---

## Why Choose to Build a Quable App?

Quable Apps are the **modern way to extend the PIM** while keeping the native user experience intact.  

**Key benefits:**
- 🔗 **Directly integrated in the workflow** – No switching apps, your feature lives inside the PIM.  
- 🎨 **Native look and feel** – Extend the PIM without confusing users.  
- ⚡ **Real-time actions** – Go beyond background scripts with interactive UI.  
- 🛠️ **Business-driven customization** – Adapt the PIM to your exact processes.  

Whether you need to:  
- Add **validation steps**,  
- Build **custom editors**,  
- Or connect to **external platforms**,  

…Quable Apps give you a framework that **puts user experience first** while unlocking **full integration capabilities**.

---

## The Core Concept: Slots

The most important concept of Quable Apps is the **slot**.  
A *slot* is a **predefined area in the PIM interface** where your app can plug in custom features.  

Think of slots as **reserved spaces** waiting for your code.  
When a user interacts with the slot, the PIM calls your app, and your app responds with content or an action.  

👉 Without slots, an app would just be "somewhere in the background."  
👉 With slots, your app is **visible, usable, and directly part of the PIM UI**.  

---

## Available Slots

![QuableApp - slots](/static/images/quable-app-admin-slot.png)

### 1. Admin - Configuration page (code `page`)
- Adds an **action** to QuableApp item in the admin listing
- When clicked, the button let the app display information in full page
- **Best for:** Confguration & settings

---

### 2. Product Actions

Slots attached to **product pages** let your app provide custom actions.  

#### Single Product Action (code `document.action.single`)
![QuableApp - slots](/static/images/document.action.single.png)
- Adds a **button** to the toolbar of an individual product page.  
- When clicked, the button can:  
  - Perform an immediate action (e.g., "Validate").  
  - Open a dialog inside the PIM (e.g., "Send for Translation").  
- **Best for:** One-off product operations like generating a PDF, sending for review, or triggering workflows.  

#### Bulk Product Action (code `document.action.bulk`)
![QuableApp - slots](/static/images/document.action.bulk.png)
- Appears when a user selects multiple products in a list or search results.  
- Allows **batch operations** on several products at once.  
- **Best for:** Mass updates, exports, or publishing actions.  

---

### 3. Product Page Enhancements

Slots can also **add new UI panels or tabs** directly in a product’s detail view.  

#### Side Panel Tab (code `document.page.tab`)
![QuableApp - slots](/static/images/document.page.tab.png)
- Creates a **new tab** in the right-hand side panel of a product.  
- Ideal for **compact information or quick tools**.  
- **Examples:** Preview generators, validation status, external references.  

---

## Permissions: Who Can Use a Quable App?

By default, a Quable App is **active for all users** in the PIM.  
But you can restrict its usage to specific **roles**.  

Here’s how it works:  
- When you configure your app, you can define one or more **PIM roles** that are allowed to use it.  
- If **roles A and B** are assigned to the app, then a user must have **at least one of these roles** on their account to see and use the app.  
- Users without the required role(s) will not see the app in the interface.  

This ensures that **only the right people** have access to your app, keeping workflows secure and aligned with business rules.  

---

## In Short

- A **Quable App** is code that users can see and interact with directly inside Quable PIM.  
- The **slot system** is the foundation that makes this possible.  
- **Permissions** let you decide which roles can access your app.  
- By plugging into slots and controlling permissions, you can:  
  - Extend the UI,  
  - Add buttons,  
  - Provide new tabs,  
  - Trigger workflows,  
  - And keep access restricted to the right users.  

> If you want your integration to feel like a **native PIM feature**, you build a **Quable App**.
