Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.64 KB | None | 0 0
  1. {
  2. "version": 13,
  3. "activationDate": "2018-08-29T09:12:33.001Z",
  4. "user": "John Doe",
  5. "name": "version1.0.0",
  6. "description": "Complete configuration of the tables",
  7. "active": true,
  8. "blFlows": [
  9. {
  10. "name": "OPTIN_FLOW_TELEGRAM_BOT",
  11. "flowType": "OPTIN_FLOW_TELEGRAM_BOT",
  12. "active": true,
  13. "description": "Flow For Optin Engine (Telegram BOT)",
  14. "stagesName": [
  15. "Validate_Season_For_Optin_TELEGRAM_BOT",
  16. "BEGIN_MENU",
  17. "MenuBalance",
  18. "MenuSubscribe",
  19. "MenuRecharge",
  20. "MenuSubscribe1GB",
  21. "MenuTelegram",
  22. "MenuSubscribe2GB",
  23. "MenuSubscribe10GB"
  24. ]
  25. }
  26. ],
  27. "blStages": [
  28. {
  29. "name": "Validate_Season_For_Optin_TELEGRAM_BOT",
  30. "active": false,
  31. "priority": 0,
  32. "condition": "${STAGE_SESSION_TIME > 0}",
  33. "description": "Validate Session",
  34. "action": "DEFAULT",
  35. "stepsName": [
  36. "TelegramOptinSessionValidation",
  37. "TelegramOptinSessionSessionValidation"
  38. ]
  39. },
  40. {
  41. "name": "BEGIN_MENU",
  42. "active": true,
  43. "priority": 1,
  44. "condition": "${STAGE.equalsIgnoreCase('/start')}",
  45. "description": "Get First Chat Bot Menu",
  46. "action": "RESPONSE_NOTIFY",
  47. "stepsName": [
  48. "TelegramOptinFirstMenu"
  49. ]
  50. },
  51. {
  52. "name": "MenuBalance",
  53. "active": true,
  54. "priority": 1,
  55. "condition": "${STAGE.equalsIgnoreCase('/start_BALANCEENQUIRY')}",
  56. "description": "Enter Menu Options",
  57. "action": "RESPONSE_NOTIFY",
  58. "stepsName": [
  59. "TelegramPhoneNumberRequired",
  60. "GetUserBalanceService"
  61. ]
  62. },
  63. {
  64. "name": "MenuSubscribe",
  65. "active": true,
  66. "priority": 1,
  67. "condition": "${STAGE.equalsIgnoreCase('/start_SUBSCRIBE')}",
  68. "description": "Enter Menu Options",
  69. "action": "RESPONSE_NOTIFY",
  70. "stepsName": [
  71. "TelegramSubscribeMenu"
  72. ]
  73. },
  74. {
  75. "name": "MenuRecharge",
  76. "active": true,
  77. "priority": 1,
  78. "condition": "${STAGE.equalsIgnoreCase('/start_RECHARGE_BY_VOUCHER')}",
  79. "description": "Enter Menu Options",
  80. "action": "RESPONSE_NOTIFY",
  81. "stepsName": [
  82. "VoucherActiveService",
  83. "TelegramVouchercode",
  84. "TelegramPhoneNumber"
  85. ]
  86. },
  87. {
  88. "name": "MenuSubscribe1GB",
  89. "active": true,
  90. "priority": 1,
  91. "condition": "${STAGE.equalsIgnoreCase('/start_SUBSCRIBE_1GB')}",
  92. "description": "Enter Menu Options",
  93. "action": "RESPONSE_NOTIFY",
  94. "stepsName": [
  95. "SubscribeService"
  96. ]
  97. },
  98. {
  99. "name": "MenuTelegram",
  100. "active": true,
  101. "priority": 1,
  102. "condition": "${STAGE.equalsIgnoreCase('TELEGRAM_END_STAGE')}",
  103. "description": "Enter Menu Options",
  104. "action": "RESPONSE_NOTIFY",
  105. "stepsName": [
  106. "TelegramOptinRuleForFinalMessages"
  107. ]
  108. },
  109. {
  110. "name": "MenuSubscribe2GB",
  111. "active": true,
  112. "priority": 1,
  113. "condition": "${STAGE.equalsIgnoreCase('/start_SUBSCRIBE_2GB')}",
  114. "description": "Enter Menu Options",
  115. "action": "RESPONSE_NOTIFY",
  116. "stepsName": [
  117. "SubscribeService"
  118. ]
  119. },
  120. {
  121. "name": "MenuSubscribe10GB",
  122. "active": true,
  123. "priority": 1,
  124. "condition": "${STAGE.equalsIgnoreCase('/start_SUBSCRIBE_10GB')}",
  125. "description": "Enter Menu Options",
  126. "action": "RESPONSE_NOTIFY",
  127. "stepsName": [
  128. "SubscribeService"
  129. ]
  130. }
  131. ],
  132. "blSteps": [
  133. {
  134. "name": "TelegramOptinSessionValidation",
  135. "active": false,
  136. "priority": 1,
  137. "description": "Check if session is still valid since the beginning",
  138. "condition": "${STAGE_SESSION_TIME - OPTIN_SESSION_CREATE_DATE < 600000}",
  139. "responseCause": "",
  140. "type": "LOGICAL_EXPRESSION",
  141. "action": "RESPONSE_NOTIFY",
  142. "endCause": "OptinRuleFailed"
  143. },
  144. {
  145. "name": "TelegramOptinSessionSessionValidation",
  146. "active": false,
  147. "priority": 2,
  148. "description": "Check if session is still valid since the last interact",
  149. "condition": "${STAGE_SESSION_TIME - OPTIN_SESSION_LAST_UPDATE_DATE < 120000}",
  150. "responseCause": "",
  151. "type": "LOGICAL_EXPRESSION",
  152. "action": "RESPONSE_NOTIFY",
  153. "endCause": "OptinRuleAuth"
  154. },
  155. {
  156. "name": "TelegramOptinFirstMenu",
  157. "active": true,
  158. "priority": 1,
  159. "description": "Content BEGIN MENU",
  160. "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
  161. "responseCause": "B:BalanceEnquiry,Subscribe,Recharge by Voucher",
  162. "type": "OPTIN_MENU_EXPRESSION",
  163. "action": "RESPONSE_NOTIFY",
  164. "endCause": "ErrorOnBalance",
  165. "stepsParamsList": [
  166. {
  167. "name": "Telegram",
  168. "stepsParams": [
  169. {
  170. "name": "QUESTION_MESSAGE",
  171. "value": "Please choose one action to execute"
  172. }
  173. ]
  174. }
  175. ]
  176. },
  177. {
  178. "name": "GetUserBalanceService",
  179. "active": true,
  180. "priority": 2,
  181. "description": "Invoke Method with msisdn",
  182. "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
  183. "responseCause": "T: Your balance data is ${data}, balance amount is ${balance} and sms limit is ${sms}",
  184. "type": "INVOKE_SYSTEM",
  185. "action": "TERMINATE",
  186. "endCause": "OptinRuleFailed",
  187. "stepsParamsList": [
  188. {
  189. "name": "STEP",
  190. "stepsParams": [
  191. {
  192. "name": "INVOKE_METHOD",
  193. "value": "LocalBalance"
  194. }
  195. ]
  196. }
  197. ]
  198. },
  199. {
  200. "name": "TelegramSubscribeMenu",
  201. "active": true,
  202. "priority": 1,
  203. "description": "MENU_START_2",
  204. "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
  205. "responseCause": "B:1GB,2GB,10GB",
  206. "type": "OPTIN_MENU_EXPRESSION",
  207. "action": "RESPONSE_NOTIFY",
  208. "endCause": "OptinRuleQuestionTelegram",
  209. "stepsParamsList": [
  210. {
  211. "name": "TELEGRAM",
  212. "stepsParams": [
  213. {
  214. "name": "QUESTION_MESSAGE",
  215. "value": "Please choose one rate plan"
  216. }
  217. ]
  218. }
  219. ]
  220. },
  221. {
  222. "name": "VoucherActiveService",
  223. "active": true,
  224. "priority": 2,
  225. "description": "Voucher Activated with success",
  226. "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
  227. "responseCause": "T:Success you used the voucher with success",
  228. "type": "INVOKE_SYSTEM",
  229. "action": "TERMINATE",
  230. "endCause": "ErrorOnVoucherCode",
  231. "stepsParamsList": [
  232. {
  233. "name": "STEP",
  234. "stepsParams": [
  235. {
  236. "name": "INVOKE_METHOD",
  237. "value": "LocalVoucher"
  238. }
  239. ]
  240. }
  241. ]
  242. },
  243. {
  244. "name": "TelegramVouchercode",
  245. "active": true,
  246. "priority": 1,
  247. "description": "Content MENU_START_3",
  248. "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
  249. "responseCause": "VOUCHER_CODE",
  250. "type": "OPTIN_MENU_EXPRESSION",
  251. "action": "INPUT_TYPE",
  252. "endCause": "ErrorMissingVoucher"
  253. },
  254. {
  255. "name": "TelegramPhoneNumber",
  256. "active": true,
  257. "priority": 1,
  258. "description": "Content MENU_START_3",
  259. "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
  260. "responseCause": "PHONE_NUMBER",
  261. "type": "OPTIN_MENU_EXPRESSION",
  262. "action": "INPUT_TYPE",
  263. "endCause": "ErrorMissingPhoneNumber"
  264. },
  265. {
  266. "name": "TelegramPhoneNumberRequired",
  267. "active": true,
  268. "priority": 1,
  269. "description": "Content MENU_START_3",
  270. "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
  271. "responseCause": "OPTIN_SESSION_SENDER_PHONE_NUMBER",
  272. "type": "OPTIN_MENU_EXPRESSION",
  273. "action": "INPUT_TYPE",
  274. "endCause": "ErrorMissingPhoneNumber"
  275. },
  276. {
  277. "name": "SubscribeService",
  278. "active": true,
  279. "priority": 1,
  280. "description": "Subscribe service",
  281. "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
  282. "responseCause": "T:The service was subscribed with success",
  283. "type": "INVOKE_SYSTEM",
  284. "action": "TERMINATE",
  285. "endCause": "ErrorOnSubscription",
  286. "stepsParamsList": [
  287. {
  288. "name": "STEP",
  289. "stepsParams": [
  290. {
  291. "name": "INVOKE_METHOD",
  292. "value": "LocalSubscribe"
  293. }
  294. ]
  295. }
  296. ]
  297. },
  298. {
  299. "name": "TelegramOptinRuleForFinalMessages",
  300. "active": true,
  301. "priority": 1,
  302. "description": "Content TELEGRAM_END_STAGE",
  303. "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
  304. "responseCause": "",
  305. "type": "OPTIN_MENU_EXPRESSION",
  306. "action": "TERMINATE",
  307. "endCause": "ErrorOnFinalStage",
  308. "stepsParamsList": [
  309. {
  310. "name": "TELEGRAM",
  311. "description": "TELEGRAM FINAL MESSAGES",
  312. "stepsParams": [
  313. {
  314. "name": "GOODBYE_MESSAGE",
  315. "value": "Thank you ! If you need something just ype /start and see the menu again"
  316. },
  317. {
  318. "name": "RETRY_MESSAGE",
  319. "value": "Please try again with the menu and type /start"
  320. }
  321. ]
  322. }
  323. ]
  324. }
  325. ],
  326. "blOperationsEndCauses": [
  327. {
  328. "endCause": "OptinRuleFailed",
  329. "endCauseDescription": "Problem with Step Auth",
  330. "blEndCauses": {
  331. "code": 1,
  332. "reason": "Optin Rule Failed",
  333. "message": "Commercial Time not valid.",
  334. "reference": ""
  335. }
  336. },
  337. {
  338. "endCause": "OptinRuleAuth",
  339. "endCauseDescription": "Problem with Step Auth",
  340. "blEndCauses": {
  341. "code": 1,
  342. "reason": "Optin Rule Auth",
  343. "message": "Problem with Step Auth",
  344. "reference": ""
  345. }
  346. },
  347. {
  348. "endCause": "OptinRuleQuestionTelegram",
  349. "endCauseDescription": "Conditions dont match",
  350. "blEndCauses": {
  351. "code": 1,
  352. "reason": "Optin Rule Question Telegram",
  353. "message": "Conditions dont match",
  354. "reference": ""
  355. }
  356. },
  357. {
  358. "endCause": "ErrorOnBalance",
  359. "endCauseDescription": "Insert PhoneNumber",
  360. "blEndCauses": {
  361. "code": 1,
  362. "reason": "Error On Balance",
  363. "message": "Insert PhoneNumber",
  364. "reference": ""
  365. }
  366. },
  367. {
  368. "endCause": "ErrorOnVoucherCode",
  369. "endCauseDescription": "Voucher Active",
  370. "blEndCauses": {
  371. "code": 1,
  372. "reason": "Error On Voucher Code",
  373. "message": "Cant use the code for the voucher",
  374. "reference": ""
  375. }
  376. },
  377. {
  378. "endCause": "ErrorMissingVoucher",
  379. "endCauseDescription": "Voucher Activation",
  380. "blEndCauses": {
  381. "code": 1,
  382. "reason": "Error Missing Voucher",
  383. "message": "Insert Voucher Code",
  384. "reference": ""
  385. }
  386. },
  387. {
  388. "endCause": "ErrorMissingPhoneNumber",
  389. "endCauseDescription": "Voucher Activation",
  390. "blEndCauses": {
  391. "code": 1,
  392. "reason": "Error Missing Phone Number",
  393. "message": "Insert PhoneNumber",
  394. "reference": ""
  395. }
  396. },
  397. {
  398. "endCause": "ErrorOnSubscription",
  399. "endCauseDescription": "Cant subscribe the service data",
  400. "blEndCauses": {
  401. "code": 1,
  402. "reason": "Error On Subscription",
  403. "message": "Service Subscription",
  404. "reference": ""
  405. }
  406. },
  407. {
  408. "endCause": "ErrorOnFinalStage",
  409. "endCauseDescription": "Error on messages for final stage",
  410. "blEndCauses": {
  411. "code": 1,
  412. "reason": "Error On Final Stage",
  413. "message": "Error on messages for final stage",
  414. "reference": ""
  415. }
  416. },
  417. {
  418. "endCause": "ErrorOnSubscriptionServiceData",
  419. "endCauseDescription": "Cant subscribe the service data",
  420. "blEndCauses": {
  421. "code": 1,
  422. "reason": "Error On Subscription Service Data",
  423. "message": "Cant subscribe the service data",
  424. "reference": ""
  425. }
  426. }
  427. ]
  428. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement