Closed pld closed 7 years ago
How to do this: 1.
{context: { user: '1443686282372521',
channel: '1443686282372521',
bot:
{ type: 'fb',
botkit: [Object],
config: {},
utterances: [Object],
startConversation: [Function],
createConversation: [Function],
send: [Function],
startTyping: [Function],
stopTyping: [Function],
replyWithTyping: [Function],
reply: [Function],
findConversation: [Function],
say: [Function]
}
}
}
2.
An example facebook profile from FB looks like so
{ first_name: 'Bots',
last_name: 'Maker',
profile_pic: 'https://scontent.xx.fbcdn.net/v/t1.0-1/17426114_114715302399085_9126504909207438629_n.jpg?oh=ac5699635c68bccd07dc908b9dc93a03&oe=597A2513',
locale: 'en_GB',
timezone: 3,
gender: 'female',
is_payment_enabled: true}
We plan to POST to rapidpro JSON that looks like this:
'{
"name": "Initial Contact",
"urns": ["facebook:2334445454"],
"fields": { "profile_pic": "https://scontent.xx.fbcdn.net/v/t1.0-1/17426114_114715302399085_9126504909207438629_n.jpg?oh=ac5699635c68bccd07dc908b9dc93a03&oe=597A2513",
"locale": "en_GB",
"timezone": 3,
"gender": "female",
"is_payment_enabled": true}
}'
3.
4.
When a flow ends, we want a module to group all the data collected in the flow together, including:
Decoupled from the module that aggregates data, write a module that stores this data in Ona, can use the milia (and if we stick in JS for now the JS link to milia, @royrutto and @geoffreymuchai have used this)