cancel
Showing results for 
Search instead for 
Did you mean: 

Getting back {{api_service_response}} from Odata

k_varshney74
Explorer
397

Hi All,

In my Chat Bot API Service Configuration i'm doing the following statement but it is returning as it is.

{{api_service_response.default.body}}

Above api service has large number of records. When i run the sap api service is fetch entity , it is giving result but after a long time because it has large number of records

Kindly help. Thanks in advance

View Entire Topic
Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

No matter what, my understanding is that there is 15-second timeout for API calls in the chatbot flow. In general, chatbots are not designed to bring back large amounts of data and process it on the front-end.

Why your chatbot is displaying the actual script instead of its value (empty). I couldn't say. I could not reproduce with a service that times out. Maybe share where you code the text message. (Try to take higher resolution screenshots)

k_varshney74
Explorer
0 Kudos

Hello Daniel,

Thanks for your quick response, I have tried to display the value also like

{{#eachJoin api_service_response.default.body.d.results}}
{{mvgr1}}
{{/eachJoin}}

but result is same

below is the json view of above chat

{
"nlp": {
"uuid": "31d3509b-514f-4cdb-4d0c-90d2672e41f4_1ed1fafb-75a0-402b-9b0c-6f289463d818",
"source": "test1",
"intents": [
{
"slug": "test1",
"confidence": 0.99,
"description": null
}
],
"entities": {},
"act": null,
"sentiment": "neutral",
"language": "de",
"processing_language": "en",
"version": "2202.1.0",
"timestamp": "2022-12-28T07:40:00.228359+00:00",
"status": 200,
"type": null,
"logs": []
},
"messages": [
{
"type": "text",
"content": "{{#eachJoin api_service_response.default.body.d.results}}\n{{mvgr1}}\n{{/eachJoin}}",
"markdown": false,
"delay": null,
"language": "en"
}
],
"conversation": {
"id": "test-1672213195311",
"language": "en",
"timezone": null,
"memory": {},
"initial_context": null,
"skill": "test_kratika",
"skill_occurences": 1,
"skill_id": "69f362f8-9382-4984-a40e-13bec363cc08",
"client_info": {
"channel_type": "web_client"
}
},
"logs": {
"input": "test1",
"logs": [
{
"level": "info",
"code": "I_SKILL_TRIGGERED",
"data": {
"message": "Skill test_kratika has been triggered",
"reason": "TRIGGERS_OK",
"skill_id": "69f362f8-9382-4984-a40e-13bec363cc08"
},
"timestamp": "2022-12-28T07:40:00.448Z"
},
{
"level": "info",
"code": "I_REQUIREMENTS_OK",
"data": {
"skill_id": "69f362f8-9382-4984-a40e-13bec363cc08",
"message": "Requirements of skill test_kratika validated, executing actions"
},
"timestamp": "2022-12-28T07:40:00.487Z"
},
{
"level": "info",
"code": "I_EXECUTE_ACTION",
"data": {
"type": "service-api",
"value": {
"type": "message",
"value": "Length :20121908"
}
},
"timestamp": "2022-12-28T07:40:07.252Z"
}
]
},
"qna": null,
"fallback": null,
"hasDelay": true,
"hasNextMessage": false
}
Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

Can you show the debug panel and show the details of any errors/warnings?

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

And also show the definition of your message?

k_varshney74
Explorer
0 Kudos

Debug Panel-

Definition of message-

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

Seems like some bug ... I'm not sure how I would even print out the scripting syntax even if I wanted to (without some invisible character).

The only thing curious in your debug panel is that it does not show "Send a message" action, which would have to be there whenever the bot displays something, so that's why it suggests some funny business behind the scene (or you're not showing the test_katika action).

Sorry I could not reproduce.

k_varshney74
Explorer
0 Kudos

Hello Daniel,

I have shown the test_kratika section only. I am also surprised why it is not working. When I consume another api service here it is working fine. I am thinking that may be because of large number of records in that service, it is not working.

Thanks