Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "version": 13,
- "activationDate": "2018-08-29T09:12:33.001Z",
- "user": "John Doe",
- "name": "version1.0.0",
- "description": "Complete configuration of the tables",
- "active": true,
- "blFlows": [
- {
- "name": "OPTIN_FLOW_TELEGRAM_BOT",
- "flowType": "OPTIN_FLOW_TELEGRAM_BOT",
- "active": true,
- "description": "Flow For Optin Engine (Telegram BOT)",
- "stagesName": [
- "Validate_Season_For_Optin_TELEGRAM_BOT",
- "BEGIN_MENU",
- "MenuBalance",
- "MenuSubscribe",
- "MenuRecharge",
- "MenuSubscribe1GB",
- "MenuTelegram",
- "MenuSubscribe2GB",
- "MenuSubscribe10GB"
- ]
- }
- ],
- "blStages": [
- {
- "name": "Validate_Season_For_Optin_TELEGRAM_BOT",
- "active": false,
- "priority": 0,
- "condition": "${STAGE_SESSION_TIME > 0}",
- "description": "Validate Session",
- "action": "DEFAULT",
- "stepsName": [
- "TelegramOptinSessionValidation",
- "TelegramOptinSessionSessionValidation"
- ]
- },
- {
- "name": "BEGIN_MENU",
- "active": true,
- "priority": 1,
- "condition": "${STAGE.equalsIgnoreCase('/start')}",
- "description": "Get First Chat Bot Menu",
- "action": "RESPONSE_NOTIFY",
- "stepsName": [
- "TelegramOptinFirstMenu"
- ]
- },
- {
- "name": "MenuBalance",
- "active": true,
- "priority": 1,
- "condition": "${STAGE.equalsIgnoreCase('/start_BALANCEENQUIRY')}",
- "description": "Enter Menu Options",
- "action": "RESPONSE_NOTIFY",
- "stepsName": [
- "TelegramPhoneNumberRequired",
- "GetUserBalanceService"
- ]
- },
- {
- "name": "MenuSubscribe",
- "active": true,
- "priority": 1,
- "condition": "${STAGE.equalsIgnoreCase('/start_SUBSCRIBE')}",
- "description": "Enter Menu Options",
- "action": "RESPONSE_NOTIFY",
- "stepsName": [
- "TelegramSubscribeMenu"
- ]
- },
- {
- "name": "MenuRecharge",
- "active": true,
- "priority": 1,
- "condition": "${STAGE.equalsIgnoreCase('/start_RECHARGE_BY_VOUCHER')}",
- "description": "Enter Menu Options",
- "action": "RESPONSE_NOTIFY",
- "stepsName": [
- "VoucherActiveService",
- "TelegramVouchercode",
- "TelegramPhoneNumber"
- ]
- },
- {
- "name": "MenuSubscribe1GB",
- "active": true,
- "priority": 1,
- "condition": "${STAGE.equalsIgnoreCase('/start_SUBSCRIBE_1GB')}",
- "description": "Enter Menu Options",
- "action": "RESPONSE_NOTIFY",
- "stepsName": [
- "SubscribeService"
- ]
- },
- {
- "name": "MenuTelegram",
- "active": true,
- "priority": 1,
- "condition": "${STAGE.equalsIgnoreCase('TELEGRAM_END_STAGE')}",
- "description": "Enter Menu Options",
- "action": "RESPONSE_NOTIFY",
- "stepsName": [
- "TelegramOptinRuleForFinalMessages"
- ]
- },
- {
- "name": "MenuSubscribe2GB",
- "active": true,
- "priority": 1,
- "condition": "${STAGE.equalsIgnoreCase('/start_SUBSCRIBE_2GB')}",
- "description": "Enter Menu Options",
- "action": "RESPONSE_NOTIFY",
- "stepsName": [
- "SubscribeService"
- ]
- },
- {
- "name": "MenuSubscribe10GB",
- "active": true,
- "priority": 1,
- "condition": "${STAGE.equalsIgnoreCase('/start_SUBSCRIBE_10GB')}",
- "description": "Enter Menu Options",
- "action": "RESPONSE_NOTIFY",
- "stepsName": [
- "SubscribeService"
- ]
- }
- ],
- "blSteps": [
- {
- "name": "TelegramOptinSessionValidation",
- "active": false,
- "priority": 1,
- "description": "Check if session is still valid since the beginning",
- "condition": "${STAGE_SESSION_TIME - OPTIN_SESSION_CREATE_DATE < 600000}",
- "responseCause": "",
- "type": "LOGICAL_EXPRESSION",
- "action": "RESPONSE_NOTIFY",
- "endCause": "OptinRuleFailed"
- },
- {
- "name": "TelegramOptinSessionSessionValidation",
- "active": false,
- "priority": 2,
- "description": "Check if session is still valid since the last interact",
- "condition": "${STAGE_SESSION_TIME - OPTIN_SESSION_LAST_UPDATE_DATE < 120000}",
- "responseCause": "",
- "type": "LOGICAL_EXPRESSION",
- "action": "RESPONSE_NOTIFY",
- "endCause": "OptinRuleAuth"
- },
- {
- "name": "TelegramOptinFirstMenu",
- "active": true,
- "priority": 1,
- "description": "Content BEGIN MENU",
- "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
- "responseCause": "B:BalanceEnquiry,Subscribe,Recharge by Voucher",
- "type": "OPTIN_MENU_EXPRESSION",
- "action": "RESPONSE_NOTIFY",
- "endCause": "ErrorOnBalance",
- "stepsParamsList": [
- {
- "name": "Telegram",
- "stepsParams": [
- {
- "name": "QUESTION_MESSAGE",
- "value": "Please choose one action to execute"
- }
- ]
- }
- ]
- },
- {
- "name": "GetUserBalanceService",
- "active": true,
- "priority": 2,
- "description": "Invoke Method with msisdn",
- "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
- "responseCause": "T: Your balance data is ${data}, balance amount is ${balance} and sms limit is ${sms}",
- "type": "INVOKE_SYSTEM",
- "action": "TERMINATE",
- "endCause": "OptinRuleFailed",
- "stepsParamsList": [
- {
- "name": "STEP",
- "stepsParams": [
- {
- "name": "INVOKE_METHOD",
- "value": "LocalBalance"
- }
- ]
- }
- ]
- },
- {
- "name": "TelegramSubscribeMenu",
- "active": true,
- "priority": 1,
- "description": "MENU_START_2",
- "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
- "responseCause": "B:1GB,2GB,10GB",
- "type": "OPTIN_MENU_EXPRESSION",
- "action": "RESPONSE_NOTIFY",
- "endCause": "OptinRuleQuestionTelegram",
- "stepsParamsList": [
- {
- "name": "TELEGRAM",
- "stepsParams": [
- {
- "name": "QUESTION_MESSAGE",
- "value": "Please choose one rate plan"
- }
- ]
- }
- ]
- },
- {
- "name": "VoucherActiveService",
- "active": true,
- "priority": 2,
- "description": "Voucher Activated with success",
- "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
- "responseCause": "T:Success you used the voucher with success",
- "type": "INVOKE_SYSTEM",
- "action": "TERMINATE",
- "endCause": "ErrorOnVoucherCode",
- "stepsParamsList": [
- {
- "name": "STEP",
- "stepsParams": [
- {
- "name": "INVOKE_METHOD",
- "value": "LocalVoucher"
- }
- ]
- }
- ]
- },
- {
- "name": "TelegramVouchercode",
- "active": true,
- "priority": 1,
- "description": "Content MENU_START_3",
- "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
- "responseCause": "VOUCHER_CODE",
- "type": "OPTIN_MENU_EXPRESSION",
- "action": "INPUT_TYPE",
- "endCause": "ErrorMissingVoucher"
- },
- {
- "name": "TelegramPhoneNumber",
- "active": true,
- "priority": 1,
- "description": "Content MENU_START_3",
- "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
- "responseCause": "PHONE_NUMBER",
- "type": "OPTIN_MENU_EXPRESSION",
- "action": "INPUT_TYPE",
- "endCause": "ErrorMissingPhoneNumber"
- },
- {
- "name": "TelegramPhoneNumberRequired",
- "active": true,
- "priority": 1,
- "description": "Content MENU_START_3",
- "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
- "responseCause": "OPTIN_SESSION_SENDER_PHONE_NUMBER",
- "type": "OPTIN_MENU_EXPRESSION",
- "action": "INPUT_TYPE",
- "endCause": "ErrorMissingPhoneNumber"
- },
- {
- "name": "SubscribeService",
- "active": true,
- "priority": 1,
- "description": "Subscribe service",
- "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
- "responseCause": "T:The service was subscribed with success",
- "type": "INVOKE_SYSTEM",
- "action": "TERMINATE",
- "endCause": "ErrorOnSubscription",
- "stepsParamsList": [
- {
- "name": "STEP",
- "stepsParams": [
- {
- "name": "INVOKE_METHOD",
- "value": "LocalSubscribe"
- }
- ]
- }
- ]
- },
- {
- "name": "TelegramOptinRuleForFinalMessages",
- "active": true,
- "priority": 1,
- "description": "Content TELEGRAM_END_STAGE",
- "condition": "${OPTIN_SESSION_STEP_MENU.equalsIgnoreCase('OPTIN_SESSION_STEP_FIRST_MENU_START')}",
- "responseCause": "",
- "type": "OPTIN_MENU_EXPRESSION",
- "action": "TERMINATE",
- "endCause": "ErrorOnFinalStage",
- "stepsParamsList": [
- {
- "name": "TELEGRAM",
- "description": "TELEGRAM FINAL MESSAGES",
- "stepsParams": [
- {
- "name": "GOODBYE_MESSAGE",
- "value": "Thank you ! If you need something just ype /start and see the menu again"
- },
- {
- "name": "RETRY_MESSAGE",
- "value": "Please try again with the menu and type /start"
- }
- ]
- }
- ]
- }
- ],
- "blOperationsEndCauses": [
- {
- "endCause": "OptinRuleFailed",
- "endCauseDescription": "Problem with Step Auth",
- "blEndCauses": {
- "code": 1,
- "reason": "Optin Rule Failed",
- "message": "Commercial Time not valid.",
- "reference": ""
- }
- },
- {
- "endCause": "OptinRuleAuth",
- "endCauseDescription": "Problem with Step Auth",
- "blEndCauses": {
- "code": 1,
- "reason": "Optin Rule Auth",
- "message": "Problem with Step Auth",
- "reference": ""
- }
- },
- {
- "endCause": "OptinRuleQuestionTelegram",
- "endCauseDescription": "Conditions dont match",
- "blEndCauses": {
- "code": 1,
- "reason": "Optin Rule Question Telegram",
- "message": "Conditions dont match",
- "reference": ""
- }
- },
- {
- "endCause": "ErrorOnBalance",
- "endCauseDescription": "Insert PhoneNumber",
- "blEndCauses": {
- "code": 1,
- "reason": "Error On Balance",
- "message": "Insert PhoneNumber",
- "reference": ""
- }
- },
- {
- "endCause": "ErrorOnVoucherCode",
- "endCauseDescription": "Voucher Active",
- "blEndCauses": {
- "code": 1,
- "reason": "Error On Voucher Code",
- "message": "Cant use the code for the voucher",
- "reference": ""
- }
- },
- {
- "endCause": "ErrorMissingVoucher",
- "endCauseDescription": "Voucher Activation",
- "blEndCauses": {
- "code": 1,
- "reason": "Error Missing Voucher",
- "message": "Insert Voucher Code",
- "reference": ""
- }
- },
- {
- "endCause": "ErrorMissingPhoneNumber",
- "endCauseDescription": "Voucher Activation",
- "blEndCauses": {
- "code": 1,
- "reason": "Error Missing Phone Number",
- "message": "Insert PhoneNumber",
- "reference": ""
- }
- },
- {
- "endCause": "ErrorOnSubscription",
- "endCauseDescription": "Cant subscribe the service data",
- "blEndCauses": {
- "code": 1,
- "reason": "Error On Subscription",
- "message": "Service Subscription",
- "reference": ""
- }
- },
- {
- "endCause": "ErrorOnFinalStage",
- "endCauseDescription": "Error on messages for final stage",
- "blEndCauses": {
- "code": 1,
- "reason": "Error On Final Stage",
- "message": "Error on messages for final stage",
- "reference": ""
- }
- },
- {
- "endCause": "ErrorOnSubscriptionServiceData",
- "endCauseDescription": "Cant subscribe the service data",
- "blEndCauses": {
- "code": 1,
- "reason": "Error On Subscription Service Data",
- "message": "Cant subscribe the service data",
- "reference": ""
- }
- }
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement