Skip to content

Commit 4440c9c

Browse files
authored
Merge pull request #683 from 8x8/feature/send-sms-8x8
8x8 Send SMS Node
2 parents cd3e3a8 + 67999db commit 4440c9c

File tree

7 files changed

+437
-17
lines changed

7 files changed

+437
-17
lines changed

extensions/8x8/README.md

+42-1
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,45 @@ The customer has the sole responsability to obtain and store to context for late
146146
More info on the enpoint [8x8 Contact Center Data Augmentation API](https://support.8x8.com/contact-center/8x8-contact-center/developers/8x8_Contact_Center_Data_Augmentation_API)
147147

148148
### Exit Points:
149-
No child nodes needed or configured for this. Failure will result in missed transmission and the error message logged in Logs.
149+
No child nodes needed or configured for this. Failure will result in missed transmission and the error message logged in Logs.
150+
151+
## Node: Send SMS
152+
153+
This node enables you to send outbound SMS messages to enhance customer engagement and deliver timely notifications. Configure it with your 8x8 Connect credentials, define message content, and specify recipient numbers for personalized communication.
154+
155+
### Important requirement:
156+
157+
This Extension needs a Connection to be defined and passed to the Nodes. The Connection must have the following keys:
158+
159+
- API Key
160+
- key: **apiKey**
161+
- value: Your 8x8-Connect API Key
162+
- Subaccount Id
163+
- key: **subAccountId**
164+
- value Your Subaccount Id
165+
166+
### Setup Steps:
167+
168+
Configure the node connection with apiKey and subAccountId from your [8x8 Connect](https://connect.8x8.com/) account.
169+
170+
This Flow Node sends an SMS message to a provided destination, while the result is stored in the `input` or `context` object:
171+
172+
```json
173+
{
174+
"umid": "158ebe36-14f6-4b51-8121-b099006d829a",
175+
"clientMessageId": null,
176+
"destination": "+6512345678",
177+
"encoding": "GSM7",
178+
"status": {
179+
"code": "QUEUED",
180+
"description": "SMS is accepted and queued for processing"
181+
}
182+
}
183+
```
184+
185+
Optional: Set up the Sender ID in the **Source** field.
186+
187+
### Exit Points:
188+
The node will confirm successful message dispatch or failure, allowing for appropriate flow actions.
189+
- SMS Success
190+
- SMS Error

extensions/8x8/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "8x8-cognigy-extension",
3-
"version": "5.0.0",
2+
"name": "8x8",
3+
"version": "5.1.0",
44
"description": "Integrates with 8x8",
55
"main": "build/module.js",
66
"scripts": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { IConnectionSchema } from "@cognigy/extension-tools";
2+
3+
export const smsConnection: IConnectionSchema = {
4+
type: "sms8x8",
5+
label: "8x8 SMS",
6+
fields: [{ fieldName: "apiKey" }, { fieldName: "subAccountId" }],
7+
};

extensions/8x8/src/module.ts

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1-
import { createExtension } from '@cognigy/extension-tools';
2-
import { simpleConnection } from './connections/8x8SimpleConnection';
3-
import { getCustomerNodes } from './nodes/customer';
4-
import { getScheduleNodes } from './nodes/schedule';
5-
import { getTestConditionOfQueueNode } from './nodes/testConditionOfQueue';
6-
import { getCaseNodes } from './nodes/case';
7-
import { getVoiceHandoverNode } from './nodes/voiceHandover';
8-
import { getDataAugmentationNode } from './nodes/dataAugmentation';
1+
import { createExtension } from "@cognigy/extension-tools";
2+
import { smsConnection } from "./connections/8x8ConnectionSMS";
3+
import { simpleConnection } from "./connections/8x8SimpleConnection";
4+
import { getSMSNodes } from "./nodes/SMS";
5+
import { getCaseNodes } from "./nodes/case";
6+
import { getCustomerNodes } from "./nodes/customer";
7+
import { getDataAugmentationNode } from "./nodes/dataAugmentation";
8+
import { getScheduleNodes } from "./nodes/schedule";
9+
import { getTestConditionOfQueueNode } from "./nodes/testConditionOfQueue";
10+
import { getVoiceHandoverNode } from "./nodes/voiceHandover";
911

1012
export default createExtension({
1113
nodes: [
14+
...getSMSNodes(),
1215
...getCustomerNodes(),
1316
...getScheduleNodes(),
1417
...getTestConditionOfQueueNode(),
1518
...getCaseNodes(),
1619
...getVoiceHandoverNode(),
17-
...getDataAugmentationNode()
18-
],
19-
connections: [
20-
simpleConnection
20+
...getDataAugmentationNode(),
2121
],
22+
connections: [simpleConnection, smsConnection],
2223
options: {
23-
label: '8x8'
24-
}
24+
label: "8x8",
25+
},
2526
});

extensions/8x8/src/nodes/SMS/index.ts

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import type { INodeDescriptor } from "@cognigy/extension-tools";
2+
import { onErrorSMS, onSuccessSMS, sendSMSNode } from "./sendSMS";
3+
4+
export const getSMSNodes = (): INodeDescriptor[] => [
5+
sendSMSNode,
6+
onSuccessSMS,
7+
onErrorSMS,
8+
];

0 commit comments

Comments
 (0)