Get Post Chat Survey Context fails after end chat
xTEddie opened this issue · comments
xTEddie commented
Reproducing Steps:
- Initiates chat
- Agent accepts invite
- Customer ends chat
- Getting Post Chat Survey Context fails
xTEddie commented
Root cause is on calling chatSDK.endChat()
, the requestId
is generated with a new uuidv4
. Calling chatSDK.getPostChatSurveyContext()
would use the new requestId
which is not valid.
Temporary solution would be to call chatSDK.getPostChatSurveyContext()
before chatSDK.endChat()
is called.
...
const postChatSurveyContext = chatSDK.getPostChatSurveyContext();
await chatSDK.endChat();
// Display Post Chat Survey