tango-app-api-analysis-zone 3.4.0-alpha.4 → 3.4.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -520,11 +520,14 @@ export const zoneSegmentationV1Export = async ( req, res ) => {
|
|
|
520
520
|
};
|
|
521
521
|
export const zoneInteractionTable430Export = async ( req, res ) => {
|
|
522
522
|
try {
|
|
523
|
+
console.log( 'test' );
|
|
523
524
|
let reqestData = req.body;
|
|
524
525
|
let LamdaURL = 'https://rb5smmthklryitf6uo6fsuslle0nlqas.lambda-url.ap-south-1.on.aws/';
|
|
525
526
|
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
526
527
|
if ( resultData ) {
|
|
528
|
+
console.log( 'resultData1', resultData );
|
|
527
529
|
if ( resultData.status_code == '200' ) {
|
|
530
|
+
console.log( 'resultData', resultData );
|
|
528
531
|
if ( reqestData.export ) {
|
|
529
532
|
if ( resultData.data.length>0 ) {
|
|
530
533
|
const exportdata = [];
|
|
@@ -540,8 +543,8 @@ export const zoneInteractionTable430Export = async ( req, res ) => {
|
|
|
540
543
|
'Greetings Rate': ( ( element.greeting_count / element.footfall ) * 100 ).toFixed( 1 ) + '%' || '--',
|
|
541
544
|
'Customer Interacted': element.customer_attended || '--',
|
|
542
545
|
'Interation Rate ': element.interaction_rate +'%',
|
|
543
|
-
'Avg Time Taken to Assist a Customer': element.
|
|
544
|
-
'Avg Time Spent with Customer': element.
|
|
546
|
+
'Avg Time Taken to Assist a Customer': element.avg_interaction_time_string ?? '--',
|
|
547
|
+
'Avg Time Spent with Customer': element.assist_time_string ?? '--',
|
|
545
548
|
'Billing Conversion': element.footfall_overamin_inzone ?? '--',
|
|
546
549
|
'Billing Conversion Rate': element.billing_conversion_rate +'%',
|
|
547
550
|
} );
|
|
@@ -559,6 +562,7 @@ export const zoneInteractionTable430Export = async ( req, res ) => {
|
|
|
559
562
|
return res.sendError( 'No Content', 204 );
|
|
560
563
|
}
|
|
561
564
|
} catch ( error ) {
|
|
565
|
+
console.log( 'error', error );
|
|
562
566
|
logger.error( { error: error, message: req.query, function: 'zoneInteractionTable430Export' } );
|
|
563
567
|
return res.sendError( { error: error }, 500 );
|
|
564
568
|
}
|
|
@@ -780,8 +784,8 @@ export const ZonewiseCustomerFunnelExport = async ( req, res ) => {
|
|
|
780
784
|
'Greetings Rate': ( element.greeting_count && element.footfall ) ? ( ( element.greeting_count / element.footfall ) * 100 ).toFixed( 1 ) + '%': '--',
|
|
781
785
|
'Customer Interacted': element.customer_attended ?? '--',
|
|
782
786
|
'Interation Rate ': element.interaction_rate != null ? element.interaction_rate + '%' : '--',
|
|
783
|
-
'Avg Time Taken to Assist a Customer': element.
|
|
784
|
-
'Avg Time Spent with Customer': element.
|
|
787
|
+
'Avg Time Taken to Assist a Customer': element.avg_interaction_time_string ?? '--',
|
|
788
|
+
'Avg Time Spent with Customer': element.assist_time_string ?? '--',
|
|
785
789
|
};
|
|
786
790
|
if ( element.footfall_overamin_inzone != null ) {
|
|
787
791
|
row['Billing Conversion'] = element.footfall_overamin_inzone;
|