Skip to content

Instantly share code, notes, and snippets.

@shinsaka
Last active August 26, 2022 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shinsaka/c4ab0613fb74dd36398ecc816d9317ab to your computer and use it in GitHub Desktop.
Save shinsaka/c4ab0613fb74dd36398ecc816d9317ab to your computer and use it in GitHub Desktop.
CTI Flow Sample Scripts (for Amazon Connect CTI Adapter for Salesforce)
{
"actions": [
{
"id": "uid-000",
"type": "SE_Start",
"meta": {},
"controls": {},
"ports": {
"done": "uid-101"
},
"position": [
0,
0
]
},
{
"id": "uid-101",
"type": "SE_ContactGetAttributeValue",
"meta": {
"title": "問い合わせ属性からケースIDを取得"
},
"controls": {
"attributeName": "SfdcCaseId",
"defaultValue": "null"
},
"ports": {
"done": "uid-102"
},
"position": [
160,
0
]
},
{
"id": "uid-102",
"type": "SE_Decision",
"meta": {
"title": "ケースID設定済み?"
},
"controls": {
"operandA": "$.actions.uid-101.results.value",
"comparator": "===",
"operandB": "null",
"evaluateAs": "string"
},
"ports": {
"true": "uid-111",
"false": "uid-999"
},
"position": [
480,
0
]
},
{
"id": "uid-111",
"type": "SE_ContactProperties",
"meta": {
"title": "問い合わせ属性を取得"
},
"controls": {},
"ports": {
"done": "uid-112"
},
"position": [
784,
48
]
},
{
"id": "uid-112",
"type": "SE_SFGetContactId",
"meta": {},
"controls": {
"formattedPhoneNumber": "$.contact.parsedNumber.phone"
},
"ports": {
"success": "uid-113",
"failure": "uid-113"
},
"position": [
1088,
48
]
},
{
"id": "uid-113",
"type": "SE_SFSaveLog",
"meta": {
"title": "ケース作成"
},
"controls": {
"recordId": "null",
"entityType": "Case",
"fieldValues": {
"ContactId": "$.actions.uid-112.results.sfContactId",
"amazonconnect__AC_Contact_Id__c": "$.actions.uid-111.results.contactId"
}
},
"ports": {
"success": "uid-114",
"failure": "uid-114"
},
"position": [
1392,
112
]
},
{
"id": "uid-114",
"type": "SE_ContactUpdateAttributes",
"meta": {
"title": "問い合わせ属性へケースIDをセット"
},
"controls": {
"attributes": {
"SfdcCaseId": "$.actions.uid-113.results.id"
}
},
"ports": {
"success": "uid-115",
"failure": "uid-115"
},
"position": [
1680,
176
]
},
{
"id": "uid-115",
"type": "SE_SFScreenpopObject",
"meta": {
"title": "ケースをポップアップ"
},
"controls": {
"recordId": "$.actions.uid-113.results.id",
"noPopOnEmpty": false
},
"ports": {
"success": "uid-999",
"failure": "uid-999"
},
"position": [
1984,
240
]
},
{
"id": "uid-999",
"type": "SE_End",
"meta": {},
"controls": {},
"ports": {},
"position": [
2272,
320
]
}
]
}
{
"actions": [
{
"id": "uid-000",
"type": "SE_Start",
"meta": {},
"controls": {},
"ports": {
"done": "uid-101"
},
"position": [
0,
0
]
},
{
"id": "uid-101",
"type": "SE_ContactGetAttributeValue",
"meta": {
"title": "問い合わせ属性からケースIDを取得"
},
"controls": {
"attributeName": "SfdcCaseId",
"defaultValue": "null"
},
"ports": {
"done": "uid-102"
},
"position": [
144,
0
]
},
{
"id": "uid-102",
"type": "SE_Decision",
"meta": {
"title": "ケースID設定済み?"
},
"controls": {
"operandA": "$.actions.uid-101.results.value",
"comparator": "!==",
"operandB": "null",
"evaluateAs": "string"
},
"ports": {
"true": "uid-111",
"false": "uid-121"
},
"position": [
464,
-16
]
},
{
"id": "uid-111",
"type": "SE_SFScreenpopObject",
"meta": {
"title": "ケースをポップアップ"
},
"controls": {
"recordId": "$.actions.uid-101.results.value",
"noPopOnEmpty": false
},
"ports": {
"success": "uid-999",
"failure": "uid-999"
},
"position": [
768,
16
]
},
{
"id": "uid-121",
"type": "SE_SFSearchAndScreenpop",
"meta": {},
"controls": {
"searchParams": "$.contact.parsedNumber.phone",
"queryParams": "",
"defaultFieldValues": {},
"callType": "inbound",
"deferred": false
},
"ports": {
"success": "uid-999",
"failure": "uid-999"
},
"position": [
768,
176
]
},
{
"id": "uid-999",
"type": "SE_End",
"meta": {},
"controls": null,
"ports": {},
"position": [
1312,
192
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment