Skip to main content

AWS Lambda Functions

SCCAC-CertificateManagementFunction

This Lambda function is invoked during the guided setup process of SCC-AC to create the key pair and self-signed certificate that will be used to secure communication between the SCC-AC Connected App in the Salesforce org and the SCC-AC Lambda functions that need to make API calls to Salesforce via the Connected App. The generated certificate is enclosed in a Java KeyStore file (.jks extension) using the password specified in the CERTIFICATE_KEY_PASSWORD key, in the secret SCCAC-Secret created in Secrets Manager earlier in the guided setup process. The JKS file is then stored in S3 for manual download, so it can be uploaded to the Salesforce org and the generated certificate imported for use in the Connected App.

SCCAC-ConnectedAppManagerFunction

This Lambda function is invoked during the guided setup process of SCC-AC after the generated certificate has been imported into the Salesforce org. It makes an API call to the Salesforce org to update the SCC-AC Connected App, replacing the temporary placeholder certificate initially set on the Connected App with the generated certificate. After this function is invoked, the Connected App and the SCC-AC Lambda functions will have the same certificate and will be able to communicate as needed.

SCCAC-ExternalCredentialManagementFunction

This Lambda function is invoked during the guided setup process of SCC-AC after the generated certificate has been imported into the Salesforce org. It makes an API call to the Salesforce org to update the External Credential created by the guided setup process, replacing the temporary placeholder certificate with the generated certificate.

SCCAC-SecretManagementFunction

This Lambda function is invoked during the guided setup process of SCC-AC as needed to create, update, and read secrets in Secrets Manager. When setting up SCC-AC for a new Amazon Connect instance in a particular AWS region, this Lambda function is also used to replicate the secrets so they are available to SCC-AC Lambda functions that will be deployed in that region.

SCCAC-ContactDisconnectedFunction

This Lambda function is invoked when a contact is disconnected in the Amazon Connect instance, to ensure that the transcripts from any chat contact that never reached a live agent are ingested into the Salesforce org (e.g. a chat between an end user and a Lex bot, where the bot solved the customer’s issue without needing to route the contact to a live agent).

SCCAC-CtrKinesisRecordSegregationFunction

This Lambda function is invoked when new records are delivered via the Kinesis stream set up to stream Contact Trace Records from the Amazon Connect instance. The function extracts the relevant information from the CTR event and passes it to the SCCAC-ContactTraceRecordFunction to ingest the CTR data into the Salesforce org.

Important: CTR records will only be ingested to Salesforce via SCC-AC for contacts that have the contact attribute source set with the value SCCAC. Service Cloud Voice has a separate mechanism for ingesting CTR records for voice contacts as VoiceCall records, which is not related to this functionality in SCC-AC.

SCCAC-ContactTraceRecordFunction

This Lambda function is invoked by the SCC-CtrKinesisRecordSegregationFunction to ingest data from CTR records into the Salesforce org.

SCCAC-CreateMessagingSessionFunction

This Lambda function is invoked from inbound contact flows for chat contacts that will be handled via SCC-AC. The function makes an API call to the Salesforce org to create a new MessagingSession record to represent the inbound chat contact. This record will be the Salesforce work item for the chat contact, which can be routed to an SCC-AC agent working in Omni-Channel for acceptance.

SCCAC-RoutingFunction

This Lambda function is invoked from inbound contact flows for chat contacts that will be handled via SCC-AC, to trigger routing for the newly-created messaging session in the Salesforce org. By default, this function will route contacts using the routing configuration configured on the Salesforce messaging channel (either an Omni-Queue mapped to a corresponding queue in the Amazon Connect instance, or an Omni-Flow ending with a Route Work action targeting a mapped queue), but this behavior can be overridden dynamically by configuring the parameters passed to this function from the contact flow. Refer to the section (Optional) Configure advanced routing overrides in the contact flow for more details.

This function is also invoked from the contact flows for transfers of chat contacts initiated via Omni-Channel when SCC-AC is in use (agent-to-agent or agent-to-queue transfers), to prepare the contact for transfer to another agent in Omni-Channel.