...
Login to Experience Manager and Select your project.
Open Experience Designer.
Import the below flow to any Experience Designer tab. Refer How do I export and import flows in Experience Designer
Code Block |
---|
...
language | json |
---|
[ |
...
{ |
...
"id": " |
...
150f878f. |
...
07127", |
...
"type": "orbita-bot-provider-v2", |
...
|
...
"z": " |
...
eff2664d. |
...
952698", |
...
"name": "",
|
...
"botInParser": "var _ = global.get('lodash');\n// msg.payload.originalRequest.data = {\n// \"surveyID\":\"10000\"\n// }\nif(msg && msg.req && msg.req.query) {\n \n msg.payload.originalRequest.data.surveyID=msg.req.query.surveyId;\n}\n\nvar socketIOId = _.get(msg, 'req.socketIOId', null);\n\nif (socketIOId) {\n _.set(msg, 'payload.originalRequest.data.socketIOId', socketIOId);\n}\n", |
...
"botOutParser": "msg.payload.micInput=true;\nmsg.payload.startAlignmentTop = true;\nmsg.enableArrayResponse = true\n", |
...
|
...
"transcriptEnabled": false,
|
...
"ttsconfig": "{\n \"languageCode\": \"en-US\",\n \"ssmlGender\": \"MALE\",\n \"audioEncoding\": \"MP3\"\n}", |
...
"providerType": "Google", |
...
|
...
"skillConfig": " |
...
1ce992c2. |
...
3c9dfd", |
...
"token": "", |
...
|
...
"noerr": 0,
|
...
"nlpData": false, |
...
|
...
"x": |
...
380, "y": 320, " |
...
wires": |
...
[ |
...
[ |
...
" |
...
5895d493. |
...
b1ae3c"] |
...
] }, |
...
|
...
{
|
...
"id": " |
...
16d2d648. |
...
241832", |
...
|
...
"type": "bot-in",
|
...
"z": " |
...
eff2664d. |
...
952698", |
...
"skillConfig": " |
...
1ce992c2. |
...
3c9dfd", |
...
"name": "", |
...
"rules": [], |
...
|
...
"x": |
...
190, "y": 320, " |
...
wires": |
...
[ |
...
|
...
[" |
...
150f878f. |
...
07127"] |
...
] }, |
...
|
...
{ |
...
"id": " |
...
4c7db3dd. |
...
43051c", |
...
"type": "bot-out", |
...
"z": " |
...
eff2664d. |
...
952698", |
...
"skillConfig": " |
...
1ce992c2. |
...
3c9dfd", |
...
|
...
"name": "",
|
...
"x": |
...
740, |
...
"y": |
...
320, |
...
"wires": [] |
...
|
...
}, |
...
{
|
...
"id": " |
...
5895d493. |
...
b1ae3c", |
...
"type": "function", |
...
|
...
"z": " |
...
eff2664d. |
...
952698", |
...
"name": "", |
...
|
...
"func": "msg.payload.directive = {\n \"type\": \"mainmenu\",\n \"title\":\"Menu options\",\n \"buttons\": []\n }\nreturn msg;",
|
...
"outputs": 1, |
...
"noerr": 0, |
...
|
...
"x": |
...
550, "y": 320, " |
...
wires": |
...
[ |
...
[ |
...
" |
...
4c7db3dd. |
...
43051c"] |
...
] }, { |
...
"id": " |
...
ed4ff8df. |
...
ac8108", |
...
"type": "template", |
...
|
...
"z": " |
...
eff2664d. |
...
952698", "name": "", " |
...
field": "payload", "fieldType": "msg", " |
...
format": " |
...
handlebars", "syntax": "mustache", " |
...
template": " |
...
<html>\n<head>\n <title>Orbita Bot Test</title>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link |
...
rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css\" integrity=\"sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\" />\n</head>\n<body>\n <script src=\"/chatbot/v3/chat.js\"></script>\n <script>\n OrbitaChatBotV3.init({\n projectId: '{{projectId}}',\n serverUrl: '{{req.headers.x-forwarded-proto}}://{{req.headers.host}}',\n botContainerId: 'chatWindow',\n botContentId: 'messages',\n botInputMessageId: 'input',\n botSendButtonId: 'orbita-send-button',\n botMicId: 'chatMic',\n botSpeakerId: 'un-mute',\n botMenuId: ' |
...
menu-icon',\n botIcon: 'chat-icon',\n botClose: 'menu',\n customData: {\n chooseFlow: \"\"\n },\n botSettings: { \n elementId: 'orbitabot',\n template: 'default' |
...
\n }\n });\n </script>\n</body>\n</html>", |
...
|
...
"output": "str",
|
...
"x": |
...
560, "y": 280, " |
...
wires": |
...
[ |
...
[ |
...
" |
...
2e134f4f. |
...
74041"] |
...
] }, { |
...
"id": " |
...
2e134f4f. |
...
74041", |
...
"type": "http response", |
...
"z": " |
...
eff2664d. |
...
952698", |
...
"name": "", |
...
"statusCode": "", |
...
|
...
"headers": {},
|
...
"x": |
...
730, |
...
"y": |
...
280, |
...
"wires": [] |
...
|
...
}, { |
...
"id": " |
...
aff90191. |
...
d5ce2", |
...
"type": "http in", |
...
"z": " |
...
eff2664d. |
...
952698", |
...
"name": "", |
...
"url": "/v3Bot", |
...
|
...
"method": "get",
|
...
"upload": false, |
...
"swaggerDoc": "", |
...
|
...
"x": |
...
220, "y": 280, " |
...
wires": |
...
[ |
...
[ |
...
" |
...
6f9af7b6. |
...
e1616"] |
...
] }, { |
...
"id": " |
...
d7b89aee. |
...
ff7538", |
...
|
...
"type": "comment",
|
...
"z": " |
...
eff2664d. |
...
952698", |
...
|
...
"name": "v3Bot View",
|
...
"info": "", |
...
|
...
"x": |
...
200, |
...
|
...
"y": |
...
240, |
...
"wires": [] |
...
}, { |
...
|
...
"id": " |
...
6f9af7b6. |
...
e1616", |
...
"type": "function", |
...
|
...
"z": " |
...
eff2664d. |
...
952698", "name": "", |
...
|
...
"func": "const util = global.get('orbitaUtil');\nmsg.projectId = util.getProjectId(node);\nreturn msg;",
|
...
"outputs": 1, |
...
"noerr": 0, |
...
|
...
"x": |
...
410, "y": 280, " |
...
wires": |
...
[ |
...
[" |
...
ed4ff8df. |
...
ac8108"] |
...
] }, { |
...
"id": " |
...
1ce992c2. |
...
3c9dfd", |
...
|
...
"type": "alexa-skill-config",
|
...
"skillname": " |
...
Project |
...
one", |
...
|
...
"projectId": " |
...
62022756b9c50f006d7003dc", |
...
"intents": "[]", |
...
"skillstate": "fromsession" |
...
|
...
}, {
|
...
"id": "slots", |
...
"type": "slots", |
...
|
...
"z": "",
|
...
"slots": [] |
...
|
...
} |
...
] |
Following the above steps will create a new flow in the Experience Designer as shown below.
...