---
# System prepended metadata

title: melhorias meli-sac

---


# melhorias meli-sac

## principais problemas

- qual data (estimated_deliver_date) enviar no pedido enviado?
- regras não estarem juntas
- não saber diferenciar seller_order do olist_order
- falta de testes end 2 end
- como diferenciar seller_order ou olist_order quando entrar no handler de mensagem transacionais


## possiveis soluções? ações

- separar handlers (mensagens transacionais)
- render templates (data absurdas)
- logs (remover olist_commons)
- domain (seller order, olist order)
- documentar (behave?)


fluxo
mensagens transacionais
    criado -> faturado -> coletado -> enviado -> aguardando retirada -> entregue
    -> transferido e cancelado

```sequence
Title: Flow of Messages to Buyer Meli
buyer_purchase->order_created: [SellerOrder] Order Created

order_created-->order_transfered: [SellerOrder] Order transfered to another Seller
order_transfered-->buyer_purchase: [SellerOrder] Restart flow

order_created->order_invoiced: [SellerOrder] Send Invoice to Meli
order_invoiced->order_collected: [SellerOrder] Collecting packs
order_collected->order_shipped: [SellerOrder] Shipped to Buyer
order_shipped->order_awaiting_pickup: [SellerOrder] Awaiting Pickup at Correios
order_awaiting_pickup->order_delivered: Buyer catched Package at Correios
order_shipped->order_delivered: [SellerOrder] Delivered to Buyer

order_created-->order_canceled: [SellerOrder] Order Canceled
order_invoiced-->order_canceled: [SellerOrder] Order Canceled
order_collected-->order_canceled: [SellerOrder] Order Canceled
order_shipped-->order_canceled: [SellerOrder] Order Canceled
```

```flow
st=>start: Buyer Purchase
e=>end: End
oc=>operation: [SellerOrder] Order Created
oi=>operation: [SellerOrder] Order Invoiced
occ=>operation: [SellerOrder] Order Collected
os=>operation: [SellerOrder] Order Shipped
oap=>operation: [Package] Order Awaiting PickUp (Correios)
od=>operation: [SellerOrder] Order Delivered
ocld=>operation: [SellerOrder] Order Canceled
ot=>operation: [SellerOrder] Order Transfered

cond_awaiting_pickup=>condition: Awaiting PickUp?


st(right)->oc(bottom)->oi(right)->occ->os(right)->cond_awaiting_pickup->od->e
cond_awaiting_pickup(no, bottom)->od
cond_awaiting_pickup(yes)->oap->od

cond_awaiting_pickup@>oap({"stroke":"Red"})@>od({"stroke":"Red"})
od@>e({"stroke":"Green"})
```

```flow
st=>start: Start
e=>end: End
op=>operation: My Operation
op2=>operation: lalala
cond=>condition: Yes or No?

st->op->op2->cond
cond(yes)->e
cond(no)->op2
```

```sequence
Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!
Note left of Alice: Alice responds
Alice->Bob: Where have you been?
```

adminapp




.
.
.
.
.
.


















ToDos

- meli-sac-not, meli-question-not, meli-claims, adminapp validar e migrar pra OCSIM
- cache no adminapp do request para issues-api:v1/prefilled-answers/
- Remover coisas não usadas no adminapp batendo na issues-api
- na issues-api tentar deixar os SNS async

