Automatically update the customer in Freescout based on the contents of the message. Ideal for handling form submissions
Find a file
2025-01-12 13:39:05 +00:00
.github Better build 2024-07-19 22:33:09 +01:00
Config fix for codesniff 2024-07-17 23:13:29 +00:00
Console Initial Commit 2023-06-11 12:03:51 +01:00
Database Initial Commit 2023-06-11 12:03:51 +01:00
Entities Initial Commit 2023-06-11 12:03:51 +01:00
Http Initial Commit 2023-06-11 12:03:51 +01:00
images Initial Commit 2023-06-11 12:03:51 +01:00
Providers Cleanup 2024-07-17 23:11:20 +00:00
Public Initial Commit 2023-06-11 12:03:51 +01:00
Resources bump to v2 - added json config and support multiple rules 2024-07-17 21:56:34 +00:00
Tests Initial Commit 2023-06-11 12:03:51 +01:00
vendor Cleanup 2024-07-17 23:11:20 +00:00
.gitignore Initial Commit 2023-06-11 12:03:51 +01:00
composer.json Cleanup 2024-07-17 23:11:20 +00:00
composer.lock Cleanup 2024-07-17 23:11:20 +00:00
INSTALL.md fix to formatting 2025-01-12 13:30:57 +00:00
LICENSE Initial Commit 2023-06-11 12:03:51 +01:00
module.json bump to .11 2024-07-19 22:34:44 +01:00
README.md Add build status 2024-07-18 01:24:38 +00:00
start.php Initial Commit 2023-06-11 12:03:51 +01:00

Automatically update customer based on body of emails

Checks

Fed up with changing the customer when you receive a form submission or other automated email? This module is for you!

Config is carried out using JSON - here is a simple example - one for a form submitted using Webflow, and another being an unmatched email response from a school MIS system


{
    "no-reply-forms@webflow.com": {
        "matches": [
            {
                "\/<p>You just got a form (submission)!\/": {
                    "stop": "_notfound"
                },
                "\/<strong>Submitted content<\\\/strong>[\n\r]+<br>First Name: ([^\r\n]+)\/": {
                    "fields": {
                        "first_name": 0
                    }
                },
                "\/<strong>Submitted content<\\\/strong>.*[\n\r]+<br>Last Name: ([^\r\n]+)\/s": {
                    "fields": {
                        "last_name": 0
                    }
                },
                "\/<strong>Submitted content<\\\/strong>.*[\n\r]+<br>Email Address: ([^\r\n]+)\/s": {
                    "fields": {
                        "email": 0
                    }
                },
                "\/<strong>Submitted content<\\\/strong>.*[\n\r]+<br>Phone Number: ([^\r\n]+)\/s": {
                    "fields": {
                        "phone": 0
                    }
                }
            }
        ]
    },
    "info@schooldomain.uk": {
        "matches": [
            {
                "\/Untracked email received:<br><br>From: ([^<]*) <([^>]+)>\/": {
                    "fields": {
                        "email": 1,
                        "name": 0
                    },
                    "stop": "_found"
                }
            }
        ],
	"mailboxes": [ 1,3 ]
    }
}

Still very much a work in progress - hoping to make the JSON config more user friendly. Have been running in production for some time.

Free to use, but if you end up using it in an organisation with 20 or more users, or provide it as part of another package or service, please consider support me via https://ko-fi.com/aarhus and/or helping with the development/maintenance.

Thanks