> For the complete documentation index, see [llms.txt](https://ftcoders.first-tech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ftcoders.first-tech.com/first-tech-ttp-sdk/product-scanning.md).

# Product Scanning

**Objective**

Define the **minimum requirements** for the flow of scanning physical products using the device camera to read barcodes, automatically navigating to the product detail screen and enabling the addition to the shopping cart.

**Insights**

* The scanner UI must follow best practices in contrast, lighting, and user safety (e.g., no intrusive auto-flash).
* The system should be optimized for various lighting conditions and device camera capabilities.
* The time between scanning and redirection must not exceed 2 seconds under normal conditions.

***

<figure><img src="/files/QHRi9FqAqNr1jPiCmSoT" alt=""><figcaption></figcaption></figure>

***

## Access to Scanner

### 01 - Scanner icon&#x20;

Must be positioned next to the search field on the home screen. It should use a standard icon (barcode reader or camera) and be easily tappable.

{% hint style="success" %}
**Mandatory:**&#x20;

The scanner button must be clearly visible and accessible without scrolling.
{% endhint %}

{% hint style="info" %}
**Recommended:**&#x20;

Display a brief animation or visual highlight upon tap to indicate camera activation.
{% endhint %}

***

## Scanning Interface

### 02 - Scan frame&#x20;

Must include a clearly defined area for barcode alignment. The camera must open automatically and maintain continuous focus.

### 03 - “Cancel” button&#x20;

Must be fixed at the bottom of the screen, closing the scanner immediately and returning to the catalog view.

{% hint style="success" %}
**Mandatory:**&#x20;

Upon barcode recognition, the system must automatically redirect to the corresponding product page.
{% endhint %}

{% hint style="info" %}
**Recommended:**&#x20;

If the code is not recognized, show a clear message: “Code not recognized. Please try again.”
{% endhint %}

***

## Redirection to Product Detail Page

### 04 - Product detail screen&#x20;

Must be displayed immediately after a successful scan. The screen must show full product information:

* Name
* Price
* Stock
* Description).

{% hint style="success" %}
**Mandatory:**&#x20;

The “Add to cart” button must be available to allow seamless continuation of the shopping flow.
{% endhint %}

{% hint style="info" %}
**Recommended:**&#x20;

Display visual feedback (e.g., confirmation toast or mini popup) when adding the product via scanner.
{% endhint %}

***

## Mandatory Messages

* When the product is not found:

  > Product not identified. Please check the barcode or search manually.
* When scan fails:

  > Unable to read barcode. Adjust focus or try again.

## Expected Behaviors

* The camera must activate with a one-time permission per session or as required by the OS privacy policy.
* After successful scan, the scanner view must close automatically and redirect to the product screen.
* The “Cancel” button must exit the scanning flow immediately, without errors or delay.
* The system must correctly map duplicate codes, variants, or equivalents (SKU/GTIN).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://ftcoders.first-tech.com/first-tech-ttp-sdk/product-scanning.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
