claire-agent
Version:
A Dialogflow agent for Claire Global
23 lines (21 loc) • 6.43 kB
JavaScript
// Compiled by ClojureScript 1.10.520 {:target :nodejs}
goog.provide('claire_agent.intents.purchase_product');
goog.require('cljs.core');
goog.require('claire_common.utils');
goog.require('claire_common.dialogflow');
claire_agent.intents.purchase_product.pars = new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [claire_common.dialogflow.parm.call(null,"productClass","sys.any",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Ok. What would you like? We have meat, fish, and beans."], null)),claire_common.dialogflow.parm.call(null,"when","sys.date",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Ok. When would you like your order to be ready?"], null)),claire_common.dialogflow.parm.call(null,"where","sys.geo-city",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Ok. Where would you like your order to be shipped to?"], null)),claire_common.dialogflow.parm.call(null,"incoterm","claire_incoterm",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [["Ok. Under which Incoterm? You can choose ex","works, Carriage and Insurance Paid, ","Delivered Duty Paid, Delivered at Place, ","Delivered at Terminal, carriage paid, free carrier."].join('')], null))], null);
claire_agent.intents.purchase_product.purchase_product = (function claire_agent$intents$purchase_product$purchase_product(intent,query,env,pars){
var _ = cljs.core.println.call(null,"PURCHASE PRODUCT CALLED");
return claire_common.utils.make_reply.call(null,cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"say","say",504378016),"Specify quantity");
});
claire_agent.intents.purchase_product.purchase_confirmation = (function claire_agent$intents$purchase_product$purchase_confirmation(intent,query,env,pars){
return claire_common.utils.make_reply.call(null,env,new cljs.core.Keyword(null,"say","say",504378016),"Confirm your order and lookup");
});
claire_agent.intents.purchase_product.purchase_error = (function claire_agent$intents$purchase_product$purchase_error(intent,query,env,pars){
return cljs.core.println.call(null,"Purchase product ERROR");
});
claire_agent.intents.purchase_product.purchase_correct = (function claire_agent$intents$purchase_product$purchase_correct(intent,query,env,pars){
return claire_common.utils.make_reply.call(null,env,new cljs.core.Keyword(null,"say","say",504378016),"I got your corrected order");
});
claire_agent.intents.purchase_product.intent = claire_common.dialogflow.intent.call(null,"Purchase-Product",new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, ["I would like to buy $productClass to ship $when $incoterm","I would like to buy $productClass for $when to $where $incoterm","I would like to buy $productClass for $when shipping to $where $incoterm"], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Please, specify quantity"], null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"slotfilling","slotfilling",-830071598),false,new cljs.core.Keyword(null,"events","events",1792552201),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["purchase-product"], null),new cljs.core.Keyword(null,"parameters","parameters",-1229919748),claire_agent.intents.purchase_product.pars,new cljs.core.Keyword(null,"followups","followups",2057499244),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [claire_common.dialogflow.intent.call(null,"Purchase-Product-Purchase-Confirmation",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["$quantity"], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["I have got your order incl. quantity. Look up or correct?"], null),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"parameters","parameters",-1229919748),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [claire_common.dialogflow.parm.call(null,"quantity","sys.any",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Which quantity do you want?"], null))], null),new cljs.core.Keyword(null,"followups","followups",2057499244),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [claire_common.dialogflow.intent.call(null,"Purchase-Confirmation-purchase-review-redirect",new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Correct order","Correct"], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Should have been redirected"], null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"webhook","webhook",-860093016),claire_common.dialogflow.redirector.call(null,"purchase-review",null)], null)),claire_common.dialogflow.intent.call(null,"Purchase-Confirmation-purchase-lookup-redirect",new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Look up supplier","Search seller"], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Should have been redirected"], null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"webhook","webhook",-860093016),claire_common.dialogflow.redirector.call(null,"purchase-lookup",null)], null))], null)], null)),claire_common.dialogflow.intent.call(null,"Purchase-Product-Purchase-Error",cljs.core.PersistentVector.fromArray(["don't","nope not really","no that's be all","not right now","thanks but no","not","no we are good","nothing else","not interested","nah I'm good","definitely not","no never","never","nah","nothing","no maybe next time","I don't want that","no not really","no that's ok","no no don't","na","no way no","I can't","no thanks","not at all","not really","I don't","no I cannot","no that's okay","nope","I don't think so","no it isn't","thanks but not this time","no that's fine thank you","no don't","don't do it","I don't want","not today","I'm not","no way","no","I disagree","not this time","nothing else thanks"], true),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Redirecting to product purchase"], null),cljs.core.PersistentArrayMap.EMPTY)], null)], null));
//# sourceMappingURL=purchase_product.js.map?rel=1571758969985