# Importar lista de produtos.

Este recurso permite importar um arquivo .csv para atualizar a lista de produtos e estoque, o que pode ser muito mais rápido e eficiente do que adicionar produtos um por um.&#x20;

Há quatro maneiras de usar essa ferramenta:

1. Importar novos [produtos](https://app.gitbook.com/@ofn-brasil/s/guide-ofn/~/drafts/-M8SSSACq0zWVc_eG_TG/recursos-basicos/products-1/@drafts).
2. Atualizar os detalhes de produtos existentes.
3. Importar produtos para o[ Inventário](https://app.gitbook.com/@ofn-brasil/s/guide-ofn/~/drafts/-M8SSSACq0zWVc_eG_TG/recursos-basicos/products-1/inventory-tool/@drafts) de uma nova loja ou Central.
4. Atualizar produtos do Inventário de uma loja ou Central.

Para todos os casos, o primeiro passo é fazer o download de um *template* (arquivo modelo) de planilha .csv, preencher os campos e depois fazer o *upload* do arquivo novamente na plataforma,

{% hint style="warning" %}
**Informação importante sobre arquivos CSV:** o Microsoft Excel não abre arquivos .csv diretamente. Se puder, sugerimos que você baixe gratuitamente o programa Libre Office Calc:\
<https://www.libreoffice.org/download/download/>

Com o Libre Office Calc, você pode abrir e editar arquivos .csv facilmente, e salvar no formato correto UTF-8. Se você não puder usar o Libre Office, você precisará seguir os seguintes passos:&#x20;

<https://support.office.com/en-gb/article/import-or-export-text-txt-or-csv-files-5250ac4c-663c-47ce-937b-339e391393ba>
{% endhint %}

{% hint style="danger" %}
Nem todos os detalhes do produto poderão ser importados e atualizados usando este recurso. No momento, as configurações de [imagens](https://app.gitbook.com/@ofn-brasil/s/guide-ofn/~/drafts/-M8SSSACq0zWVc_eG_TG/recursos-basicos/products-1/products/@drafts),[ propriedades ](https://app.gitbook.com/@ofn-brasil/s/guide-ofn/~/drafts/-M8SSSACq0zWVc_eG_TG/recursos-basicos/products-1/product-properties/@drafts)e [Compras em Grupo](https://app.gitbook.com/@ofn-brasil/s/guide-ofn/~/drafts/-M8SSSACq0zWVc_eG_TG/recursos-basicos/products-1/group-buy-for-bulk-ordering/@drafts) precisam ser definidas manualmente para cada produto. Esperamos incluir esses campos em futuras atualizações.
{% endhint %}

## Importar Novos Produtos

Siga estes passos para adicionar novos produtos a um perfil de produtor.

{% hint style="success" %}
Você pode fazer upload de novos produtos e atualizar produtos existentes simultaneamente com o upload de um único arquivo .csv. As instruções neste guia são separadas para maior clareza, mas você pode combinar novos produtos e atualizações na mesma planilha.
{% endhint %}

### Preparar o arquivo .csv para importação

Primeiramente, baixe o **Modelo de Lista de Produtos** em arquivo .csv na página de **Importação de Produto** e abra-o com o Libre Office (Excel ou equivalentes).

Você verá que o modelo fornece todos os cabeçalhos de coluna necessários para importar um produto com êxito. Cada linha é para um novo produto ou variante. Abaixo está uma descrição de como preencher cada coluna.

{% hint style="danger" %}
Observe que todos os campos diferenciam maiúsculas de minúsculas. Por exemplo: você deve usar mL, e não ml, ou Laticínios, ao invés de laticínios.
{% endhint %}

| Column Title        | Required? | Description                                                                                                                                                                                  | Example                                     |
| ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| producer            | Y         | This is the name of the producer profile that this product will be assigned to                                                                                                               | Four Mile Farm                              |
| sku                 | N         | The SKU code for this product                                                                                                                                                                | AD001265                                    |
| name                | Y         | This is the name of the product                                                                                                                                                              | Yoghurt                                     |
| display name        | N         | This field applies if you are creating variants (see instructions below). If you're not creating a variant leave this field blank.                                                           | Rasberry Yoghurt                            |
| category            | Y         | Which category does this product sit in? The categories available are listed on the Product Import page                                                                                      | Dairy                                       |
| units               | Y         | The weight, volume or quantity value                                                                                                                                                         | 500                                         |
| unit\_type          | Maybe     | What unit is it sold in (g, kg, T, mL, L)? If sold as an item (e.g. bunch) leave blank                                                                                                       | g                                           |
| variant\_unit\_name | Maybe     | If the product is sold as an item (e.g loaf, bunch, pumpkin) write the item type here                                                                                                        | Bunch                                       |
| price               | Y         | The price of the product. If the item carries tax, this must be the tax inclusive price.                                                                                                     | 3.70                                        |
| in\_stock           | Maybe     | If you have limited stock for the product type the stock level here. If you have infinite stock available (you can always source it) enter 0 and use the unlimited column                    | 40                                          |
| available\_on       | N         | Leave blank                                                                                                                                                                                  |                                             |
| unlimited           | Y         | If you have infinite stock available for this product, type 1, if you're using on\_hand leave blank. If you enter a number in in\_stock *and* 1 in unlimited, the product will be unlimited. | 1                                           |
| shipping\_category  | Y         | Which shipping category does this product sit in? The shipping categories available are listed on the Product Import page                                                                    |                                             |
| tax\_category       | N         | If the price of your product includes tax type GST, if not leave blank                                                                                                                       | GST                                         |
| description         | N         | You can create a description, but you cannot update one. Please make sure that the text you wrote matches the current description in case of an update.                                      | This Yoghurt is made from local raspberries |

#### Importar Variantes de um Produto

No processo de importação, as variantes são distinguidas pelas unidades (como salada vendida em sacos de 500g e 750g) ou pelos campos de nome  (como um iogurte vendido em vários sabores). Desde que o nome do produto seja o mesmo, as linhas serão importadas como variantes. O exemplo abaixo mostra uma salada que vem em variantes de 500g e 750g, e um iogurte que vem em vários sabores.

| name      | display\_name | price | units | unit\_type |
| --------- | ------------- | ----- | ----- | ---------- |
| Salad Bag |               | 3.50  | 500   | g          |
| Salad Bag |               | 5.50  | 750   | g          |
| Yoghurt   | Banana        | 4     | 500   | g          |
| Yoghurt   | Strawberry    | 4     | 500   | g          |

A imagem abaixo mostra como esses produtos serão exibidos na loja. Observe que o campo 'nome' se torna o cabeçalho principal e o campo 'nome de exibição' torna-se o cabeçalho secundário. No caso do Saco de Salada, o campo 'nome de exibição' fica em branco, então o 'nome' é usado por padrão.

![](/files/-M0d9TTaLMo5iNxRqJ2c)

#### Exemplos de tipos de unidade

Abaixo estão alguns exemplos para mostrar como os produtos com diferentes unidades (g, ml, kg e itens) devem ser carregados.

| producer         | **name**        | **category** | **price** | **units** | **unit\_type** | **variant\_unit\_name** |
| ---------------- | --------------- | ------------ | --------- | --------- | :------------: | :---------------------: |
| Sue's Salads     | Salad Bag       | Vegetables   | 3.50      | 500       |        g       |                         |
| Henry Orchards   | Fruit Juice     | Drinks       | 3.50      | 300       |       ml       |                         |
| Fernwell Produce | Potatoes        | Vegetables   | 9.50      | 5         |       kg       |                         |
| Tom's Bakery     | Wholemeal Bread | Baked goods  | 3.00      | 1         |                |           loaf          |

### Importar o arquivo .csv

Depois de preencher o **Modelo de Lista de Produtos em arquivo .csv**, você estará pronto para carregá-lo no site da Ajunta.

1. Vá para **Produtos** > **Importação Produtos.**
2. **Selecione o tipo de importação:** Selecione Lista de Produtos.
3. **Selecione uma planilha para fazer upload:** encontre o arquivo .csv que deseja fazer upload.

   Como você está carregando novos produtos, você pode deixar a caixa de seleção 'Definir estoque como zero para todos os produtos existentes não presentes no arquivo' desmarcada.
4. Click **Upload**.

Será apresentado um resumo do seu carregamento, incluindo quaisquer erros. Você também será informado sobre quantos produtos está criando e quantos está atualizando. Se estiver satisfeito com os resultados do carregamento, clique em **salvar.**&#x20;

{% hint style="success" %}
É uma boa prática verificar se os produtos foram carregados/atualizados conforme você pretendia.
{% endhint %}

Você pode, então, carregar outra planilha ou ir para a página de produtos para visualizar seus novos produtos.

## Atualizar detalhes de produto existente

As instruções abaixo estão relacionadas à atualização dos detalhes de um produto existente. Esta ferramenta pretende ser uma forma rápida de atualizar os preços dos produtos e os níveis de estoque.

{% hint style="info" %}
Você pode fazer upload de novos produtos e atualizar produtos existentes simultaneamente com o upload de um único arquivo .csv. As instruções neste guia são separadas para maior clareza, mas você pode combinar novos produtos e atualizações na mesma planilha.
{% endhint %}

### Preparar o arquivo .csv para importação

O processo de atualização dos detalhes do produto é semelhante ao[ upload de novos produtos](#importar-novos-produtos). O primeiro passo é baixar o Modelo de Lista de Produto e preencher os nomes dos produtos e os nomes dos fornecedores. Se você tiver essa planilha em mãos de um upload anterior, é ainda melhor.

O sistema requer sete campos para identificar corretamente o produto que você deseja atualizar. Existem quatro campos que podem ser atualizados e quatro campos que não podem, usando esta ferramenta.

| Required fields (you can't update)   | Fields you can update | Fields that won't update and aren't required |
| ------------------------------------ | --------------------- | -------------------------------------------- |
| \*producer                           | sku                   | ^variant\_unit\_name                         |
| \*name                               | price                 | ^tax\_category                               |
| ^category                            | in\_stock             | ^shipping\_category                          |
| \*units                              | unlimited             | ^description                                 |
| ^unit\_type (if applicable)          |                       |                                              |
| ^variant\_unit\_name (if applicable) |                       |                                              |
| \*display\_name                      |                       |                                              |

*^ se você tentar atualizar esses campos, verá uma mensagem de erro.*

*\*Se você tentar atualizar esses campos, na verdade criará novos produtos ou variantes, em vez de atualizar um produto existente.*

Depois de concluído, o arquivo .csv pode ser [importado](#import-the-csv) da mesma maneira que para novos produtos.

{% hint style="info" %}
**Defina o estoque como zero para todos os produtos existentes não presentes no arquivo:**\
Se você selecionar esta caixa de seleção, o sistema definirá o valor "Em Estoque" como zero para *todos os produtos que já estão na sua lista de produtos.*\
Se um produto era 'Ilimitado', ele permanecerá 'Ilimitado'.

Os produtos nesta importação manterão o nível de estoque definido no arquivo .csv.
{% endhint %}

## Importar novo inventário ou atualizar seu inventário

Use estas instruções se quiser adicionar ou atualizar novos produtos ao seu [inventário](/recursos-basicos/products-1/inventory-tool.md).

### Preparar o arquivo .csv para importaçãoPrepare the CSV file for import

Primeiramente, baixe o **Modelo de Inventário em arquivo CSV** na página de **importação de produtos**.&#x20;

Você verá que o modelo fornece todos os cabeçalhos de coluna necessários para importar um produto com êxito. Cada linha é para um novo produto ou variante. Abaixo está uma descrição de como preencher cada coluna.

{% hint style="info" %}
Observe que todos os campos diferenciam maiúsculas de minúsculas. Por exemplo: você deve usar mL, e não ml, ou Laticínios, ao invés de laticínios.
{% endhint %}

| Column Title        | Required? | Description                                                                                                                                                                                  | Example                                     |
| ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| producer            | Y         | This is the name of the producer profile that this product will be assigned to                                                                                                               | Four Mile Farm                              |
| sku                 | N         | The SKU code for this product                                                                                                                                                                | AD001265                                    |
| name                | Y         | This is the name of the product                                                                                                                                                              | Yoghurt                                     |
| display name        | N         | This field applies if you are creating variants (see instructions below). If you're not creating a variant leave this field blank.                                                           | Rasberry Yoghurt                            |
| category            | Y         | Which category does this product sit in? The categories available are listed on the Product Import page                                                                                      | Dairy                                       |
| units               | Y         | The weight, volume or quantity value                                                                                                                                                         | 500                                         |
| unit\_type          | Maybe     | What unit is it sold in (g, kg, T, mL, L)? If sold as an item (e.g. bunch) leave blank                                                                                                       | g                                           |
| variant\_unit\_name | Maybe     | If the product is sold as an item (e.g loaf, bunch, pumpkin) write the item type here                                                                                                        | Bunch                                       |
| price               | Y         | The price of the product. If the item carries tax, this must be the tax inclusive price.                                                                                                     | 3.70                                        |
| in\_stock           | Maybe     | If you have limited stock for the product type the stock level here. If you have infinite stock available (you can always source it) enter 0 and use the unlimited column                    | 40                                          |
| available\_on       | N         | Leave blank                                                                                                                                                                                  |                                             |
| unlimited           | Y         | If you have infinite stock available for this product, type 1, if you're using on\_hand leave blank. If you enter a number in in\_stock *and* 1 in unlimited, the product will be unlimited. | 1                                           |
| shipping\_category  | Y         | Which shipping category does this product sit in? The shipping categories available are listed on the Product Import page                                                                    |                                             |
| tax\_category       | N         | If the price of your product includes tax type GST, if not leave blank                                                                                                                       | GST                                         |
| description         | N         | You can create a description, but you cannot update one. Please make sure that the text you wrote matches the current description in case of an update.                                      | This Yoghurt is made from local raspberries |

| Column Title        | Required? | Description                                                                                                                                                                                  | Example                                     |
| ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| producer            | Y         | This is the name of the producer profile that this product will be assigned to                                                                                                               | Four Mile Farm                              |
| sku                 | N         | The SKU code for this product                                                                                                                                                                | AD001265                                    |
| name                | Y         | This is the name of the product                                                                                                                                                              | Yoghurt                                     |
| display name        | N         | This field applies if you are creating variants (see instructions below). If you're not creating a variant leave this field blank.                                                           | Rasberry Yoghurt                            |
| category            | Y         | Which category does this product sit in? The categories available are listed on the Product Import page                                                                                      | Dairy                                       |
| units               | Y         | The weight, volume or quantity value                                                                                                                                                         | 500                                         |
| unit\_type          | Maybe     | What unit is it sold in (g, kg, T, mL, L)? If sold as an item (e.g. bunch) leave blank                                                                                                       | g                                           |
| variant\_unit\_name | Maybe     | If the product is sold as an item (e.g loaf, bunch, pumpkin) write the item type here                                                                                                        | Bunch                                       |
| price               | Y         | The price of the product. If the item carries tax, this must be the tax inclusive price.                                                                                                     | 3.70                                        |
| in\_stock           | Maybe     | If you have limited stock for the product type the stock level here. If you have infinite stock available (you can always source it) enter 0 and use the unlimited column                    | 40                                          |
| available\_on       | N         | Leave blank                                                                                                                                                                                  |                                             |
| unlimited           | Y         | If you have infinite stock available for this product, type 1, if you're using on\_hand leave blank. If you enter a number in in\_stock *and* 1 in unlimited, the product will be unlimited. | 1                                           |
| shipping\_category  | Y         | Which shipping category does this product sit in? The shipping categories available are listed on the Product Import page                                                                    |                                             |
| tax\_category       | N         | If the price of your product includes tax type GST, if not leave blank                                                                                                                       | GST                                         |
| description         | N         | You can create a description, but you cannot update one. Please make sure that the text you wrote matches the current description in case of an update.                                      | This Yoghurt is made from local raspberries |

| Column Title        | Required? | Description                                                                                                                                                                                                                                              | Example                              |
| ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| producer            | Y         | This is the name of the producer profile that this inventory item will be assigned to                                                                                                                                                                    | Four Mile Farm                       |
| distributor         | Y         | This is the name of the hub profile the inventory item will be assigned to                                                                                                                                                                               | Demo Hub                             |
| name                | Y         | This is the name of the product                                                                                                                                                                                                                          | Yoghurt                              |
| display name        | N         | This field applies if you are creating variants (see instructions below). If you're not creating a variant leave this field blank.                                                                                                                       | Rasberry Yoghurt                     |
| variant\_unit\_name | Y         | If the product is sold as an item (e.g loaf, bunch, pumpkin) write the item type here                                                                                                                                                                    | Bunch                                |
| units               | Y         | The weight, volume or quantity value                                                                                                                                                                                                                     | 500                                  |
| unit\_type          | Y         | What unit is it sold in (g, kg, T, mL, L)? If sold as an item (e.g. bunch) leave blank                                                                                                                                                                   | g                                    |
| price               | Y         | The price of the product. If the item carries tax, this must be the tax inclusive price.                                                                                                                                                                 | 3.70                                 |
| in\_stock           | Y         | Please check the rules for unlimited below                                                                                                                                                                                                               | leave blank as unlimited is set to 1 |
| unlimited           | Y         | If blank - Read as "Use producer stock settings", so "in\_stock" should be blank.   If you set it to "1" - Read as unlimited of "Yes", so "in\_stock" should be blank.     If you set it to "0" - Read as unlimited of "No", so "in\_stock" is required. | 1                                    |
| sku                 | N         | The SKU code for this product                                                                                                                                                                                                                            | AD001265                             |

### Importar o arquivo .csv <a href="#import-the-csv" id="import-the-csv"></a>

Depois de preencher o **Modelo de Inventário em arquivo CSV**, você estará pronto para carregá-lo na Ajunta.

1. Vá para **Produtos** > **Importação de produtos.**&#x20;
2. **Selecione o tipo de importação**: Selecione Inventários.&#x20;
3. **Selecione uma planilha para fazer upload.**
4. Clique em **Carregar.**

Será apresentado um resumo do seu carregamento, incluindo quaisquer erros. Você também será informado sobre quantos produtos está criando e quantos está atualizando. Se estiver satisfeito com os resultados do upload, clique em **salvar.**

{% hint style="success" %}
É uma boa prática verificar se os produtos foram carregados/atualizados conforme você pretendia.
{% endhint %}


---

# 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://guia.openfoodbrasil.com.br/recursos-basicos/products-1/product-and-inventory-import.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.
