# FAQ
The FAQ module contains a single FAQ, FAQ section and all FAQ categories, and supports different ways to jump to robot and human services through configuration.
# API
# ShowAllFAQSections()
You can call this function to display the FAQ section list, you can search a specific FAQ, and show the entrance of AIHelp conversation system in the appropriate location:
AIHelpSupport.ShowAllFAQSections();
Or, you could customize the FAQ module as you need:
ConversationConfig faqConversationConfig = ConversationConfig.Builder()
.SetConversationIntent(ConversationIntent.BOT_SUPPORT)
.SetAlwaysShowHumanSupportButtonInBotPage(true)
.SetWelcomeMessage("This is a welcome message for FAQ.")
.build();
FaqConfig config = FaqConfig.Builder()
.SetShowConversationMoment(ShowConversationMoment.ALWAYS)
.SetConversationConfig(faqConversationConfig)
.build();
AIHelpSupport.ShowAllFAQSections(config);
# ShowFAQSection()
Different from displaying all FAQ sections, AIHelp supports displaying a FAQ section separately in some special scenarios:
AIHelpSupport.ShowFAQSection("SECTION ID")
Or, you could customize the API as you need:
ConversationConfig faqConversationConfig = ConversationConfig.Builder()
.SetConversationIntent(ConversationIntent.BOT_SUPPORT)
.SetAlwaysShowHumanSupportButtonInBotPage(true)
.SetWelcomeMessage("This is a welcome message for FAQ.")
.build();
FaqConfig config = FaqConfig.Builder()
.SetShowConversationMoment(ShowConversationMoment.ONLY_IN_ANSWER_PAGE)
.SetConversationConfig(faqConversationConfig)
.build();
AIHelpSupport.ShowFAQSection("SECTION ID", config);
# ShowSingleFAQ()
You can show a specific FAQ question by calling this method:
AIHelpSupport.ShowSingleFAQ("FAQ ID")
Or, you could customize the API as you need:
ConversationConfig faqConversationConfig = ConversationConfig.Builder()
.SetConversationIntent(ConversationIntent.BOT_SUPPORT)
.SetAlwaysShowHumanSupportButtonInBotPage(true)
.SetWelcomeMessage("This is a welcome message for FAQ.")
.build();
FaqConfig config = FaqConfig.Builder()
.SetShowConversationMoment(ShowConversationMoment.AFTER_MARKING_UNHELPFUL)
.SetConversationConfig(faqConversationConfig)
.build();
AIHelpSupport.ShowSingleFAQ("FAQ ID", config);
# Definition
# faqConfig
- Type:
FaqConfig
- Default:
null
- Details: Configuration for FAQ module
# conversationConfig
- Type:
ConversationConfig
- Default:
null
- Details: Configuration for customer service comes from FAQ module
# showConversationMoment
- Type:
ShowConversationMoment
- Default:
showConversationMoment.NEVER
- Details: when to show conversation entrance in FAQ page, always / never / after-marking-unhelpful / only-in-answer-page
# conversationIntent
- Type:
ConversationIntent
- Default:
ConversationIntent.BOT
- Details: Intent for customer service display
# alwaysShowHumanSupportButtonInBotPage
- Type:
boolean
- Default:
false
- Details: Entrance visibility for human support button in bot page
# welcomeMessage
- Type:
string
- Default:
''
- Details: Custom welcome message for human support
# storyNode
- Type:
string
- Default:
''
- Details: Entrance node for specific story line, a.k.a: story lines' user say
# sectionId
- Type:
string
- Default:
''
- Details: The ID of the FAQ section about to display, you can get it at here:
# faqId
- Type:
string
- Default:
''
- Details: The ID of the specific FAQ about to display, you can get it at here:
# Scenario
Let's assume a scenario.
A season is finally over. You configure a series of Season award related issues in the AIHelp dashboard, and then show them on the first screen of the game by FAQ, hoping to solve the problems that users may have.
At the same time, the game has different support and care schemes for different levels of users.
The details are as follows:
1、Users with level < 20 can only see the conversation entrance button after marking the FAQ unhelpful;
2、Users with level 20 < level < 50 can always see the conversation entrance button in the upper right corner of the FAQ page. After clicking this button, users can contact robot customer service by default. At the same time, the access to contact manual customer service is provided in the upper right corner of the robot page;
3、Users with level > 50 can always see the contact customer service button on the FAQ page. After clicking, they can directly contact manual customer service and display a special welcome message different from other users.
Then, the code example for this scenario is as follows:
public void showAllFAQSections(int level) {
FaqConfig.Builder faqBuilder = new FaqConfig.Builder();
ConversationConfig.Builder conversationBuilder = new ConversationConfig.Builder();
if (level < 20) {
faqBuilder.SetShowConversationMoment(ShowConversationMoment.AFTER_MARKING_UNHELPFUL);
} else if (level < 50) {
faqBuilder.SetShowConversationMoment(ShowConversationMoment.ALWAYS);
conversationBuilder.SetAlwaysShowHumanSupportButtonInBotPage(true);
faqBuilder.SetConversationConfig(conversationBuilder.build());
} else {
faqBuilder.SetShowConversationMoment(ShowConversationMoment.ALWAYS);
conversationBuilder.SetConversationIntent(ConversationIntent.HUMAN_SUPPORT);
conversationBuilder.SetWelcomeMessage("THIS IS YOUR SPECIAL WELCOME MESSAGE");
faqBuilder.SetConversationConfig(conversationBuilder.build());
}
AIHelpSupport.ShowAllFAQSections(faqBuilder.build());
}
# Page Example
Page examples based on the above scenario are as follows:
![](https://cdnimage.aihelp.net/FileService/UserFile/202307/2023072709363789330e6e7f54c.png)
![](https://cdnimage.aihelp.net/FileService/UserFile/202307/202307270938000262c5e95fe58.png)
![](https://cdnimage.aihelp.net/FileService/UserFile/202307/2023073110331698054b1bab44e.png)