---
# System prepended metadata

title: Misha

---

# Misha 

## Intents 

// validation logic
type Recepient = 
  | Internal(number | string)
  | External(bank_name, number)
  
  
```ocaml 
module Money = {
  type t = 
    | Money(number)
 
  let%private max_money_length = 10
  
  let isMoney = s => {
    if (isLessThan10 || containsMoneyUnit || containsKSuffix) {
       true
    }
  }
    
  let make = (s) => {
    if (isMoney(s)) {
      let amount = Number.from_string(s);
      Some(Money(amount))
    } else {
      None
    }
  }
}
module TransferMoney = {
  type t = {
    amount_of_money: Money.t option
  }
}
``` 

  
entity:
    - amount-of-money
    - bank-name 
    - number 
    - emoney-provider
    - phone-number
    - account-number

- transfer_money
    - amount_of_money : number
    - recepient_bank_name : bca | bni | dsb
    - recepient_account_number: number | string
    - sender_account_number: number (rules)
    - confirmation_form: boolean
- topup_emoney
    - emoney_privider : gopay, ovo, etc
    - amount_of_money: number
    - phone_number: number 
- inform
- bot_challange
- affirm
- deny 
- greet
- out_of_scope 
- help

## Helper Slots
- next_form_name

## Pipeline
- Spacy
- Duckling
- DIET

```yml
User: Transfer 100000
Rasa:
  intent: tranfer_money
  entity: number: 100000
  slot: amount_of_money: 100000
  
User: Transfer 100000 to 9089786342
Rasa:
  intent: transfer_money
  entity: 
      - number: 100000
      - number: 9089786342
      - acount_number: 9089786342
  validate:
      - amount_of_money
          length < 10
      - recepient_account_number: ?
          length >= 10 ?
  slot: 
      amount_of_money: 100000
      recepient_account_number: 9089786342
      
User: Transfer 100k to 085774369892
intent: transfer_money 
  entity: 
      - number: 100000
      - number: 085774369892
      - acount-number: 085774369892
      - phone-number: 085774369892
  validate:
      - amount_of_money
          length < 10
      - recepient_account_number: ?
          length >= 10 ?
      - 
  slot: 
      amount_of_money: 100000
      recepient_account_number: 9089786342
User: No, I mean topup 
Rasa: Switch Action Ask
```


