cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass memory variables in GET method when calling external API

0 Kudos

Hi Everyone,

Good Day!

I am trying to develop simple chatbot that calling an external Sales Orders API from S4 HANA system and able to display the values when calling the service without passing memory values " /sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder('2') ".

Now i have maintained the memory values in requirements section and trying to pass as sales order number which user enters in chat bot /sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder('"{{memory.number.raw}}"') but i am not getting any response from bot.

Can you please me to get through this step.

Thank you,

Regards,

Sudheer.

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

hi Jonas,

Thank you so much, Its working now.

As you suggested i have removed the condition " @asksalesorders" intent from the conditions tab and removed double quotations in theURL.

now i am able to get the order details for the user input.

Thank you very much.

Regards,

Sudheer.

JonasB
Contributor
0 Kudos

Hi,

the approach you suggested is in general correct. I think your issue is rather that the API service configuration action is not executed because the conditions are not fulfilled (otherwise there would be additional log entries). Can you please double check if the conditions in Actions tab are fulfilled, especially if @asksalesorders intent is present?

Also in your URL you have some additional quotation marks that are not required, but
/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder('{{memory.number.raw}}')
should be fine.

Regards
Jonas