Skip to content

Commit

Permalink
Merge pull request #253 from customer-dynamics/release-1.3.0
Browse files Browse the repository at this point in the history
release: v1.3.0
  • Loading branch information
hendrickson-tyler committed Aug 7, 2024
2 parents 209cd12 + 46b23a6 commit 00f10a2
Show file tree
Hide file tree
Showing 37 changed files with 2,447 additions and 3,142 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ updates:
cdk:
patterns:
- 'aws-cdk*'
ignore:
# Ignore all Node types major updates to keep in sync with local version
- dependency-name: '@types/node'
update-types: ['version-update:semver-major']

# GitHub Actions
- package-ecosystem: 'github-actions'
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
"amazonConnect": {
"instanceArn": "placeholder",
"securityKeyId": "placeholder",
"securityKeyCertificateContent": "-----BEGIN CERTIFICATE-----\\n-----END CERTIFICATE-----\\n"
"securityKeyCertificateContent": "-----BEGIN CERTIFICATE-----\\n-----END CERTIFICATE-----\\n",
"workspaceApp": true
},
"c3": {
"env": "dev",
Expand All @@ -48,6 +49,9 @@ jobs:
"selfServiceIVR": true,
"subjectLookup": "required-editable"
},
"options": {
"codeSigning": true
},
"logoUrl": "placeholder",
"supportPhone": "placeholder",
"supportEmail": "placeholder"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
!jest.config.js
!release.config.js
!lib/lambda/**/*.js
lib/lambda/subject-lookup-policy.js
*.d.ts
node_modules
.context-values.json
Expand All @@ -11,3 +12,4 @@ exports
# CDK asset staging directory
.cdk.staging
cdk.out
lib/lambda/subject-lookup-policy.js
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run style:check
2 changes: 1 addition & 1 deletion bin/c3-amazon-connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async function getMostRecentGitTag(): Promise<string> {
return stdout.trim();
} catch (error) {
console.error('Error fetching the most recent git tag:', error);
return 'v1.2.1';
return 'v1.3.0';
}
}

Expand Down
6 changes: 5 additions & 1 deletion cdk.context.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"amazonConnect": {
"instanceArn": "",
"securityKeyId": "",
"securityKeyCertificateContent": ""
"securityKeyCertificateContent": "",
"workspaceApp": true
},
"c3": {
"env": "prod",
Expand All @@ -16,6 +17,9 @@
"selfServiceIVR": true,
"subjectLookup": ""
},
"options": {
"codeSigning": true
},
"logoUrl": "",
"supportPhone": "",
"supportEmail": ""
Expand Down
7 changes: 5 additions & 2 deletions docs/ALTERNATIVE_IMPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ If you are unable to use the standard `npm run deploy` process using the CDK, yo
It might be necessary to use the alternative import method in the following instances:

