Select to view content in your preferred language

Send Emails in Citizen Problem Reporter

2997
8
Jump to solution
09-27-2019 09:35 AM
JaredPilbeam2
MVP Regular Contributor

I'm not sure if this the right place to post my question. I'm working on a Citizen Problem Reporter app. There's a Geoprocessing tool called Send Emails. I'm stuck on the Send Email Notifications section (pg. 34) question 9, 10:
https://www.esri.com/content/dam/esrisites/en-us/media/pdf/learn-arcgis/configuring-citizen-problem-...

How do I set this up? I'm able to view/edit the HTML it's referring to. I need help deciphering the two small paragraphs in questions 9 & 10.

1 Solution

Accepted Solutions
JaredPilbeam2
MVP Regular Contributor

Eventually I got it to work with some help from Esri. What you said in the first part of your post is correct.

And as far as setting the SQL Query goes, you can either use emailstatus is Null or emailstatus=''. In the Field to Update you choose the Email Status field. And in the Sent Value field put Sent.

So when a problem is submitted and servicefunctions.py script runs an email will be sent and the Email Status field will be populated with Sent. The next time the script runs no new emails will be sent for that problem because the field doesn't meet the query-- as it's not Null or empty, rather Sent.

View solution in original post

8 Replies
by Anonymous User
Not applicable

I can answer the number 9 part:

In you email template put a keyword like {SUBMITDT}, I personally used the db field surrounded by curly brackets. Then in the email configuration under the General Email Settings put {SUBMITDT} in the Find field and put what data field value you want to replace {SUBMITDT} with in the Replace field, for example I replaced {SUBMITDT} with CreationDate, which is the name of the field in the database.

I still waiting to find out how to format the query for number 10

JaredPilbeam2
MVP Regular Contributor

Eventually I got it to work with some help from Esri. What you said in the first part of your post is correct.

And as far as setting the SQL Query goes, you can either use emailstatus is Null or emailstatus=''. In the Field to Update you choose the Email Status field. And in the Sent Value field put Sent.

So when a problem is submitted and servicefunctions.py script runs an email will be sent and the Email Status field will be populated with Sent. The next time the script runs no new emails will be sent for that problem because the field doesn't meet the query-- as it's not Null or empty, rather Sent.

WilliamRockwell1
Occasional Contributor

Thanks Jared Pilbeam

Any chance you could share a screenshot of your email template? I'm having a slow start getting one together. Thanks for any help. 

0 Kudos
JaredPilbeam2
MVP Regular Contributor

Hi William,

Sure, no problem. I've customized it a bit, but you should just be able to copy this into your template.html file to see how it looks.

<!DOCTYPE html>
<html>
<body>
    <p>Hello {Category},</p>
    <p font-family: Arial>This is an email generated by the Will County Citizen Reporter. Someone has a question about a(n) {Prob}. Please contact them at your earliest convenience.</p>
    <p><b>Details of inquiry:</b> "{Details}"</p>
    <div style="padding:5px;background-color:DodgerBlue"><b>Point of Contact</b></div>
    <table style="width:100%;">
        <tbody>
            <tr>
                <td style="border:0.5px solid rgb(215,215,215)"><span style=" font-weight: bold;">Name</span><br /></td>
                <td style="border:0.5px solid rgb(215,215,215)">{Name}</td>
            </tr>
            <tr>
                <td style="border:0.5px solid rgb(215,215,215)"><span style="font-weight: bold;">Phone</span><br /></td>
                <td style="border:0.5px solid rgb(215,215,215)">{Phone}</td>
            </tr>
            <tr>
                <td style="border:0.5px solid rgb(215,215,215)"><span style="font-weight: bold;">Email</span><br /></td>
                <td style="border:0.5px solid rgb(215,215,215)">{Email}</td>
            </tr>
        </tbody>
    </table>

    <p>Regards,</p>
</body>
</html>
<td style="color:DodgerBlue; font-family: Arial, sans-serif; font-size: 14px;">
    GIS Division<br />
    gis@willcountyillinois.com<br />
    (815) 774-6343<br />
</td>
WilliamRockwell1
Occasional Contributor

Thanks!!!

0 Kudos
Danielle_Journey
Regular Contributor

Hi @JaredPilbeam2 

I'm currently configuring the "Send Emails" portion for our CPR and I was curious about your email settings for notifying the departments internally.  For example, once a citizen reports a problem, the external email is sent to the citizen, and the "Email Status" field is updated to "Sent".  For the internal email to the departments to notify them that a problem had been submitted, what "SQL Query" and "Sent Value" worked for your setup, if you don't mind sharing? Thank you!!

0 Kudos
JaredPilbeam2
MVP Regular Contributor

Hi@Danielle_Journey ,

I never actually used the citizen problem reporter to its fullest as it's too confusing. I simply open the files from the ServiceSupport folder in a text editor as I need them. But, I would say create another field and then reference that field with a similar query. Sorry I couldn't be more helpful.

0 Kudos
Danielle_Journey
Regular Contributor

That's what I am noticing too!  Thanks for the reply!

0 Kudos