Skip to content

Commit

Permalink
Send ai_user, ai_session cookie values to Freshdesk with createTicket
Browse files Browse the repository at this point in the history
  • Loading branch information
mnigh committed Dec 27, 2024
1 parent 3d12c41 commit 1b24ffe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/app/Http/Controllers/SupportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ public function createTicket(Request $request)
if ($request->input('user_agent')) {
$parameters['custom_fields']['cf_user_agent'] = (string) $request->input('user_agent');
}
if ($request->cookie('ai_user')) {
$parameters['custom_fields']['cf_application_insights_user_id'] = (string) $request->cookie('ai_user');
}
if ($request->cookie('ai_session')) {
$parameters['custom_fields']['cf_application_insights_session_id'] = (string) $request->cookie('ai_session');
}
if ($request->input('user_id')) {
$parameters['unique_external_id'] = (string) $request->input('user_id');
}
Expand Down

0 comments on commit 1b24ffe

Please sign in to comment.