@@ -79,6 +79,7 @@ function SearchPage({route}: SearchPageProps) {
7979 const [ newParentReport ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT } ${ newReport ?. parentReportID } ` , { canBeMissing : true } ) ;
8080 const [ activePolicyID ] = useOnyx ( ONYXKEYS . NVP_ACTIVE_POLICY_ID , { canBeMissing : false } ) ;
8181 const [ activePolicy ] = useOnyx ( `${ ONYXKEYS . COLLECTION . POLICY } ${ activePolicyID } ` , { canBeMissing : true } ) ;
82+ const [ integrationsExportTemplates ] = useOnyx ( ONYXKEYS . NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES , { canBeMissing : false } ) ;
8283
8384 const [ isOfflineModalVisible , setIsOfflineModalVisible ] = useState ( false ) ;
8485 const [ isDownloadErrorModalVisible , setIsDownloadErrorModalVisible ] = useState ( false ) ;
@@ -198,6 +199,20 @@ function SearchPage({route}: SearchPageProps) {
198199 } ) ;
199200 }
200201
202+ // If the user has any custom integration export templates, add them as export options
203+ if ( integrationsExportTemplates && integrationsExportTemplates . length > 0 ) {
204+ for ( const template of integrationsExportTemplates ) {
205+ exportOptions . push ( {
206+ text : template . name ,
207+ icon : Expensicons . Table ,
208+ onSelected : ( ) => {
209+ // Custom IS templates are not policy specific, so we don't need to pass a policyID
210+ beginExportWithTemplate ( template . name , CONST . EXPORT_TEMPLATE_TYPES . INTEGRATIONS , undefined ) ;
211+ } ,
212+ } ) ;
213+ }
214+ }
215+
201216 return exportOptions ;
202217 } ;
203218
@@ -433,6 +448,7 @@ function SearchPage({route}: SearchPageProps) {
433448 styles . fontWeightNormal ,
434449 styles . textWrap ,
435450 beginExportWithTemplate ,
451+ integrationsExportTemplates ,
436452 ] ) ;
437453
438454 const handleDeleteExpenses = ( ) => {
0 commit comments