I'm beginning work on courtesy (predue) notices and a re-architecture of the existing overdue notice script for better templating and configuration. Attached is a sample configuration section (from opensrf.xml) I created for setting these up. I wanted to work backwards from the configuration to the code to make sure the requirements are accurately represented. This configuration is only for email notices and generating a local XML file (for sending to a vendor, creating local mail notices, etc.). This is not the full-blown notication system (telephony, etc.) described in http://open-ils.org/dokuwiki/doku.php?id=scratchpad:notification_system&s=notices. However, I'd like to think that this is at least a step in that direction.

For predue notices, there was a discussion of basing the notice date on a percentage of the total circulation duration. I toyed with that some and decided in the end to model predue notices on duration date ranges instead. It's just easier on the eyes. I'm open to discussion on that one, though.

For 1.4.0, the plan is to have locale-aware templates, built with Perl's Template Toolkit. 1.4.X will introduce per-org-unit templates.

Suggestions and comments on the configuration welcome.

-b



--
Bill Erickson
| VP, Software Development & Integration
| Equinox Software, Inc. / The Evergreen Experts
| phone: 877-OPEN-ILS (673-6457)
| email: [EMAIL PROTECTED]
| web: http://esilibrary.com
  <notifications>

    <!-- global mail server settings -->
    <smtp_server>localhost</smtp_server>
    <sender_address>[EMAIL PROTECTED]</sender_address>

    <!-- Overdue notices -->
    <overdue>

        <!-- optionally, you can define a sender address per notice type -->
        <sender_address>[EMAIL PROTECTED]</sender_address>

        <!-- The system can generate an XML file of overdue notices.  This is the 
            directory where they are stored.  Files are named overdue.YYYY-MM-DD.xml -->
        <notice_dir>/openils/var/data/overdue</notice_dir>

        <notice>

            <!-- Notify at 7 days overdue -->
            <notify_interval>7 days</notify_interval>

            <!-- Options include always, noemail, and never.  'noemail' means a notice
                 will be appended to the notice file only if the patron has no valid email address.  -->
            <file_append>noemail</file_append>

            <!-- do we attempt email notification? -->
            <email_notify>true</email_notify>

            <!-- notice template file -->
            <template>/openils/var/data/templates/overdue_7day</template>
        </notice>

        <notice>
            <notify_interval>14 days</notify_interval>
            <file_append>always</file_append>
            <email_notify>true</email_notify>
            <template>/openils/var/data/templates/overdue_14day</template>
        </notice>
    </overdue>

    <!-- Courtesy notices -->
    <predue>
        <notice_dir>/openils/var/data/predue</notice_dir>
        <notice>

            <!-- All circulations that circulate between 5 and 13 days -->
            <circ_duration_range>5 days,13 days</circ_duration_range>

            <!-- notify at 1 day before the due date -->
            <notify_interval>1 day</notify_interval>

            <file_append>false</file_append>
            <email_notify>true</email_notify>
            <template>/openils/var/data/templates/predue_1day</template>
        </notice>

        <notice>

            <!-- All circulations that circulate for 14 or more days -->
            <circ_duration_range>14 days</circ_duration_range>
            <notify_interval>2 day</notify_interval>

            <file_append>false</file_append>
            <email_notify>true</email_notify>
            <template>/openils/var/data/templates/predue_2day</template>
        </notice>
    </predue>

    <held_item_ready>
        <notice>
            <email_notify>true</email_notify>
            <template>/openils/var/data/templates/held_item_ready</template>
        </notice>
    </held_item_ready>
  </notifications>

Reply via email to