Observability Logging
Log Types and Structure
CCP Initialization Logs
- Tracks CCP initialization events with fields including eventType, sessionId, attempts, duration, and error details
- Records various event types: CCPInitStart, CCPInitSuccess, CCPInitFailure, and CCPInitRetry
Agent Activity Logs
- Monitors agent activities with fields for state changes, work items, contact details, and general messages
- Captures state transitions, login/logout events, and work item-related activities
S3 Storage Organization
The logs follow a hierarchical structure in S3 with the following format:
orgId-{ORG_ID}/contactCenterId-{CC_ID}/userId-{USER_ID}/{EVENT_TYPE}/year-{YYYY}/month-{MM}/day-{DD}/{HHmmss_SSS}.json
Search Capabilities
Logs can be retrieved using various search patterns:
- User-specific searches using
/userId-{USER_ID}/
- Date-based filtering with
/year-{YYYY}/month-{MM}/day-{DD}/
- Event type filtering using
/CCPInit/
or/AgentLogs/
- Combined searches that include user, date, and other parameters
For reference, a sample S3 key looks like:
orgId-00D123/contactCenterId-a01456/userId-005789/CCPInit/year-2024/month-03/day-15/143052_123.json
Prerequisites
To configure observability logging, make sure you have the following AWS resources configured:
-
AWS S3 Bucket: Create an S3 bucket in the same region as your Amazon Connect instance:
- If you are using the existing SCCAC-Setup-User, ensure your bucket name starts with an "scc" prefix.
- If you are creating a new IAM user, the minimum required permissions are "s3:PutObject" on the specific S3 bucket.
Sample IAM inline policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:PutObject"
],
"Resource": "arn:aws:s3:::your-bucket-name/*"
}
]
} -
AWS Credentials: Retrieve AWS Access Key ID and Secret Access Key from your setup user or create a new user with above S3 permissions.
Configure S3 Logging Setup
-
Access SCC-AC Setup Guide:
- In your Salesforce org, open the Amazon Connect for Salesforce app and access the SCC-AC Setup Guide.
- Select the contact center where you want to configure S3 logging.
- In Step 4 (Optional), locate Configure S3 Logging and enter your S3 bucket name.
-
Assign Field Access and Apex Classes Access:
- Go to Setup, Users, and then Permission Sets.
- Find your SCC Administrator or SCC Agent permission set and choose Edit.
- Under Field Permissions, provide access to the following fields:
- Logging Bucket Name
- Logging Configured
- Logging Enabled
- Logging S3 EC Label
- Logging S3 NC Label
- Under Apex Class Access, provide access to all the new Apex Classes related to logging.
- Choose Save.
Configure AWS Credentials
-
Configure Named Credentials:
- Go to Setup, Security, and then Named Credentials.
- Locate the Named Credential starting with SCC_CONTACT_CENTER_S3_LOGGING_NC and choose Edit.
- Enable the callout toggle for the Named Credential
- Choose Save.
-
Configure External Credentials:
- Go to Setup, Security, and then External Credentials.
- Access External Credentials starting with SCC_CONTACT_CENTER_S3_LOGGING_EC.
- Navigate to Principals and choose IAM Credential.
- Choose Actions, then Edit.
- Enter your IAM Access Key and Secret Access Key.
- Choose Save.
Enable and Disable
By default, Observability Logging is disabled. Completing the Configure AWS Credentials section above will make the feature available for activation.
To enable,
- Return to the Amazon Connect for Salesforce setup page and refresh the page.
- Use the Enable/Disable toggle to control logging functionality.
To disable,
- Go to the Amazon Connect for Salesforce setup page.
- Use the Enable/Disable toggle to turn off logging functionality.
Test Your Logging Implementation
By default, once logging is enabled, CCP initialization and agent activity logs will automatically be sent to your configured S3 bucket.
Before testing, make sure:
- Your S3 bucket is properly configured with the correct permissions
- The Named Credentials and External Credentials are properly set up with valid AWS credentials
- The agent has the required permission sets assigned for accessing logging fields
To verify logging is working:
- Have an agent log into Salesforce and access the SCC-AC Lightning App
- Perform typical agent activities (state changes, handling contacts)
- Check your S3 bucket for log files following the hierarchical structure described above
- Verify that both CCP initialization logs and agent activity logs are being generated