From 5c25eebf0ccff0fff2f9064080b4817e8f0e7ab2 Mon Sep 17 00:00:00 2001 From: "byrne.reese" Date: Fri, 6 Sep 2024 11:51:46 -0700 Subject: [PATCH] Adding files --- docs/recipes/sms-optout-autoreply.json | 405 +++++++++++++++++++++++++ docs/recipes/sms-optout-autoreply.md | 23 ++ 2 files changed, 428 insertions(+) create mode 100644 docs/recipes/sms-optout-autoreply.json create mode 100644 docs/recipes/sms-optout-autoreply.md diff --git a/docs/recipes/sms-optout-autoreply.json b/docs/recipes/sms-optout-autoreply.json new file mode 100644 index 0000000..17231d9 --- /dev/null +++ b/docs/recipes/sms-optout-autoreply.json @@ -0,0 +1,405 @@ +{ + "name": "SMS opt-in/opt-out auto-reply", + "nodes": [ + { + "id": "trigger", + "position": { + "x": 250, + "y": 75 + }, + "type": "trigger", + "data": { + "description": "", + "rules": [], + "label": "SMS received", + "type": "newSMS", + "nextNodes": [ + "condition-opt-out-keywords" + ], + "matchType": "or" + } + }, + { + "id": "condition-opt-out-keywords", + "position": { + "x": 250, + "y": 225 + }, + "type": "condition", + "data": { + "parentNodeBranch": "default", + "nextNodes": [ + "action-sms-opt-out" + ], + "matchType": "or", + "parentNodeId": "trigger", + "rules": [ + { + "input": "trigger.message", + "condition": "isContains", + "id": 0, + "value": "stop" + }, + { + "input": "trigger.message", + "condition": "isContains", + "id": 1, + "value": "unsubscribe" + } + ], + "label": "Opt-out keywords", + "falsyNodes": [ + "condition-opt-in-keywords" + ] + } + }, + { + "id": "action-sms-opt-out", + "position": { + "x": -50, + "y": 425 + }, + "type": "action", + "data": { + "paramValues": "{\"messageText\":\"$$PARAM$$\",\"fromPhoneNumber\":\"{trigger.recipient.phoneNumber}\",\"toPhoneNumbers\":[{\"phoneNumber\":\"{trigger.sender.phoneNumber}\"}]}", + "parentNodeId": "condition-opt-out-keywords", + "label": "Send SMS", + "type": "sendSMS", + "parentNodeBranch": "default", + "nextNodes": [ + "action-lookup-contact-opt-out" + ] + } + }, + { + "id": "action-lookup-contact-opt-out", + "position": { + "x": -50, + "y": 625 + }, + "type": "action", + "data": { + "paramValues": "{\"phoneNumber\":\"{trigger.sender.phoneNumber}\"}", + "parentNodeId": "action-sms-opt-out", + "label": "Lookup contact", + "type": "lookupContact", + "parentNodeBranch": "default", + "nextNodes": [ + "condition-contact-found-opt-out" + ] + } + }, + { + "id": "condition-contact-found-opt-out", + "position": { + "x": -50, + "y": 825 + }, + "type": "condition", + "data": { + "parentNodeBranch": "default", + "nextNodes": [ + "action-update-contact-opt-out" + ], + "matchType": "and", + "parentNodeId": "action-lookup-contact-opt-out", + "rules": [ + { + "input": "action.isPersonalContact", + "condition": "isTrue", + "id": 0, + "value": "" + } + ], + "label": "Contact found", + "falsyNodes": [ + "action-create-contact-opt-out" + ] + } + }, + { + "id": "action-update-contact-opt-out", + "position": { + "x": -250, + "y": 1025 + }, + "type": "action", + "data": { + "paramValues": "{\"notes\":\"{action.contactNotes}\\nThis person unsubscribed to SMS messages on {trigger.receivedDate}\",\"contactId\":\"{action.contactId}\",\"phoneNumberLabel\":\"businessPhone\"}", + "parentNodeId": "condition-contact-found-opt-out", + "label": "Update contact", + "type": "updateContact", + "parentNodeBranch": "default", + "nextNodes": [ + "action-exit-opt-out-1" + ] + } + }, + { + "id": "action-create-contact-opt-out", + "position": { + "x": 150, + "y": 1025 + }, + "type": "action", + "data": { + "paramValues": "{\"firstName\":\"{trigger.sender.phoneNumber}\",\"phoneNumber\":\"{trigger.sender.phoneNumber}\",\"phoneNumberLabel\":\"businessPhone\",\"notes\":\"This person unsubscribed to SMS messages on {trigger.receivedDate}\"}", + "parentNodeId": "condition-contact-found-opt-out", + "label": "Create contact", + "type": "createContact", + "parentNodeBranch": "false", + "nextNodes": [ + "action-exit-opt-out-2" + ] + } + }, + { + "id": "action-exit-opt-out-1", + "position": { + "x": -250, + "y": 1225 + }, + "type": "action", + "data": { + "paramValues": "{}", + "parentNodeId": "action-update-contact-opt-out", + "label": "Exit", + "type": "exit", + "parentNodeBranch": "default", + "nextNodes": [] + } + }, + { + "id": "action-exit-opt-out-2", + "position": { + "x": 150, + "y": 1225 + }, + "type": "action", + "data": { + "paramValues": "{}", + "parentNodeId": "action-create-contact-opt-out", + "label": "Exit", + "type": "exit", + "parentNodeBranch": "default", + "nextNodes": [] + } + }, + { + "id": "condition-opt-in-keywords", + "position": { + "x": 550, + "y": 425 + }, + "type": "condition", + "data": { + "parentNodeBranch": "false", + "nextNodes": [ + "action-sms-opt-in" + ], + "matchType": "or", + "description": "", + "parentNodeId": "condition-opt-out-keywords", + "rules": [ + { + "input": "trigger.message", + "condition": "isContains", + "id": 0, + "value": "start" + }, + { + "input": "trigger.message", + "condition": "isContains", + "id": 1, + "value": "subscribe" + }, + { + "input": "trigger.message", + "condition": "isContains", + "id": 2, + "value": "resubscribe" + } + ], + "label": "Opt-in keywords", + "falsyNodes": [ + "action-exit-1" + ] + } + }, + { + "id": "action-sms-opt-in", + "position": { + "x": 750, + "y": 625 + }, + "type": "action", + "data": { + "paramValues": "{\"messageText\":\"$$PARAM$$\",\"fromPhoneNumber\":\"{trigger.recipient.phoneNumber}\",\"toPhoneNumbers\":[{\"phoneNumber\":\"{trigger.sender.phoneNumber}\"}]}", + "parentNodeId": "condition-opt-in-keywords", + "label": "Send SMS", + "type": "sendSMS", + "parentNodeBranch": "default", + "nextNodes": [ + "action-lookup-contact-opt-in" + ] + } + }, + { + "id": "action-lookup-contact-opt-in", + "position": { + "x": 750, + "y": 825 + }, + "type": "action", + "data": { + "paramValues": "{\"phoneNumber\":\"{trigger.sender.phoneNumber}\"}", + "parentNodeId": "action-sms-opt-in", + "label": "Lookup contact", + "type": "lookupContact", + "parentNodeBranch": "default", + "nextNodes": [ + "condition-contact-found-opt-in" + ] + } + }, + { + "id": "condition-contact-found-opt-in", + "position": { + "x": 750, + "y": 1025 + }, + "type": "condition", + "data": { + "parentNodeBranch": "default", + "nextNodes": [ + "action-update-contact-opt-in" + ], + "matchType": "and", + "parentNodeId": "action-lookup-contact-opt-in", + "rules": [ + { + "input": "action.isPersonalContact", + "condition": "isTrue", + "id": 0, + "value": "" + } + ], + "label": "Contact found", + "falsyNodes": [ + "action-create-contact-opt-in" + ] + } + }, + { + "id": "action-update-contact-opt-in", + "position": { + "x": 550, + "y": 1225 + }, + "type": "action", + "data": { + "paramValues": "{\"notes\":\"{action.contactNotes}\\nThis person re-subscribed to SMS messages on {trigger.receivedDate}\",\"contactId\":\"{action.contactId}\",\"phoneNumberLabel\":\"businessPhone\"}", + "parentNodeId": "condition-contact-found-opt-in", + "label": "Update contact", + "type": "updateContact", + "parentNodeBranch": "default", + "nextNodes": [ + "action-exit-opt-in-1" + ] + } + }, + { + "id": "action-create-contact-opt-in", + "position": { + "x": 950, + "y": 1225 + }, + "type": "action", + "data": { + "paramValues": "{\"firstName\":\"{trigger.sender.phoneNumber}\",\"phoneNumber\":\"{trigger.sender.phoneNumber}\",\"phoneNumberLabel\":\"businessPhone\",\"notes\":\"This person re-subscribed to SMS messages on {trigger.receivedDate}\"}", + "parentNodeId": "condition-contact-found-opt-in", + "label": "Create contact", + "type": "createContact", + "parentNodeBranch": "false", + "nextNodes": [ + "action-exit-opt-in-2" + ] + } + }, + { + "id": "action-exit-opt-in-1", + "position": { + "x": 550, + "y": 1425 + }, + "type": "action", + "data": { + "paramValues": "{}", + "parentNodeId": "action-update-contact-opt-in", + "label": "Exit", + "type": "exit", + "parentNodeBranch": "default", + "nextNodes": [] + } + }, + { + "id": "action-exit-opt-in-2", + "position": { + "x": 950, + "y": 1425 + }, + "type": "action", + "data": { + "paramValues": "{}", + "parentNodeId": "action-create-contact-opt-in", + "label": "Exit", + "type": "exit", + "parentNodeBranch": "default", + "nextNodes": [] + } + }, + { + "id": "action-exit-1", + "position": { + "x": 350, + "y": 625 + }, + "type": "action", + "data": { + "paramValues": "{}", + "parentNodeId": "condition-opt-in-keywords", + "label": "Exit", + "type": "exit", + "parentNodeBranch": "false", + "nextNodes": [] + } + } + ], + "params": [ + { + "id": "action-params-action-sms-opt-out-messageText", + "name": "SMS opt-out auto-reply", + "type": "text", + "limitLength": 500, + "helperText": "Tip: type \"#\" to see a list of variables you can insert into the message", + "nodeId": "action-sms-opt-out", + "nodeLabel": "Send SMS", + "paramId": "messageText", + "forAction": "sendSMS", + "requiredActionOutputs": [] + }, + { + "id": "action-params-action-sms-opt-in-messageText", + "name": "SMS opt-in auto-reply", + "type": "text", + "limitLength": 500, + "helperText": "Tip: type \"#\" to see a list of variables you can insert into the message", + "nodeId": "action-sms-opt-in", + "nodeLabel": "Send SMS", + "paramId": "messageText", + "forAction": "sendSMS", + "requiredActionOutputs": [] + } + ], + "version": 1 +} \ No newline at end of file diff --git a/docs/recipes/sms-optout-autoreply.md b/docs/recipes/sms-optout-autoreply.md new file mode 100644 index 0000000..2208c21 --- /dev/null +++ b/docs/recipes/sms-optout-autoreply.md @@ -0,0 +1,23 @@ +--- +tags: + - recipe + - Opt-out + - Opt-in + - SMS + - Auto-reply +--- + +# Acknowledge reciept of an opt-out or opt-in request via SMS + +!!! warning "**Opt-in and opt-out auto-replies is now supported in our core product**" + This recipe is provides for demonstration purposes only to illustrate a way of implementing auto-responses to specific keyworks. If you are in need of this specific feature we strongly recommend you setup your RingCentral account accordingly. + +This automation is a good demonstration of how you can setup Automator to acknowledge the reciept of messages that contain specific keywords. It models the use case of sending SMS auto-replies in response to receiving specific commands or keywords. In addition, it demonstrates how to augment a contact record in RingCentral with a note to keep a record of the received correspondence. + +Once you install the recipe, if you wish to customize the keywords this automation will respond to then edit the appropriate conditional elements relating to keywords in the advanced automation. + +As a final reminder, RingCentral does not recommend using the recipe as-is. SMS opt-in and opt-out auto-responses are managed within our core product. Using this automation will result in duplicated messages being sent and could increase your costs. + +[:fontawesome-solid-download: Download automation](sms-optout-autoreply.json){: download .md-button } + +Learn how to [import it into your account](../user-guide.md#importing-automations).