Discussion
Virtusa
LK
Last activity: 9 Dec 2020 10:54 EST
Facebook Chat Bot Configuration
What is Facebook Chat Bot?
It’s an integration with Facebook messenger app to create cases or displaying a menu of commands.
- Prerequisites
- Create a Facebook account.
- Obtain credentials to a Pega Platform instance.
- Purchase a separate license for Pega Intelligent Virtual Assistant.
- Import the FacebookChannel component to Pega Platform
- Creating Facebook Page
1.Log in to Facebook with your Facebook credentials.
2.Create a Facebook page, and specify its type and category.
3.Display the new Facebook page once it is created. On the left side of the page, click About.
4.In the More Info section, save the generated Page ID for your Facebook page
- Adding Facebook App
1.Log in to the Facebook developer portal with your Facebook credentials.
2.Add or create a Facebook app, and specify a unique name, contact email address, and the Apps for Messenger category.
3.From the Products section on the left side, click Messenger.
- Configuring Webhooks
Import FaceBook channel Component
- Setting up a Facebook channel interface in Pega Platform
-
1.Log in to Pega Express.2.From the Pega Express list, click Channels and interfaces.3.In the Create new channel interface section, click the Facebook channel.4.In the Channel interface name field, enter a name for your Facebook chatbot.5.Optional: In the Description field, describe the purpose your Facebook chatbot.6.Click the Connection tab.7.In the Facebook page ID field, enter the Page ID for the previously created Facebook page.8.In the Template operator ID list, click the name of an existing Pega Platform operator to use as the template. For more information, see Additional information about template operator ID.9.In the Page access token field, enter the page access token value that was generated for the Facebook Messenger app, for example: EAAEZBTukSvHkBAKERVfxZBnOEVNW679G8cQ4...
-
-
- Adding Case and Questions
1 . Go to the case and add case type
2. Give a Name to Stage
3. Select Facebook Check book
4.Click Configure Conversation and add questions
- Adding cases to channel
You can add cases for the Facebook chatbot so that users, by entering a specific command in Messenger, open a case for the application. You can select any case that is defined for the Pega Platform application.
-
Reply
-
Ravi Kumar Pisupati Timothy Harfield -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Toyota Financial Services
AU
Excellent information provided as part of the article. Actually, waiting for this post from long time.
Thanks
Sandeep P V
Virtusa
LK
Good Job Sadakith
Virtusa
LK
Thank You
Virtusa
SG
Very useful information. Well explained. Thank you for sharing.
Virtusa
LK
Thank You
HCLTech
AU
Very useful information. Well explained.
Cognizant
US
Hi Lahiru,
we are trying to Implement the same, we are facing below error in callback url Link.
1)A secure Callback URL (https) is required
Our Application is using Http URL, will it not work for applications which use HTTP?
Does Pega Intelligent Virtual Assistant comes with import of Facebook channel or Do we need to purchase it explicitly?
Kindly let us know.
Virtusa
LK
HI Moukiu
Yes it`s not working for HTTP, you have to use https .for that you can use ngrok software (https://ngrok.com/download). using ngrok you can build Https URL for config Callback url
Yes you have to purchase Pega Intelligent Virtual Assistant
cognizant technology solutions
IN
Hi Lahiru,
When i configure webhooks. its showing an error. Can you tell where i am wrong.
Pegasystems Inc.
IN
You're using localhost as your channel host which is not valid. FB needs to communicate with your Pega server and the server should be on a public network.
Cognizant Technologies Ltd
IN
Hi All,
I was able to configure facebook in Pega using all the above steps. I have a question here. How do we create case in Pega out of the conversation(user Inputs) in facebook messenger. I know there are interaction cases created out of the fb conversations. But how do we use these for the Pega Main cases?
Any idea or thoughts?
Cognizant Technology Solutions
IN
Hi All,
How to add step for configure conversion(eg: facebook collect auto as mention in above screenshot) as I'm unable to get it while adding steps in case,Is it pre-define for FB channel.
Thanks,
SorenTara
Virtusa
LK
THEN you can add question shapes in the flow. in question shapes you can add conversion questions
Cognizant Technology Solutions
IN
Hi,
While configuring webhooks,I'm getting an error. Please tell me where I'm wrong.pfa
Regards,
SorenTara
Commonwealth Bank
AU
Thank you for this post Lahiru. Was trying to configure and found this post.:)
Virtusa
LK
WC :)
Merkle
GB
Hi,
I have understood all the configuration except the below portion:
"4.In the Callback URL field, enter the URL for your Pega Platform instance where you defined your new Facebook channel, for example: http://sample.pega.com:8080/prweb/PRHTTPService/channel/srv/fb"
Would you please help me with the syntax?
- How the call back URL need to preparare?
- Do I need to implement a HTTP service separately? Or 'Facebook channel interface' will work?
- I have created a 'Facebook channel interface' with name 'fb', I put he below URL 'https://pega.***.com/prweb/PRHTTPService/channel/srv/fb', but showing error message 'The URL couldn't be validated. Callback verification failed with the following errors: HTTP Status Code = 500; HTTP Message = Internal Server Error'.
- How to trace this functionality?
Thank you!
Regards,
Gopesh
Virtusa
LK
How the call back URL need to preparare?
actully i did this as R&D , so to preparare Call Back url , i used thrid party software , it`s called ngrok.
you have to downloard ngrok SW and you can watch how to prepare https url in youtube
this way i used to prepared call back url. then i didn`t get any errors
However if you going use facebook chat in real scenario , then you have to Purchase a license.it`s Pega Intelligent Virtual Assistant.
without license you can use this in real scenario
Incessant (Coforge Tech)
GB
Thanks Lahiru.. its a great article..
Wells Fargo
IN
Hi, I keep getting URL could not be validated in pega when i provide the callback url. I generated a https from ngrok. Any further steps from my end? Help would be appreciated.
Pegasystems Inc.
US
There is a channel service package on your system. It needs to have an access group that is the same as the template operator you are going to use in the channel config for your application. You should be able to see an error looking up the channel FB service in the app server log (catalina.out on a Tomcat hosted system).
Accenture
AU
How do we escalate a fb chat to an agent? Does it needs a queue to be mapped on chat server?
Pegasystems Inc.
IN
FB Chat can be escalated to agent using OOTB case type, Chat with agent, which should appear automatically in new FB channel created in application built on top of CustomerService.
Coforge
IN
For FB chat bot, I found that we can only configure questions smart shape. For my requirement I want to respond to customer with an answer. Ex: if customer type "Offers". Then I want to show him list of offers to him and take request and place purchase request using case management. Can I achieve this, if possible please help.
Pegasystems Inc.
IN
Yes, it's possible using question shape. When you go into question rules, select Answer type as multiple choice.
Accenture
AU
Hi,
If the requirement is to update back the customer on an ongoing case, how we can configure the channel information in the Existing Case Type.
The option I can think of is as follows:
- Mandate Customer while having the conversation in the messenger to quote their ongoing case reference
- Create a separate Case for facebook conversation and apply that in the channels and interfaces UI
- from this new case type open the case quoted by customer and show the information in the response by mapping them in the Questions Page
However, what is the usage of having Channels information which needs to be checked in every stage of the Case Type, how Facebook Channel interaction happens when it is configured in some later stages of the Case Type and not that of first case stage.
Regards,
Nabendu
Pegasystems Inc.
IN
Channel type parallel flow is present at every stage so that accidentally you don't come across an assignment shape. Remember, conversational cases support Survey (question and answer) shapes, if an assignment is encountered, a system error is generated.
AI4Process
GB
I have configured all the set up and Facebook chatbot is working as expected within Pega(messenger simulator as shown in the above discusion). But, when I am sending any message from Facebook messenger, the message is not received by my Pega server instance, i.e. from Facebook I am not able to communicate to my Pega server.
Please Note - I am using my Pega 8.4 personal edition and using ngrok to get public domain of my local server.
Can anyone please help to understand what is the wrong in the configuration?
Accenture
AU
Hi Lahiru,
That's great article !! Salute for the efforts you put on this documentation and extended help to community people.
I'm having issues with call back url when I tried to setup url as shown in attached doc. Please help to review and do needful. Thanks in advance !!
Pegasystems Inc.
US
Incredible post. Thank you so much for sharing, @LahiruS5!