Loading
Unified Messaging
Table des matières
Sélectionner des filtres

          Aucun résultat
          Aucun résultat
          Voici quelques conseils de recherche

          Vérifiez l'orthographe de vos mots-clés.
          Utilisez des termes de recherche plus généraux.
          Sélectionnez moins de filtres pour élargir votre recherche.

          Recherchez dans toute l’aide de Salesforce
          Agent or Bot Transfer Report Sample Queries

          Agent or Bot Transfer Report Sample Queries

          Use these sample queries to monitor WhatsApp engagement by tracking how many conversations were sent to agents or bots for resolution.

          Available in: Lightning Experience

          Available in:

          • Enterprise and Unlimited Editions for Service Cloud
          • Growth or Advanced Editions Marketing Cloud Next
          • Pro+, Corporate+, and Enterprise+ Editions for Marketing Cloud Engagement

          Number of Conversations That Required an Agent or Bot Transfer

          This query groups information by journey and activity details. Information returned includes a conversation count and applicable channels. You can filter using a specified time period.

          SELECT 
              ssot__WorkflowId__c,
              COUNT(*) AS COUNT
              
          FROM 
              ssot__MessageEngagement__dlm
              
          WHERE 
              ssot__EngagementChannelActionId__c = 'ROUTE' AND 
              ssot__EngagementNotesTxt__c IN ('SERVICE_CLOUD', 'DIGITAL_MARKETING') AND
              ssot__EngagementDateTm__c BETWEEN from_iso8601_timestamp('START_DATE') AND 
              from_iso8601_timestamp('END_DATE')
              
          GROUP BY 
              ssot__WorkflowId__c

          Number of Conversations That Required an Agent or Bot Transfer with Average Transfer Time

          This query groups information by journey and activity details. Information returned includes a conversation count, journey name, activity name, and applicable channels. You can filter using a specified time period.

          SELECT 
              e.ssot__SendTimePhoneNumber__c AS contact,
              e.ssot__EngagementDateTm__c AS transferred_event_time,
              MAX(p.ssot__EngagementDateTm__c) AS transfer_event_time,
              e.ssot__EngagementDateTm__c AS message_after_transfer_time,
              date_diff(
                         'second',
                         MAX(p.ssot__EngagementDateTm__c),
                         e.ssot__EngagementDateTm__c
                       ) AS time_difference_seconds,
              e.ssot__SenderCode__c AS senderCode
              
          FROM
              ssot__MessageEngagement__dlm p
              
          INNER JOIN ssot__MessageEngagement__dlm e ON 
              e.ssot__EngagementChannelActionId__c = 'ROUTE' AND 
              e.ssot__EngagementDateTm__c > p.ssot__EngagementDateTm__c AND 
              e.ssot__EngagementNotesTxt__c IN ('SERVICE_CLOUD', 'DIGITAL_MARKETING') AND 
              e.ssot__SendTimePhoneNumber__c = p.ssot__SendTimePhoneNumber__c AND 
              e.ssot__SenderCode__c = p.ssot__SenderCode__c
              
          GROUP BY 
              e.ssot__SendTimePhoneNumber__c,
              e.ssot__EngagementDateTm__c,
              e.ssot__SenderCode__c

          Number of Conversations That Required an Agent or Bot Transfer with Average Number of Messages Before Transfer

          This query groups information by journey and activity details. Information returned includes a conversation count, average number of messages before the transfer, journey name, and applicable channels. You can filter using a specified time period.

          SELECT 
              COUNT(*) AS numberOfMessagesSendBeforeTransfer,
              e.ssot__SendTimePhoneNumber__c,
              e.ssot__SenderCode__c
              
          FROM 
              ssot__MessageEngagement__dlm e
              
          LEFT JOIN ssot__MessageEngagement__dlm p ON 
              p.ssot__EngagementChannelActionId__c = e.ssot__EngagementChannelActionId__c AND 
              p.ssot__EngagementNotesTxt__c = 'MARKETING_CLOUD_ENGAGEMENT' AND 
              e.ssot__SendTimePhoneNumber__c = p.ssot__SendTimePhoneNumber__c AND 
              e.ssot__SenderCode__c = p.ssot__SenderCode__c AND 
              (
                p.ssot__EngagementChannelActionId__c = 'SEND_STATUS' OR 
                p.ssot__EngagementChannelActionId__c = 'INBOUND'
              )
              
          WHERE 
              e.ssot__EngagementNotesTxt__c IN ('SERVICE_CLOUD', 'DIGITAL_MARKETING') AND 
              e.ssot__EngagementChannelActionId__c = 'ROUTE'
          
          GROUP BY 
              e.ssot__SendTimePhoneNumber__c,
              e.ssot__SenderCode__c

          Percentage of Conversations That Transferred and Failed to Transfer

          This query groups information by error reason code. Information returned includes the transfer count, error count, error code, and the reason for failures. You can filter using the journey name and a specified time period.

          SELECT
              ssot__WorkflowId__c,
              (
                COUNT(
                  CASE 
                    WHEN ssot__MessageRecipientSendStatus__c is NOT NULL THEN 1
                  END
                ) / COUNT(*)
              ) * 100 AS percentageOfError
          
          FROM 
              ssot__MessageEngagement__dlm
              
          WHERE 
              ssot__EngagementChannelActionId__c = 'ROUTE' AND 
              ssot__EngagementNotesTxt__c IN ('SERVICE_CLOUD', 'DIGITAL_MARKETING') AND 
              ssot__EngagementDateTm__c BETWEEN from_iso8601_timestamp('START_DATE') AND 
              from_iso8601_timestamp('END_DATE')
              
          GROUP BY 
              ssot__WorkflowId__c

          Time Elapsed Between Transfer and First Bot or Agent Contact

          This query groups information by error reason code. You can return information at an individual level or aggregated by channel identifier. Information returned includes the transfer count, average wait time, number or channel, error code, and the reason for failures. You can filter using the journey name and a specified time period.

          SELECT 
              e.ssot__SendTimePhoneNumber__c AS contact,
              e.ssot__EngagementDateTm__c AS transfer_event_time,
              MIN(e.ssot__EngagementDateTm__c) AS message_after_transfer_time,
              date_diff(
                         'second', 
                         e.ssot__EngagementDateTm__c, 
                         MIN(p.ssot__EngagementDateTm__c)
                       ) AS time_difference_seconds,
              e.ssot__SenderCode__c AS senderCode
              
          FROM
              ssot__MessageEngagement__dlm p
          
          INNER JOIN 
              ssot__MessageEngagement__dlm e ON
              p.ssot__EngagementChannelActionId__c = 'ROUTE' AND
              e.ssot__EngagementDateTm__c = p.ssot__EngagementDateTm__c AND
              e.ssot__EngagementNotesTxt__c IN ('SERVICE_CLOUD', 'DIGITAL_MARKETING') AND
              e.ssot__SendTimePhoneNumber__c = p.ssot__SendTimePhoneNumber__c AND
              e.ssot__SenderCode__c = p.ssot__SenderCode__c
              
          WHERE 
              p.ssot__EngagementNotesTxt__c IN ('SERVICE_CLOUD', 'DIGITAL_MARKETING')
              
          GROUP BY 
              e.ssot__SendTimePhoneNumber__c, 
              e.ssot__EngagementDateTm__c, 
              e.ssot__SenderCode__c

          Time Spent in Transferred Conversations

          Information returned includes the transfer count, average time spent in the chat before case resolution in Service Cloud, and number or channel. You can filter using the journey name and a specified time period.

          SELECT
              e.ssot__sendtimephonenumber__c AS contact,
              e.ssot__engagementdatetm__c AS transfer_event_time,
              Min(e.ssot__engagementdatetm__c) AS message_after_transfer_time,
              date_diff(
                         'second',
                         Min(p.ssot__engagementdatetm__c), 
                         Max(p.ssot__engagementdatetm__c)
                       ) AS time_spend_agent,
              e.ssot__sendercode__c AS senderCode
              
          FROM 
              ssot__messageengagement__dlm p
              
          INNER JOIN ssot__messageengagement__dlm e ON 
              p.ssot__engagementchannelactionid__c = 'ROUTE' AND 
              e.ssot__engagementdatetm__c = p.ssot__engagementdatetm__c AND
              e.ssot__engagementnotestxt__c = 'ENGAGEMENT_SERVICE' AND
              e.ssot__sendtimephonenumber__c = p.ssot__sendtimephonenumber__c AND 
              e.ssot__sendercode__c = p.ssot__sendercode__c
              
          WHERE 
              p.ssot__engagementnotestxt__c IN ('SERVICE_CLOUD', 'DIGITAL_MARKETING')
              
          GROUP BY 
              e.ssot__sendtimephonenumber__c,
              e.ssot__engagementdatetm__c,
              e.ssot__sendercode__c
           
          Chargement
          Salesforce Help | Article