# Photon Commerce

{% 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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kognitos.com/legacy/legacy-experience/books/reference/photon-commerce.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
