File tree Expand file tree Collapse file tree
organization-[organization]/settings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,8 +105,6 @@ function createFeedbackStore() {
105105 return feedback ;
106106 } ) ;
107107 } ,
108- // TODO: update growth server to accept `billingPlan`.
109- // TODO: update growth server to accept `source` key to know the feedback source area.
110108 submitFeedback : async (
111109 subject : string ,
112110 message : string ,
@@ -122,18 +120,6 @@ function createFeedbackStore() {
122120 if ( ! VARS . GROWTH_ENDPOINT ) return ;
123121 trackEvent ( Submit . FeedbackSubmit ) ;
124122
125- const customFields : Array < { id : string ; value : string | number } > = [
126- { id : '47364' , value : currentPage }
127- ] ;
128-
129- if ( value ) {
130- customFields . push ( { id : '40655' , value } ) ;
131- }
132-
133- if ( billingPlan ) {
134- customFields . push ( { id : '56109' , value : billingPlan } ) ;
135- }
136-
137123 const response = await fetch ( `${ VARS . GROWTH_ENDPOINT } /feedback` , {
138124 method : 'POST' ,
139125 headers : {
@@ -143,9 +129,11 @@ function createFeedbackStore() {
143129 subject,
144130 message,
145131 email,
146- customFields,
147132 firstname : ( name || 'Unknown' ) . slice ( 0 , 40 ) ,
148133 metaFields : {
134+ currentPage,
135+ npsScore : value ,
136+ billingPlan,
149137 source : get ( feedback ) . source ,
150138 orgId,
151139 projectId,
Original file line number Diff line number Diff line change 6767 firstName: ($user ?.name ?? ' ' ).slice (0 , 40 ),
6868 message: ` BAA request for ${$organization ?.name ?? ' ' } (${$organization ?.$id ?? ' ' }) ` ,
6969 tags: [' cloud' ],
70- customFields: [
71- { id: ' 41612' , value: ' BAA' },
72- { id: ' 48493' , value: $user ?.name ?? ' ' },
73- { id: ' 48492' , value: $organization ?.$id ?? ' ' },
74- { id: ' 48490' , value: $user ?.$id ?? ' ' }
75- ],
7670 metaFields: {
71+ category: ' BAA' ,
72+ userName: $user ?.name ?? ' ' ,
73+ orgId: $organization ?.$id ?? ' ' ,
74+ userId: $user ?.$id ?? ' ' ,
7775 employees: employees ,
7876 country: country ,
7977 role: role ,
Original file line number Diff line number Diff line change 6868 firstName: ($user ?.name ?? ' ' ).slice (0 , 40 ),
6969 message: ` SOC-2 request for ${$organization ?.name ?? ' ' } (${$organization ?.$id ?? ' ' }) ` ,
7070 tags: [' cloud' ],
71- customFields: [
72- { id: ' 41612' , value: ' SOC-2' },
73- { id: ' 48493' , value: $user ?.name ?? ' ' },
74- { id: ' 48492' , value: $organization ?.$id ?? ' ' },
75- { id: ' 48490' , value: $user ?.$id ?? ' ' }
76- ],
7771 metaFields: {
72+ category: ' SOC-2' ,
73+ userName: $user ?.name ?? ' ' ,
74+ orgId: $organization ?.$id ?? ' ' ,
75+ userId: $user ?.$id ?? ' ' ,
7876 employees: employees ,
7977 country: country ,
8078 role: role ,
Original file line number Diff line number Diff line change 136136 formData .append (' message' , $supportData .message );
137137 formData .append (' tags[]' , categoryTopicTag );
138138 formData .append (
139- ' customFields ' ,
140- JSON .stringify ([
141- { id: ' 41612 ' , value: $supportData .category } ,
142- { id: ' 48492 ' , value: $organization ?.$id ?? ' ' } ,
143- { id: ' 48491 ' , value: $supportData ?.project ?? ' ' } ,
144- { id: ' 56023 ' , value: $supportData ?.severity ?? ' ' } ,
145- { id: ' 56024 ' , value: $organization ?.billingPlanId ?? ' ' }
146- ] )
139+ ' metaFields ' ,
140+ JSON .stringify ({
141+ category: $supportData .category ,
142+ orgId: $organization ?.$id ?? ' ' ,
143+ projectId: $supportData ?.project ?? ' ' ,
144+ severity: $supportData ?.severity ?? ' ' ,
145+ billingPlan: $organization ?.billingPlanId ?? ' '
146+ } )
147147 );
148148 if (files && files .length > 0 ) {
149149 formData .append (' attachment' , files [0 ]);
You can’t perform that action at this time.
0 commit comments