@@ -421,6 +421,64 @@ def engagement(self,
421
421
json = payload ,
422
422
headers = headers )
423
423
424
+ def greetings_conversion (self ,
425
+ distribution : str = 'day' ,
426
+ timezone : str = None ,
427
+ filters : dict = None ,
428
+ payload : dict = None ,
429
+ headers : dict = None ) -> httpx .Response :
430
+ ''' Shows the number of greetings sent to the customers and how many of those resulted in a chat or a goal.
431
+
432
+ Args:
433
+ distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
434
+ timezone (str): IANA Time Zone (e.g. America/Phoenix).
435
+ Defaults to the requester's timezone.
436
+ When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
437
+ filters (dict): If none provided, your report will span the last seven days.
438
+ payload (dict): Custom payload to be used as request's data.
439
+ It overrides all other parameters provided for the method.
440
+ headers (dict): Custom headers to be used with session headers.
441
+ They will be merged with session-level values that are set,
442
+ however, these method-level parameters will not be persisted across requests.
443
+
444
+ Returns:
445
+ httpx.Response: The Response object from `httpx` library,
446
+ which contains a server’s response to an HTTP request.
447
+ '''
448
+ if payload is None :
449
+ payload = prepare_payload (locals ())
450
+ return self .session .post (f'{ self .api_url } /chats/greetings_conversion' ,
451
+ json = payload ,
452
+ headers = headers )
453
+
454
+ def surveys (self ,
455
+ timezone : str = None ,
456
+ filters : dict = None ,
457
+ payload : dict = None ,
458
+ headers : dict = None ) -> httpx .Response :
459
+ ''' Returns the number of submitted chat surveys along with the count of specific answers.
460
+
461
+ Args:
462
+ timezone (str): IANA Time Zone (e.g. America/Phoenix).
463
+ Defaults to the requester's timezone.
464
+ When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
465
+ filters (dict): If none provided, your report will span the last seven days.
466
+ payload (dict): Custom payload to be used as request's data.
467
+ It overrides all other parameters provided for the method.
468
+ headers (dict): Custom headers to be used with session headers.
469
+ They will be merged with session-level values that are set,
470
+ however, these method-level parameters will not be persisted across requests.
471
+
472
+ Returns:
473
+ httpx.Response: The Response object from `httpx` library,
474
+ which contains a server’s response to an HTTP request.
475
+ '''
476
+ if payload is None :
477
+ payload = prepare_payload (locals ())
478
+ return self .session .post (f'{ self .api_url } /chats/surveys' ,
479
+ json = payload ,
480
+ headers = headers )
481
+
424
482
# Agents
425
483
426
484
def availability (self ,
@@ -452,3 +510,63 @@ def availability(self,
452
510
return self .session .post (f'{ self .api_url } /agents/availability' ,
453
511
json = payload ,
454
512
headers = headers )
513
+
514
+ def response_time (self ,
515
+ distribution : str = 'day' ,
516
+ timezone : str = None ,
517
+ filters : dict = None ,
518
+ payload : dict = None ,
519
+ headers : dict = None ) -> httpx .Response :
520
+ ''' Shows the average agents' response time within a licence.
521
+
522
+ Args:
523
+ distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
524
+ timezone (str): IANA Time Zone (e.g. America/Phoenix).
525
+ Defaults to the requester's timezone.
526
+ When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
527
+ filters (dict): If none provided, your report will span the last seven days.
528
+ payload (dict): Custom payload to be used as request's data.
529
+ It overrides all other parameters provided for the method.
530
+ headers (dict): Custom headers to be used with session headers.
531
+ They will be merged with session-level values that are set,
532
+ however, these method-level parameters will not be persisted across requests.
533
+
534
+ Returns:
535
+ httpx.Response: The Response object from `httpx` library,
536
+ which contains a server’s response to an HTTP request.
537
+ '''
538
+ if payload is None :
539
+ payload = prepare_payload (locals ())
540
+ return self .session .post (f'{ self .api_url } /agents/response_time' ,
541
+ json = payload ,
542
+ headers = headers )
543
+
544
+ def first_response_time (self ,
545
+ distribution : str = 'day' ,
546
+ timezone : str = None ,
547
+ filters : dict = None ,
548
+ payload : dict = None ,
549
+ headers : dict = None ) -> httpx .Response :
550
+ ''' Shows the average agents' first response time within a licence.
551
+
552
+ Args:
553
+ distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
554
+ timezone (str): IANA Time Zone (e.g. America/Phoenix).
555
+ Defaults to the requester's timezone.
556
+ When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
557
+ filters (dict): If none provided, your report will span the last seven days.
558
+ payload (dict): Custom payload to be used as request's data.
559
+ It overrides all other parameters provided for the method.
560
+ headers (dict): Custom headers to be used with session headers.
561
+ They will be merged with session-level values that are set,
562
+ however, these method-level parameters will not be persisted across requests.
563
+
564
+ Returns:
565
+ httpx.Response: The Response object from `httpx` library,
566
+ which contains a server’s response to an HTTP request.
567
+ '''
568
+ if payload is None :
569
+ payload = prepare_payload (locals ())
570
+ return self .session .post (f'{ self .api_url } /agents/first_response_time' ,
571
+ json = payload ,
572
+ headers = headers )
0 commit comments