Regarding cookies in cloud platform

Dear All,

We need to know about how to read cookies in cloud platform. We need to read the cookies inside BOT and send it in one API (The cookies we need to pass in API in case its mandatory to pass it as parameter). Appreciate a quick help on this.

Thank you.

1 Like

Which API are you using? Whats the usecase here?

Dear @Subhrajit_Gupta ,

before agent ending the chat with customer, agent should fill the tags for which purpose, customer has interacted with him. post chat close, we need to get the tags details basis cookies for which we are using below API curl. Asides, please find the screenshot of tags example. Appreciate if you would be able to help us in reading cookies.

curl ‘https://cloud.yellow.ai/api/agents/tickets/ticket/100068?bot=x1656476412234
-H ‘authority: cloud.yellow.ai’
-H ‘accept: application/json’
-H ‘accept-language: en-GB,en-US;q=0.9,en;q=0.8’
-H ‘baggage: sentry-release=069a4daa0c7,sentry-public_key=74334399bfa04e8f8ba01219d5956946,sentry-trace_id=5b8660f587c147ecb148738394583d55,sentry-sample_rate=0.1’
-H ‘cookie: _gcl_au=1.1.443510504.1671166582; ajs_user_id=%22inbox%40yellow.ai%22; ajs_anonymous_id=%223871d84a-6179-4237-87bd-f2905902696b%22; _gid=GA1.2.418708064.1671166582; _hjFirstSeen=1; _hjIncludedInSessionSample=1; _hjSession_2486628=eyJpZCI6IjQ1NjU1MTdlLWZmZjktNDYzNC05NDIyLTMxYWNlZDJkNGEzNiIsImNyZWF0ZWQiOjE2NzExNjY1ODI2OTcsImluU2FtcGxlIjp0cnVlfQ==; _hjIncludedInPageviewSample=1; _hjAbsoluteSessionInProgress=1; G_ENABLED_IDPS=google; G_AUTHUSER_H=0; ym_xid=b636ef9ef90637abb94cd2d446cf8fd4327374a101477bb4ad2271826135cde9hntJwApCQYdZE8skEiurm; _hjCachedUserAttributes=eyJhdHRyaWJ1dGVzIjp7ImVtYWlsIjoiaW5ib3hAeWVsbG93LmFpIiwibmFtZSI6IkluYm94IHRlYW0iLCJzdWJzY3JpcHRpb24iOnsiaWQiOjMwMjEsIm93bmVyX2lkIjo3ODYzOCwicGxhbiI6eyJwbGFuIjp7InRpZXIiOiJUMyJ9fX19LCJ1c2VySWQiOiJpbmJveEB5ZWxsb3cuYWkifQ==; _hjUserAttributesHash=f7880cbeb15754ed4dc765d22f5784bb; _hjSessionUser_2486628=eyJpZCI6ImRlZDI3ZDgxLWE5MDQtNWJiZS1iMmYyLThiMDA1NGQzYWI5NCIsImNyZWF0ZWQiOjE2NzExNjY1ODI2OTAsImV4aXN0aW5nIjp0cnVlfQ==; _ga=GA1.1.128180496.1671166582; _ga_Q1KNN61M40=GS1.1.1671166582.1.1.1671168144.0.0.0’
-H ‘if-none-match: W/“5a5-ChwAcRovPw3J2vWtuZfVPYH+Zcs”’
-H ‘newrelic: eyJ2IjpbMCwxXSwiZCI6eyJ0eSI6IkJyb3dzZXIiLCJhYyI6IjI1NDYzMTUiLCJhcCI6IjEzODU5MzMzNTEiLCJpZCI6ImRhMmM5YWQxMDA0YTkwMzIiLCJ0ciI6IjkzNDZlMTNkNjI0MTk2NjhlNzIyZDNjZjU3NjhmNzIwIiwidGkiOjE2NzExNjgxNDY0OTF9fQ==’
-H ‘sec-ch-ua: “Not?A_Brand”;v=“8”, “Chromium”;v=“108”, “Google Chrome”;v=“108”’
-H ‘sec-ch-ua-mobile: ?0’
-H ‘sec-ch-ua-platform: “macOS”’
-H ‘sec-fetch-dest: empty’
-H ‘sec-fetch-mode: cors’
-H ‘sec-fetch-site: same-origin’
-H ‘sentry-trace: 5b8660f587c147ecb148738394583d55-9c8032babb3a1a6c-0’
-H ‘traceparent: 00-9346e13d62419668e722d3cf5768f720-da2c9ad1004a9032-01’
-H ‘tracestate: 2546315@nr=0-1-2546315-1385933351-da2c9ad1004a9032----1671168146491’
-H ‘user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36’
–compressed

@javed.sayyad

You can use the feature of Custom Fields. Reference doc
You can make these fields mandatory when your agents fill in data.

On ticket close, using the ticket-closed event, you can fetch all the details from the event itself and pass this data into the API request you want to make inside the bot flow itself.

This does not require the use of cache data

@gautham i can understand that there’re some alternatives but what if cookies only we have to use and its mandatory.