Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
node_crisp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
web
node_crisp
Commits
7e283c8f
Commit
7e283c8f
authored
Sep 02, 2021
by
Gabriel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Agrega pasos para preguntar telefono
parent
b5e03f5e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
ips_turnos_bajo_demanda.js
handlers/ips_turnos_bajo_demanda.js
+9
-0
pasos_ips_turnos_bajo_demanda.js
handlers/pasos_ips_turnos_bajo_demanda.js
+2
-0
No files found.
handlers/ips_turnos_bajo_demanda.js
View file @
7e283c8f
...
@@ -16,6 +16,7 @@ const TIPO_DOCUMENTO = 'tipo_documento';
...
@@ -16,6 +16,7 @@ const TIPO_DOCUMENTO = 'tipo_documento';
const
NUMERO_DOCUMENTO
=
'numero_documento'
;
const
NUMERO_DOCUMENTO
=
'numero_documento'
;
const
FECHA_NACIMIENTO
=
'fecha_nacimiento'
;
const
FECHA_NACIMIENTO
=
'fecha_nacimiento'
;
const
SEXO
=
'sexo'
;
const
SEXO
=
'sexo'
;
const
TELEFONO
=
'telefono'
;
const
CORREO
=
'correo'
;
const
CORREO
=
'correo'
;
function
getChoiceElegida
(
message
){
function
getChoiceElegida
(
message
){
...
@@ -105,6 +106,14 @@ module.exports =
...
@@ -105,6 +106,14 @@ module.exports =
},
},
resp_sexo
:
async
function
(
message
,
userData
,
website_id
,
session_id
){
resp_sexo
:
async
function
(
message
,
userData
,
website_id
,
session_id
){
userData
[
SEXO
]
=
getChoiceElegida
(
message
).
value
;
userData
[
SEXO
]
=
getChoiceElegida
(
message
).
value
;
await
this
.
ask_telefono
(
message
,
userData
,
website_id
,
session_id
);
},
ask_telefono
:
async
function
(
message
,
userData
,
website_id
,
session_id
){
await
crisp
.
setSiguientePaso
(
website_id
,
session_id
,
pasos
.
RESP_TELEFONO
,
userData
);
await
crisp
.
sendTextMessage
(
website_id
,
session_id
,
'Ingresá tu teléfono'
);
},
resp_telefono
:
async
function
(
message
,
userData
,
website_id
,
session_id
){
userData
[
TELEFONO
]
=
message
.
content
;
await
this
.
ask_correo
(
message
,
userData
,
website_id
,
session_id
);
await
this
.
ask_correo
(
message
,
userData
,
website_id
,
session_id
);
},
},
ask_correo
:
async
function
(
message
,
userData
,
website_id
,
session_id
){
ask_correo
:
async
function
(
message
,
userData
,
website_id
,
session_id
){
...
...
handlers/pasos_ips_turnos_bajo_demanda.js
View file @
7e283c8f
...
@@ -10,6 +10,8 @@ module.exports = Object.freeze({
...
@@ -10,6 +10,8 @@ module.exports = Object.freeze({
RESP_FECHA_NACIMIENTO
:
'resp_fecha_nacimiento'
,
RESP_FECHA_NACIMIENTO
:
'resp_fecha_nacimiento'
,
ASK_SEXO
:
'ask_sexo'
,
ASK_SEXO
:
'ask_sexo'
,
RESP_SEXO
:
'resp_sexo'
,
RESP_SEXO
:
'resp_sexo'
,
ASK_TELEFONO
:
'ask_telefono'
,
RESP_TELEFONO
:
'resp_telefono'
,
ASK_CORREO
:
'ask_correo'
,
ASK_CORREO
:
'ask_correo'
,
RESP_CORREO
:
'resp_correo'
RESP_CORREO
:
'resp_correo'
});
});
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment