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
Salesforce Async Apex Considerations
When S3 logging is enabled, the feature generates asynchronous Future method calls to upload logs to your S3 bucket. Understanding the expected Future method usage helps ensure your organization's limits are not exceeded.
Future Method Call Calculation
The total daily Future method calls can be estimated using the following formula:
Daily Future Method Calls =
(Number of Agents × CCP Initializations per Session × Sessions per Day) +
(Number of Agents × Login/Logout Events per Session × Sessions per Day) +
(Number of Agents × Agent Status Changes per Day) +
(Number of Agents × Contacts Handled per Day)
Where:
- Session = A continuous work period from login to logout (e.g., morning login to lunch logout, or post-lunch login to end-of-shift logout)
- CCP Initializations = 3-4 calls per session (includes start, retries(varies), and success/failure events)
- Login/Logout Events = 2 calls per session (1 login + 1 logout)
- Agent Status Changes = varies by workflow (includes transitions between Available, Busy, Break, Offline, etc., excluding initial Login/Logout)
- Contacts Handled = varies by role and contact volume
Recommendations
- Monitor Usage: Regularly check your organization's Future method usage in Setup → System Overview
- Request Limit Increases: For large contact centers, proactively request Future method limit increases from Salesforce Support
Note: The default 24-hour Future method limit varies by Salesforce edition. Contact Salesforce Support if your estimated usage approaches your organization's limit.
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 (you can use any AWS account as long as it is in the same region as the Amazon Connect instance region):
- 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, locate Configure S3 Logging and enter your S3 bucket name.
-
Assign Field Access:
- From Setup in Salesforce, navigate to Permission Sets.
- Select the SCC Administrator or SCC Agent permission set from the list.
- Go to Object Settings within the permission set.
- Locate and click on the SCC Contact Center Configurations object.
- Click Edit.
- Enable access (Read and/or Edit as required) for the following five fields:
- Logging Bucket Name
- Logging Configured
- Logging Enabled
- Logging S3 EC Label
- Logging S3 NC Label
- Save your changes.
-
Assign Apex Class Access:
- Within the same permission set, navigate to Apex Class Access.
- Click Edit.
- Add the SCCS3LoggingService Apex class.
- Save your changes.
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