- Your user lacks the Amazon Elastic Container Registry (ECR) permissions required for the CDK to deploy.
- Your AWS account was set up through [Salesforce Service Cloud Voice](https://trailhead.salesforce.com/content/learn/modules/service-cloud-voice/service-voice-learn).
- This prevents even your _root_ user from having ECR permissions.
- Your AWS account was set up through [Salesforce Service Cloud Voice](https://trailhead.salesforce.com/content/learn/modules/service-cloud-voice/service-voice-learn) (specifically the _SVC with Amazon Connect_ SKU).
- This prevents even your _root_ user from having ECR permissions and they cannot be added.

> [!TIP]
> If you are using Salesforce Service Cloud Voice, ensure that the `amazonConnect.workspaceApp` and `options.codeSigning` values are set to `false` in your `cdk.context.json` file. Your account will not have the necessary permissions for these items.
## Process

Expand Down
19 changes: 13 additions & 6 deletions docs/GETTING-STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ In order to facilitate this process, you will need to provide some values to the

##### Amazon Connect

| Value | Description |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `instanceArn` | The full ARN of your Amazon Connect Instance. You can find this in the AWS console and it should look something like `"arn:aws:connect:us-west-2:815407490078:instance/5c1f1fba-d5f1-4155-9e09-496456e58912"`. |
| `securityKeyId` | The ID of the security key that you configured for your Amazon Connect instance. You can find this in the AWS console. |
| `securityKeyCertificateContent` | The full content of the certificate associated with your Amazon Connect security key. Begins with `-----BEGIN CERTIFICATE-----` and ends with`-----END CERTIFICATE-----`. **Note**: This must be contained within a single string with newlines denoted with `\\n`. |
| Value | Description |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `instanceArn` | The full ARN of your Amazon Connect Instance. You can find this in the AWS console and it should look something like `"arn:aws:connect:us-west-2:815407490078:instance/5c1f1fba-d5f1-4155-9e09-496456e58912"`. |
| `securityKeyId` | The ID of the security key that you configured for your Amazon Connect instance. You can find this in the AWS console. |
| `securityKeyCertificateContent` | The full content of the certificate associated with your Amazon Connect security key. Begins with `-----BEGIN CERTIFICATE-----` and ends with`-----END CERTIFICATE-----`. **Note**: This must be contained within a single string with newlines denoted with `\\n`. |
| `workspaceApp` | Whether to create the C3 Payment Request app for the Amazon Connect agent workspace. Defaults to `true`. You may want to set this to `false` if you plan to use the workspace through another interface, like Salesforce. **Note**: This option does nothing if no agent-assisted features are enabled. |

##### C3

Expand All @@ -71,6 +72,12 @@ In order to facilitate this process, you will need to provide some values to the
| `selfServiceIVR` | Determines whether or not to deploy resources necessary to support a self-service payment IVR. Defaults to `true`. If set to `false`, some resources will not be deployed.<br><br>For more information, see the [self-service payment IVR](./features/SELF_SERVICE_PAYMENT_IVR.md) documentation. |
| `subjectLookup` | **Optional**. Additional feature for agent-assisted IVR payments. If set, this will allow the agent to pull details about the subject to pre-fill information in the payment request (contact name, contact email, and amount due). Valid options are `"required-fixed"`, `"required-editable"`, and `"optional-editable"`. Leave blank if you don't want to support subject lookup.<br><br>For more information, see the [subject lookup](./features/SUBJECT_LOOKUP.md) documentation. |

##### Options

| Value | Description |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `codeSigning` | Whether to support code signing for Lambda resources. This is recommended for security purposes, but may be disabled if necessary. |

##### Other

| Value | Description |
Expand Down Expand Up @@ -145,7 +152,7 @@ C3 for Amazon Connect can also be used within Salesforce to facilitate payments.

With the resources deployed and configured, you can now begin using the C3 Amazon Connect resources to provide a more seamless experience for your agents and customers.

For more information on how to use the features, please reference the [agent user manual](https://stonly.com/guide/en/c3-for-amazon-connect-4aD1PSTbrN/Steps/3598750).
For more information on how to use the features, please reference the [agent user manual](https://customerdynamics.stonly.com/kb/guide/en/c3-for-amazon-connect-4aD1PSTbrN/Steps/3598750).

### Test Cards and Bank Accounts

Expand Down
52 changes: 33 additions & 19 deletions docs/features/SALESFORCE_INTEGRATION.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Salesforce Integration

## Overview

C3 for Amazon connect can be used within Salesforce to provide agents with a seamless experience when handling customer interactions. The configuration process depends on how you have Amazon Connect integrated with your Salesforce instance. There are two integrations that are supported by this project:

1. **[Amazon Connect CTI Adapter](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000EJH4yUAH)**: The Amazon Connect CTI Adapter allows for the Amazon Connect Contact Control Panel (CCP) to be embedded within Salesforce as the softphone for your agents.
2. **[Salesforce Service Cloud Voice](https://aws.amazon.com/partners/amazon-connect-and-salesforce/)**: This integration is a managed package that provides a pre-built integration between Salesforce and Amazon Connect. It allows you to use [Salesforce Omni-Channel](https://www.salesforce.com/service/digital-customer-engagement-platform/) with Amazon Connect as your voice provider using the omni-channel softphone interface.

## Installation

> [!NOTE]
Expand All @@ -9,25 +16,18 @@

#### Find Your Workspace URL

When you deployed resources to your AWS account through this project, a unique URL was generated for your agent workspace. Steps to find this URL are as follows:

1. Open the AWS Amazon Connect console
2. Select your instance in the list
3. Select "Third-party applications" in the left-hand menu
4. Select the application named "Payment Request"
5. Copy the value under "Access URL"
When you deployed resources to your AWS account through this project, a unique URL was generated for your agent workspace. After running `npm run synth` or `npm run deploy`, you will see this URL output in the console. It will look something like:

It should be a long URL that looks something like this, if you are using the dev or staging C3 environments:
```bash
🌐 Your C3 Payment Request app URL is:

```url
https://some-vendor.{{c3Environment}}.c2a.link/agent-workspace?contactCenter=amazon&instanceId=some-guid&region=some-region&externalRoleArn=arn:aws:iam::000000000000:role/C3AmazonConnectStack-C3AgentAssistedIVRRole00000000-000000000000&subjectLookup=required-editable
https://some-vendor.call2action.link/agent-workspace?contactCenter=amazon&instanceId=some-guid&region=some-region&externalRoleArn=${Token[TOKEN.261]}&subjectLookup=required-editable&customEmbed=true
```

If you are using the production C3 environment, the URL will look like this:
> [!TIP]
> You can also find this URL at any time by looking at the `exports/C3WorkspaceAppUrl.txt` file.
```url
https://some-vendor.call2action.link/agent-workspace?contactCenter=amazon&instanceId=some-guid&region=some-region&externalRoleArn=arn:aws:iam::000000000000:role/C3AmazonConnectStack-C3AgentAssistedIVRRole00000000-000000000000&subjectLookup=required-editable
```
Replace the `${Token[TOKEN.261]}` value with the ARN of the IAM role that was created when you deployed the stack. Look in IAM for a role named "AmazonConnectExternalRole", copy the ARN, and replace the placeholder in the URL.

#### Create Visualforce Page

Expand All @@ -40,7 +40,7 @@ Replace the content of the _Visualforce Markup_ tab with the following code:
```html
<apex:page>
<iframe
src="{{ Your URL from the previous step}}&customEmbed=true"
src="{{ Your URL from the previous step }}"
style="height: 100vh; width: 100%; border: none;"
>
</iframe>
Expand Down Expand Up @@ -75,6 +75,10 @@ Your app page is now ready for use! Verify that your agents can see the new app

### Configure Amazon Connect Integration

This step will vary depending on how you have Amazon Connect integrated with Salesforce. Please follow the appropriate guide below:

#### CTI Adapter Configuration

#### Install CTI Adapter

In order to integrate Amazon Connect into your Salesforce Lightning instance, you will need to install the Amazon Connect CTI Adapter. This adapter will allow you to connect your Amazon Connect instance to Salesforce and provide your agents with the ability to make and receive calls with the CCP interface within Salesforce.
Expand All @@ -84,15 +88,15 @@ For detailed instructions on how to install the CTI Adapter, please reference th
> [!IMPORTANT]
> Please follow the directions closely. The CTI Adapter requires a number of configuration steps to be completed in order to function properly.
#### Enable CCP Softphone
##### Enable CCP Softphone

Navigate back to the App Manager in the Salesforce _Service Setup_ page. Find the app that your agents will be using. As before, examples could be the _Service Console_ or _Sales Console_ app. Scroll to the far right of the table, click the dropdown arrow, and select "Edit".

Select the "Utility Items" tab and click the "Add Utility Item" button. Search for the "Open CTI Softphone" utility item and select it. Give this a label and icon that are recognizable to your agents, such as "Phone" and a phone icon. Configure the other properties as needed and hit save.

Verify that your agents can see the new softphone option in their utility items at the bottom of the screen.

#### Enable Attribute Display in the CCP Softphone
##### Enable Attribute Display in the CCP Softphone

Because the "Payment Request" app cannot directly communicate with Amazon Connect when embedded in Salesforce, agents will need to pass some necessary information from Salesforce to the Payment Request app. To display this information to the agent in the CCP interface, you will need to modify the CTI adapter that you installed.

Expand All @@ -102,7 +106,7 @@ At the bottom of the page, find the "Attributes" section and hit "New". Add a ne

![Screenshot of a dialogue screen in Salesforce named "New AC CTI Attribute". Properties are populated with values required for the integration.](../images/salesforce-new-attribute.png 'Contact ID CTI Attribute')

### Set the Contact ID Attribute in Amazon Connect Flow
#### Set the Contact ID Attribute in Amazon Connect Flow

In your initial contact flow, you will need to set the `ContactId` contact attribute _before_ you transfer the call to a queue. This attribute will be used by the Salesforce CTI adapter to display the contact ID in the CCP interface.

Expand All @@ -118,8 +122,18 @@ Within the _Set contact attributes_ block, configure the following settings:

Save the changes to your block, then save and publish your contact flow.

#### Service Cloud Voice Configuration

#### Install Service Cloud Voice

Follow the steps in the [Service Cloud Voice guide](https://help.salesforce.com/s/articleView?id=sf.voice_setup_enable.htm&type=5) to get set up with Service Cloud Voice. This will provision an AWS account and Amazon Connect instance for you.

#### Configure Omni-Channel

Ensure that the _Payment IVR_ (and _Subject Lookup_) quick connects are displaying in the Salesforce Omni-Channel widget.

## Test the Integration

Test the entire integration by making a call to your Amazon Connect inbound number and attempting to collect a payment through the app.

For more information on how to use C3 for Amazon Connect, please refer to the [agent user manual](https://stonly.com/guide/en/c3-for-amazon-connect-4aD1PSTbrN/Steps/3598750).
For more information on how to use C3 for Amazon Connect, please refer to the [agent user manual](https://customerdynamics.stonly.com/kb/guide/en/c3-for-amazon-connect-4aD1PSTbrN/Steps/3598750).
18 changes: 11 additions & 7 deletions docs/features/SUBJECT_LOOKUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,19 @@ Agent lookup is facilitated through the use of a _quick connect_, _transfer to q

Because the subject lookup process is specific to your organization, you will need to provide your own code in the Lambda function that is deployed with the stack to handle the lookup process. This Lambda function is named `C3SubjectLookup` and you can find the code at `lib/lambda/c3-subject-lookup/index.js`. Please read the comments in the code to understand how to implement your own lookup process.

If you need to grant your Lambda function to access any of your other AWS resources, you can add them to the empty, commented-out policy in `lib/features/subject-lookup.ts`. Look for this comment:
If you need to grant your Lambda function access to any of your other AWS resources, you can add them to the empty policy in `lib/lambda/subject-lookup-policy.ts`:

```typescript
// Update this with any additional permissions that the function needs for your subject lookup.
// const subjectLookupPolicy = new PolicyStatement({
// actions: [],
// resources: [],
// });
// this.subjectLookupFunction.addToRolePolicy(subjectLookupPolicy);
export const policyStatements: PolicyStatementProps[] = [
{
actions: [
// Add any actions required for your subject lookup here.
],
resources: [
// Add any resources required for your subject lookup here.
],
},
];
```

Once you have updated the Lambda function, you can deploy the stack again to update the Lambda function:
Expand Down
Loading

0 comments on commit 00f10a2

Please sign in to comment.