Merge pull request #1463 from alphagov/using-notify

Adding the new Using Notify page
This commit is contained in:
Chris Hill-Scott
2017-08-31 11:23:45 +01:00
committed by GitHub
12 changed files with 1867 additions and 134 deletions

View File

@@ -377,7 +377,7 @@ def format_notification_status_as_field_status(status):
def format_notification_status_as_url(status):
url = partial(url_for, "main.delivery_and_failure")
url = partial(url_for, "main.using_notify")
return {
'technical-failure': url(_anchor='technical-failure'),
'temporary-failure': url(_anchor='not-accepting-messages'),

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 166 KiB

View File

@@ -77,7 +77,7 @@ def create_api_key(service_id):
disabled_options = [KEY_TYPE_NORMAL]
option_hints = {KEY_TYPE_NORMAL: Markup(
'This option is not available because your service is in '
'<a href="{}">trial mode</a>'.format(url_for(".trial_mode"))
'<a href="{}#trial-mode">trial mode</a>'.format(url_for(".using_notify"))
)}
else:
disabled_options, option_hints = [], {}

View File

@@ -28,7 +28,7 @@ def cookies():
@main.route('/trial-mode')
def trial_mode():
return render_template('views/trial-mode.html')
return redirect(url_for('.using_notify') + '#trial-mode', 301)
@main.route('/pricing')
@@ -46,7 +46,7 @@ def pricing():
@main.route('/delivery-and-failure')
def delivery_and_failure():
return render_template('views/delivery-and-failure.html')
return redirect(url_for('.using_notify') + '#messagedeliveryandfailure', 301)
@main.route('/design-patterns-content-guidance')
@@ -125,3 +125,8 @@ def roadmap():
@main.route('/features')
def features():
return render_template('views/features.html')
@main.route('/using_notify')
def using_notify():
return render_template('views/using-notify.html')

View File

@@ -95,12 +95,11 @@
<div class="column-one-third">
<h2>About</h2>
<ul>
<li><a href="{{ url_for("main.using_notify") }}">Using Notify</a></li>
<li><a href="{{ url_for("main.features") }}">Features</a></li>
<li><a href="{{ url_for("main.roadmap") }}">Roadmap</a></li>
<li><a href="{{ url_for("main.terms") }}">Terms of use</a></li>
<li><a href="{{ url_for("main.trial_mode") }}">Trial mode</a></li>
<li><a href="{{ url_for("main.pricing") }}">Pricing</a></li>
<li><a href="{{ url_for("main.delivery_and_failure") }}">Delivery and failure</a></li>
</ul>
</div>
<div class="column-one-third">

View File

@@ -7,6 +7,6 @@
{%- endif %}
</h1>
<p>
In <a href="{{ url_for('.trial_mode') }}">trial mode</a> you can only
In <a href="{{ url_for('.using_notify') }}#trial-mode">trial mode</a> you can only
send to yourself and members of your team
</p>

View File

@@ -8,7 +8,7 @@
<p>
You can only send {{ current_service.message_limit }} messages per day
{%- if current_service.restricted %}
in <a href="{{ url_for('.trial_mode')}}">trial mode</a>
in <a href="{{ url_for('.using_notify')}}#trial-mode">trial mode</a>
{%- endif -%}
.
</p>

View File

@@ -90,7 +90,7 @@
{{ 'this letter' if count_of_recipients == 1 else 'these letters' }}
</h1>
<p>
In <a href="{{ url_for('.trial_mode') }}">trial mode</a> you
In <a href="{{ url_for('.using_notify') }}#trial-mode">trial mode</a> you
can only preview how your letters will look
</p>

View File

@@ -1,72 +0,0 @@
{% extends "withoutnav_template.html" %}
{% block per_page_title %}
Delivery and failure
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="column-two-thirds">
<h1 id="messagedeliveryandfailure" class="heading-large">Delivery and failure</h1>
<p>Our delivery states are:</p>
<ul class="list list-bullet">
<li><a href="#sending">Sending</a></li>
<li><a href="#delivered">Delivered</a></li>
<li><a href="#does-not-exist">Phone number or email address does not exist</a></li>
<li><a href="#inbox-not-accepting-messages">Inbox not accepting messages right now</a></li>
<li><a href="#phone-not-accepting-messages">Phone not accepting messages right now</a></li>
<li><a href="#technical-failure">Technical failure</a></li>
</ul>
<h2 id="sending" class="heading-medium">Sending</h2>
<p>All messages start in the Sending state.</p>
<p>This means that we have accepted the message. Its waiting in a queue to be sent to our email or text message delivery partners.</p>
<h2 id="delivered" class="heading-medium">Delivered</h2>
<p>This means the message is in the persons email inbox or on their phone.</p>
<p>We cant tell you if theyve read it to do so would require invasive and unreliable tracking techniques.</p>
<h2 id="does-not-exist" class="heading-medium">Phone number or email address does not exist</h2>
<p>Youre still billed for text messages to non-existant phone numbers.</p>
<p><strong>You need to remove these email addresses or phone numbers from your database.</strong></p>
<a id="not-accepting-messages"></a>
<h2 id="inbox-not-accepting-messages" class="heading-medium">Inbox not accepting messages right now</h2>
<p>This can happen for a number of reasons, eg the users inbox was full.</p>
<p><strong>You can choose to retry these messages later or not.</strong></p>
<h2 id="phone-not-accepting-messages" class="heading-medium">Phone not accepting messages right now</h2>
<p>This means the users phone was full or hasnt been switched on in the last 72 hours.</p>
<p>Youre still billed for these messages.</p>
<p><strong>You can choose to retry these messages later or not.</strong></p>
<h2 id="technical-failure" class="heading-medium">Technical failure</h2>
<p>This means there is a problem with the connection between Notify and our email or text message delivery partners.</p>
<p>Messages still being retried are marked as Sending. We mark messages as Technical failure once weve given up.</p>
<p>You wont be billed for these messages.</p>
<p><strong>You need to retry these messages yourself later.</strong></p>
</div>
</div>
{% endblock %}

View File

@@ -1,52 +0,0 @@
{% extends "withoutnav_template.html" %}
{% block per_page_title %}
Trial mode
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="column-two-thirds">
<h1 class="heading-large">Trial mode</h1>
<p>
All new accounts on Notify start off in trial mode.
</p>
<p>
This means:
</p>
<ul class="list list-bullet">
<li>
you can only send text messages and emails to yourself
</li>
<li>
you can add people to
{% if current_service %}
<a href="{{ url_for('main.manage_users', service_id=current_service.id) }}">your team</a>,
{% else %}
your team,
{% endif %}
then you can send text messages and emails to them too
</li>
<li>
you can only send 50 text messages or emails per day
</li>
<li>
you cant send any letters
</li>
</ul>
<p>
When youre ready we can
{% if current_service %}
<a href="{{ url_for('main.service_request_to_go_live', service_id=current_service.id) }}">remove these restrictions</a>.
{% else %}
remove these restrictions.
{% endif %}
</p>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,170 @@
{% extends "withoutnav_template.html" %}
{% block per_page_title %}
Using GOV.UK Notify
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="column-two-thirds">
<h1 class="heading-large">Using GOV.UK Notify</h1>
<ul class="list">
<li><a href="#trial-mode">Trial mode</a></li>
<li><a href="#message-sending-flow">Email and text message sending flow</a></li>
<li><a href="#receiving-messages">Receiving messages</a></li>
<li><a href="#messagedeliveryandfailure">Delivery and failure</a></li>
</ul>
<h2 id="trial-mode" class="heading-medium">Trial mode</h2>
<p>
All new accounts on Notify start off in trial mode.
</p>
<p>
This means:
</p>
<ul class="list list-bullet">
<li>
you can only send text messages and emails to yourself
</li>
<li>
you can add people to
{% if current_service %}
<a href="{{ url_for('main.manage_users', service_id=current_service.id) }}">your team</a>,
{% else %}
your team,
{% endif %}
then you can send text messages and emails to them too
</li>
<li>
you can only send 50 text messages or emails per day
</li>
<li>
you cant send any letters
</li>
</ul>
<p>
When youre ready we can
{% if current_service %}
<a href="{{ url_for('main.service_request_to_go_live', service_id=current_service.id) }}">remove these restrictions</a>.
{% else %}
remove these restrictions.
{% endif %}
</p>
<h2 id="message-sending-flow" class="heading-medium">Email and text message sending flow</h2>
<img
src="/static/images/message-sending-flow.svg"
alt="A picture of the sending flow of messages in Notify, showing the three states of Sending, Delivered, And Failed. Also shows the next
steps when messages fail, deleting data and trying a new channel for permanent failures, and trying again or trying a new channel for
temporary failures"
style="width: 100%;"
>
<h3 class="heading-small">Resending failed messages</h3>
<p>If a message fails because the inbox or phone isnt accepting messages right now then its up to you to decide if you want to send the message again or not.</p>
<p>Notify attempts to send messages for up to 72 hours before it returns that status.</p>
<h3 class="heading-small">Using multiple channels</h3>
<p>If your user has provided you with multiple contact channels, you should send messages to the channel theyve chosen as their preference. However there are some scenarios where you might want to send messages to more than one channel:</p>
<ul class="list list-bullet">
<li>If a message fails to be delivered, you could try a different channel</li>
<li>If a message is delivered but the recipient hasnt taken the action they need, you could try a different channel</li>
<li>If you need to urgently contact someone, you could email them and send them a text message at the same time</li>
</ul>
<p>If youre using the Notify API these scenarios could be automated.</p>
<h2 id="receiving-messages" class="heading-medium">Receiving messages</h2>
<p>Replies to emails that youve sent will go directly to the reply-to address that you have set up for your service.</p>
<p>If youre set up to receive text messages then your users can reply to messages youve sent, or can start an interaction by sending you a text message.</p>
<p>Receiving inbound text messages can allow your service users to:</p>
<ul class="list list-bullet">
<li>confirm, cancel or change an appointment</li>
<li>register for a simple service</li>
<li>provide follow-up information for an application</li>
<li>report something</li>
<li>provide feedback</li>
</ul>
<p>Youve then got the option to automate the processing of the messages you receive, or to view them in Notify.</p>
<p>If you automate the processing of text messages you receive, then you should have a manual process in place to deal with messages that cant be automatically processed.</p>
<p>If youd like your service to receive text messages, then <a href="{{ url_for('main.support') }}">let us know</a>.</p>
<h2 id="messagedeliveryandfailure" class="heading-medium">Delivery and failure</h2>
<p>Our delivery states are:</p>
<ul class="list list-bullet">
<li><a href="#sending">Sending</a></li>
<li><a href="#delivered">Delivered</a></li>
<li><a href="#does-not-exist">Phone number or email address does not exist</a></li>
<li><a href="#inbox-not-accepting-messages">Inbox not accepting messages right now</a></li>
<li><a href="#phone-not-accepting-messages">Phone not accepting messages right now</a></li>
<li><a href="#technical-failure">Technical failure</a></li>
</ul>
<h3 id="sending" class="heading-small">Sending</h3>
<p>All messages start in the Sending state.</p>
<p>This means that we have accepted the message. Its waiting in a queue to be sent to our email or text message delivery partners.</p>
<h3 id="delivered" class="heading-small">Delivered</h3>
<p>This means the message is in the persons email inbox or on their phone.</p>
<p>We cant tell you if theyve read it to do so would require invasive and unreliable tracking techniques.</p>
<h3 id="does-not-exist" class="heading-small">Phone number or email address does not exist</h3>
<p>Youre still billed for text messages to non-existant phone numbers.</p>
<p><strong>You need to remove these email addresses or phone numbers from your database.</strong></p>
<a id="not-accepting-messages"></a>
<h3 id="inbox-not-accepting-messages" class="heading-small">Inbox not accepting messages right now</h3>
<p>This can happen for a number of reasons, eg the users inbox was full.</p>
<p><strong>You can choose to retry these messages later or not.</strong></p>
<h3 id="phone-not-accepting-messages" class="heading-small">Phone not accepting messages right now</h3>
<p>This means the users phone was full or hasnt been switched on in the last 72 hours.</p>
<p>Youre still billed for these messages.</p>
<p><strong>You can choose to retry these messages later or not.</strong></p>
<h3 id="technical-failure" class="heading-small">Technical failure</h3>
<p>This means there is a problem with the connection between Notify and our email or text message delivery partners.</p>
<p>Messages still being retried are marked as Sending. We mark messages as Technical failure once weve given up.</p>
<p>You wont be billed for these messages.</p>
<p><strong>You need to retry these messages yourself later.</strong></p>
</div>
</div>
{% endblock %}

View File

@@ -17,7 +17,7 @@ def test_logged_in_user_redirects_to_choose_service(
@pytest.mark.parametrize('view', [
'cookies', 'trial_mode', 'pricing', 'terms', 'delivery_and_failure', 'integration_testing', 'roadmap', 'features'
'cookies', 'using_notify', 'pricing', 'terms', 'integration_testing', 'roadmap', 'features'
])
def test_static_pages(
client,
@@ -25,3 +25,21 @@ def test_static_pages(
):
response = client.get(url_for('main.{}'.format(view)))
assert response.status_code == 200
@pytest.mark.parametrize('view, expected_anchor', [
('delivery_and_failure', 'messagedeliveryandfailure'),
('trial_mode', 'trial-mode'),
])
def test_old_static_pages(
client,
view,
expected_anchor,
):
response = client.get(url_for('main.{}'.format(view)))
assert response.status_code == 301
assert response.location == url_for(
'main.using_notify',
_anchor=expected_anchor,
_external=True
)