> For the complete documentation index, see [llms.txt](https://docs.kognitos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kognitos.com/legacy/legacy-experience/books/reference/photon-commerce.md).

# Photon Commerce

Procedures and concepts for the Photon Commerce integration.

{% hint style="info" %}
The following documentation is for **Photon Commerce v1.0.3** *(BDK)*.
{% endhint %}

## Overview

Photon Commerce is an advanced e-commerce platform providing comprehensive online retail management capabilities. This integration enables automated order processing, inventory management, and customer communication workflows. Streamline e-commerce operations and enhance customer experience through automated processes.

## Prerequisites

### 1. Required Books

The following Book(s) need to be added to your agent so it can learn and understand the automation procedures defined within them:

* **Photon Commerce**

#### How to Add the Book(s)

1. Go to **Books** → **All Books**.
2. Search for the name of the book and click on it.
3. Click on <kbd>**Install**</kbd> or <kbd>**Add Connection**</kbd> to add the book to your agent.
4. If adding a connection, you'll be prompted for [**connectivity**](#connectivity) details.

## Connectivity

This section outlines the available methods for connecting to the Book, along with the required configuration details for each.

### Connect using Username, API Key, Client ID, Secret Key and Password

Connects to an API using the provided API key.

| Label      | Description                                   | Type        |
| ---------- | --------------------------------------------- | ----------- |
| Username   | The username to be used for connecting        | `text`      |
| API Key    | The API key to be used for connecting         | `sensitive` |
| Client ID  | The client ID to be used for connecting       | `text`      |
| Secret Key | The client secret to be used for connecting   | `sensitive` |
| Password   | The client password to be used for connecting | `sensitive` |

## Procedures

### to process a file in *photon commerce*

Process a file in Photon Commerce.

**Input Concepts**

| Concept   | Description                                                                                                         | Type   | Required | Default Value |
| --------- | ------------------------------------------------------------------------------------------------------------------- | ------ | -------- | ------------- |
| `file`    | The file to be processed                                                                                            | `file` | Yes      | (no default)  |
| `doctype` | Specify the document type. Should be one of invoice, receipt, check, remittance, statement. The default is invoice. | `text` | No       | invoice       |

**Output Concepts**

| Concept  | Description                                | Type   |
| -------- | ------------------------------------------ | ------ |
| `answer` | The response from the API as a dictionary. | `json` |

**Examples**

Example 1: Process a file in Photon Commerce.

```generic
the file # upload the file
process the file in photon commerce
```
