cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass Date values based on condition in SAP CAI

0 Kudos

HI,

I am able to capture the #DateTime/#interval entity value into memory's. Now i want to pass those values in the payload based on conditions using post method.

ex: if user enter the single day 2021-03-01(memory will store and pass to the payload) else pass to the date range(from 2021-03-01 to 2021-03-02).

Thanks

Rajesh

Accepted Solutions (0)

Answers (2)

Answers (2)

roy_pappachan2
Participant
former_member523146
Participant

To give some more context around the link: the DATETIME vs INTERVAL entities requirement section should be helpful for the task at hand. Make sure the bot accepts both types and then you can check which one is available in the memory and adapt your outgoing call.

Dan_Wroblewski
Developer Advocate
Developer Advocate

You can set memory and use scripting to check the values of the entity and then store what you want to include in your API call. Do this just before your API call and then take the value from memory and put in your URL (or body)

Is that what you needed?