Skip to content

Commit

Permalink
refactor: rename option for deploying Amazon Connect workspace apps
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrickson-tyler committed Aug 22, 2024
1 parent f56b9de commit 9c0b8c9
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
"instanceArn": "placeholder",
"securityKeyId": "placeholder",
"securityKeyCertificateContent": "-----BEGIN CERTIFICATE-----\\n-----END CERTIFICATE-----\\n",
"workspaceApp": true,
"addAppsToWorkspace": true,
"receiptQueueArn": "placeholder"
},
"c3": {
Expand Down
2 changes: 1 addition & 1 deletion cdk.context.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"instanceArn": "",
"securityKeyId": "",
"securityKeyCertificateContent": "",
"workspaceApp": true,
"addAppsToWorkspace": true,
"receiptQueueArn": ""
},
"c3": {
Expand Down
2 changes: 1 addition & 1 deletion docs/ALTERNATIVE_IMPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ It might be necessary to use the alternative import method in the following inst
- 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.
> If you are using Salesforce Service Cloud Voice, ensure that the `amazonConnect.addAppsToWorkspace` 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.
## Initial Deployment

Expand Down
2 changes: 1 addition & 1 deletion docs/GETTING-STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ In order to facilitate this process, you will need to provide some values to the
| `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. |
| `addAppsToWorkspace` | Whether to add third-party apps to the Amazon Connect agent workspace. Defaults to `true`. You may want to set this to `false` if you plan to use the workspace apps through another interface, like Salesforce. |
| `receiptQueueArn` | **Optional**. The full ARN of the Amazon Connect queue to transfer to when there is no email present for the customer and they would like a receipt. This is only valid for self-service payments. If not provided, the customer will not be asked to transfer to an agent and will simply not receive a receipt. |

##### C3
Expand Down
6 changes: 4 additions & 2 deletions lib/c3-amazon-connect-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,10 @@ export class C3AmazonConnectStack extends Stack {
this.featuresContext.agentAssistedIVR ||
this.featuresContext.agentAssistedLink
) {
const appUrl = this.getAppUrl(!this.amazonConnectContext.workspaceApp);
if (this.amazonConnectContext.workspaceApp) {
const appUrl = this.getAppUrl(
!this.amazonConnectContext.addAppsToWorkspace,
);
if (this.amazonConnectContext.addAppsToWorkspace) {
this.create3rdPartyApp(appUrl);
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/models/amazon-connect-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export interface AmazonConnectContext {
instanceArn: string;
securityKeyId: string;
securityKeyCertificateContent: string;
workspaceApp: boolean;
addAppsToWorkspace: boolean;
receiptQueueArn: string;
}

Expand Down
2 changes: 1 addition & 1 deletion test/c3-amazon-connect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const mockContext: Context = {
securityKeyId: 'placeholder',
securityKeyCertificateContent:
'-----BEGIN CERTIFICATE-----\\n-----END CERTIFICATE-----\\n',
workspaceApp: true,
addAppsToWorkspace: true,
receiptQueueArn: 'placeholder',
},
c3: {
Expand Down
2 changes: 1 addition & 1 deletion test/features/agent-assisted-ivr.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const mockContext: Context = {
securityKeyId: 'placeholder',
securityKeyCertificateContent:
'-----BEGIN CERTIFICATE-----\\n-----END CERTIFICATE-----\\n',
workspaceApp: true,
addAppsToWorkspace: true,
receiptQueueArn: 'placeholder',
},
c3: {
Expand Down
2 changes: 1 addition & 1 deletion test/features/agent-assisted-link.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const mockContext: Context = {
securityKeyId: 'placeholder',
securityKeyCertificateContent:
'-----BEGIN CERTIFICATE-----\\n-----END CERTIFICATE-----\\n',
workspaceApp: true,
addAppsToWorkspace: true,
receiptQueueArn: 'placeholder',
},
c3: {
Expand Down
2 changes: 1 addition & 1 deletion test/features/self-service-ivr.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const mockContext: Context = {
securityKeyId: 'placeholder',
securityKeyCertificateContent:
'-----BEGIN CERTIFICATE-----\\n-----END CERTIFICATE-----\\n',
workspaceApp: true,
addAppsToWorkspace: true,
receiptQueueArn: 'placeholder',
},
c3: {
Expand Down
2 changes: 1 addition & 1 deletion test/features/subject-lookup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const mockContext: Context = {
securityKeyId: 'placeholder',
securityKeyCertificateContent:
'-----BEGIN CERTIFICATE-----\\n-----END CERTIFICATE-----\\n',
workspaceApp: true,
addAppsToWorkspace: true,
receiptQueueArn: 'placeholder',
},
c3: {
Expand Down
2 changes: 1 addition & 1 deletion test/options/code-signing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const mockContext: Context = {
securityKeyId: 'placeholder',
securityKeyCertificateContent:
'-----BEGIN CERTIFICATE-----\\n-----END CERTIFICATE-----\\n',
workspaceApp: true,
addAppsToWorkspace: true,
receiptQueueArn: 'placeholder',
},
c3: {
Expand Down
4 changes: 2 additions & 2 deletions test/options/workspace-app.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const mockContext: Context = {
securityKeyId: 'placeholder',
securityKeyCertificateContent:
'-----BEGIN CERTIFICATE-----\\n-----END CERTIFICATE-----\\n',
workspaceApp: true,
addAppsToWorkspace: true,
receiptQueueArn: 'placeholder',
},
c3: {
Expand Down Expand Up @@ -64,7 +64,7 @@ describe('Workspace app', () => {
});

it('Has no 3rd party apps when flag is false', () => {
mockContext.amazonConnect.workspaceApp = false;
mockContext.amazonConnect.addAppsToWorkspace = false;
const app = new App({
context: mockContext,
});
Expand Down

0 comments on commit 9c0b8c9

Please sign in to comment.