cancel
Showing results for 
Search instead for 
Did you mean: 

How to add multiple values in single memory variable in SAP CAI chatbot

0 Kudos

Hi Team,

I am new in SAP CHAI chatbot. I am working on use case where I need to perform API call which will trigger action in my application. I configured the API call as well as the requirement to trigger the call.

As you can see in body highlighted field can have multiple values.

So here is my question how can I pass one or more than one values in gstins fields so it can trigger action for all the gstin values. Please find the below nlp response

{ "nlp": { "uuid": "183ea442-65f1-4a8b-7759-ba9eeea201b0", "source": "33GSPTN0741G1ZF and 33GSPTN0742G1ZE", "intents": [ { "slug": "greeting", "confidence": 0.66, "description": null } ], "entities": { "gstins": [ { "confidence": 0.99, "raw": "33GSPTN0741G1ZF", "groups": {}, "value": "33gsptn0741g1zf" }, { "confidence": 0.99, "raw": "33GSPTN0742G1ZE", "groups": {}, "value": "33gsptn0742g1ze" } ] }, "act": null, "sentiment": "neutral", "language": "en", "processing_language": "en", "version": "2105.0.0", "timestamp": "2021-07-07T08:56:53.590766+00:00", "status": 200, "type": null, "logs": [] }, "messages": [ { "type": "text", "content": "Could you please provide the Financial Year details", "markdown": false, "delay": null } ], "conversation": { "id": "test-1625647920762", "language": "en", "memory": { "gstins": { "raw": "33GSPTN0741G1ZF", "value": "33GSPTN0741G1ZF" }, "invtype": { "raw": "B2B", "value": "B2B" } }, "skill": "recon", "skill_occurences": 2, "skill_id": "6dfa1853-f714-4400-8649-a32bafa6484c" }, "logs": { "input": "33GSPTN0741G1ZF and 33GSPTN0742G1ZE", "logs": [ { "level": "info", "code": "I_SKILL_TRIGGERED", "data": { "message": "Skill recon has been triggered", "reason": "CURRENT_SKILL_TASK_FUFILLED", "skill_id": "6dfa1853-f714-4400-8649-a32bafa6484c" }, "timestamp": "2021-07-07T08:56:53.730Z" }, { "level": "info", "code": "I_REQUIREMENT_FULFILLED", "data": { "requirement_id": "717c7c35-8dc3-442a-a2f1-abb1ad67894d", "requirement_name": "gstins", "value": { "confidence": 0.99, "raw": "33GSPTN0741G1ZF", "groups": {}, "value": "33gsptn0741g1zf" }, "message": "Requirement gstins has been fulfilled with {\"confidence\":0.99,\"raw\":\"33GSPTN0741G1ZF\",\"groups\":{},\"value\":\"33gsptn0741g1zf\"}" }, "timestamp": "2021-07-07T08:56:54.051Z" }, { "level": "info", "code": "I_EXECUTE_ACTION", "data": { "type": "edit_memory", "value": null }, "timestamp": "2021-07-07T08:56:54.095Z" }, { "level": "info", "code": "I_EXECUTE_ACTION", "data": { "type": "message", "value": { "type": "text", "content": "Could you please provide the Financial Year details", "markdown": false, "delay": null } }, "timestamp": "2021-07-07T08:56:54.095Z" } ] }, "qna": null, "fallback": null, "hasDelay": true, "hasNextMessage": false }

You can see in "entities": "gstins" is having two values but while coming to memory it's storing only first value.

View Entire Topic
0 Kudos

Hi Daniel and Jonas,

Thank you for quick response. I tried the solution which is provided by you. It's working now.