Topic by Ramy NATOUR
Content
Hello everyone,
I'm currently implementing a controller which will use the smartAssistant and return its suggestions to a third party program.
As I followed the tutorial in the documentation, the script had a strange behaviors :
- The KnowledgeAPI is enabled (returns true) : CHECKED
- I call the StartInteraction function and get a 162 lengthed string : CHECKED
- I call GetSmartAssistantSearch function with a title and content which return results with the widget.It returns a ContentListResponse with status as NULL and summaryContents as NULL : FAIL
- The behaviour is the same with GetPopularContent and SearchContent : FAIL
As I'm trying to find a solution to this problem, here are my questions :
- Is the $userIdentifier parameter of the function StartInteraction the LookupName of the agent/admin which has the rights (Profile permissions) to use the Knowledge Foundation API ? If not, what are we supposed to put as this parameter ?
- Is there a way to check whether the $sessionToken is valid ? Like a checksum or something ? StartInteraction returning a token means that it suceed, right ?
- Why am I getting an empty contentListResponse object ? Why is the status field set as "NULL" ? How can I debug this without any error_code/status which would give clues ?
- Am I missing some configuration/prefix steps which are not specified in the tutorial ?
Other Data:
- A dump of the function error_get_last() shows that there is an error in a core file(which are read-only) :
"Undefined index: REDIRECT_URL [file] => /cgi-bin/<interface_name>.cfg/scripts/cp/core/framework/3.2.4/init.php"
- Added a try catch block, no exceptions are caught
- All functions (searchContent, GetPopularContent, GetSmartAssistant Suggestions, etc...) return an empty ContentListResponse.
ContentListResponse var_dump:
object(RightNow\Connect\Knowledge\v1\ContentListResponse)#9 (2) { ["Status"]=> NULL ["SummaryContents"]=> NULL }
==
Thanks in advance,