How to pass dynamic values to variables for cart item in cartjs in scripted REST API?

Annamdevula Di1
Kilo Contributor

Hi All,

How to pass dynamic values for variables in scripted REST API for creating cart item by using cartjs API. Can you please suggest  this.

find_real_file.png

12 REPLIES 12

You can close this thread by marking appropriate response as correct for others who may have a similar question in the future.


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

You can close this thread by marking appropriate response as correct for others who may have a similar question in the future.


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Anil Lande
Kilo Patron

Hi,

You need to parse reqBody and pass it to the variables attribute the way Rohila has suggested.

 

Thanks,

Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande