Question
4
Replies
195
Views
Posted: September 9, 2017
Last activity: October 16, 2018
Closed
Solved
Facebook chatbot dynamic responses
Hello Folks,
How do I include dynamic content to my FB chatbot responses? e.g. a list of items fetched from a database
thanks
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
Hi Zensar,
Using a Response of type Text, you can include dynamic content into the text body the same way you would for a Paragraph rule. For example: <<OperatorID.pyUserName>>
Text responses as basic commands are running outside of any specific work context, so you only have system and data pages to work with. Though you do have the channel interaction itself along with data pages and system pages. i.e. <<D_UserData.AccountStatus>> Where D_UserData could utilize pxRequestor, Application or OperatorID to fetch user-specific data, assuming that you have linked their facebook account to their Pega operator.
Alternatively, you can go to Records (explorer on the left) > User Interface > Paragraph and you will find entries for Work-Channel-Interaction-Facebook with names like "autoHASHCODE". You can open and edit these within the Paragraph editor. However, beware that not all paragraph features are supported by facebook, and using an unsupported markup may have unwanted results.
I hope this gets you what you need!
- James