---
# System prepended metadata

title: Promotion Alerts Marketplace

---

# Promotion Alerts Marketplace

## ZEUS
### ENVS:
```bash=
SLACK_API_TOKEN=
```

### Correr en consola:
- Actualizar tier de los products actuales:
```ruby=
Product.update_all(tier: :premium)
```
- Actualizar tier de los manufacturer products actuales:
```ruby=
ManufacturerProduct.update_all(tier: :premium)
```
- Validar que todos los productos de la app esten correctos: (?)
```ruby=
Product.enabled.mobile.map(&:save!)
```
- Actualizar top categories de la app:
```ruby=
MeruConfig.find_by(config_key: "hercules.top_categories").update!(config_value: "01EYS8NQYQ10MGEMGGEVJY6TS7,01FBPPVMRNH8HYJ45SS4SNQBA5,01FGAEX2S65MQ1T6BGKYKBAVTM")
```

### Rakes:
- Migrar estatuses de compra a los nuevos:
```bash=
rake one_time_only:migrate_marketplace_purchase_statuses
```
- Añadirle el reference order a los sales orders existentes:
```bash=
rake one_time_only:add_reference_order_to_sales_orders
```

---

## FUXI
### Correr en consola:
- Agregar distribution_type three_p a todos los SO actuales:
```ruby=
SalesOrder.update_all(distribution_type:'three_p')
```

- Agregar short_id a los GroupTransactions:
```ruby=
MeruWallet::GroupTransaction.all.each { _1.update!(short_id: ShortIdGenerator.generate(_1.consecutive.to_s, _1.id)) }
```

- Cambiar Meru Config de correo de corte de pago al seller:
```ruby=
MeruConfig.find_by_config_key('fuxi.invoice_request.primary_recipient_email').update!(config_value: "erika.juarez@meru.com")
```

### Rakes:
- Agrear sales order a los MeruWallet::Transaction
```ruby=
rake one_time_only:set_sales_order_to_transactions
```

---

## NUWA
### ENVS:
```bash=
ALGOLIA_API_ID=
ALGOLIA_API_KEY=
```

### Correr en consola:

- Agregar EAN a los Manufacturer Product actuales:
```ruby=
ManufacturerProduct.where.not(product_id: nil).find_each { _1.update!(model_number: _1.product.model_number) }
```

### Rakes:
- Agregar categoria a los manufacturer products
```bash=
rake one_time_only:set_category_to_manufacturer_products
```

- Crear nuevo template para manufacturer products:
```bash=
rake manufacturer_products:upload_bulk_template
```

- Cambiar status a manufacturer products rechazados:
```bash=
rake one_time_only:migrate_rejected_manufacturer_products
```

- Desactivar usuarios internacionales:
```bash=
rake one_time_only:inactive_international_users
```