Skip to content

Commit

Permalink
Merge pull request #1257 from GSA/974-content-personalization
Browse files Browse the repository at this point in the history
974 - Content updates on Pricing and Guidance pages
  • Loading branch information
ccostino authored Mar 13, 2024
2 parents e914885 + e1981d3 commit ae08461
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 18 deletions.
6 changes: 4 additions & 2 deletions app/main/views/send.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,9 @@ def _check_messages(service_id, template_id, upload_id, preview_row):

if preview_row < len(recipients) + 2:
template.values = recipients[preview_row - 2].recipient_and_personalisation
simplifed_template.values = recipients[preview_row - 2].recipient_and_personalisation
simplifed_template.values = recipients[
preview_row - 2
].recipient_and_personalisation
elif preview_row > 2:
abort(404)

Expand Down Expand Up @@ -863,7 +865,7 @@ def _check_notification(service_id, template_id, exception=None):
back_link_from_preview=back_link_from_preview,
choose_time_form=choose_time_form,
**(get_template_error_dict(exception) if exception else {}),
simplifed_template=simplifed_template
simplifed_template=simplifed_template,
)


Expand Down
13 changes: 8 additions & 5 deletions app/templates/views/guidance/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h2 class="padding-top-1" id="format-content">Format your content</h2>
<h3>To create and format your message</h3>
<ol class="list">
<li>All messages start from a template</li>
<li>Click <a href={{ url_for('.choose_template', service_id=current_service.id) }}>Send Messages</a>. Youll see existing templates.</li>
<li>Click "<a href={{ url_for('.choose_template', service_id=current_service.id) }}>Send Messages</a>". You'll see existing templates.</li>
<li>Add a new template or choose an existing template and select Edit.</li>
</ol>

Expand Down Expand Up @@ -69,7 +69,7 @@ <h3>About link-shortening services</h3>
<h2 class="padding-top-1" id="personalize-content">Personalize your content</h2>
<p>Personalizing your content can increase response rates and help the recipient know the text is legitimate.</p>
<ul class="list list-bullet">
<li>Including a persons first name increases response rates.</li>
<li>Including a person's first name increases response rates.</li>
<li>Specific details such as time and location of an appointment or where suspected fraud use occurred encourages action.</li>
</ul>

Expand All @@ -82,7 +82,10 @@ <h3>To personalize your content</h3>

<h4>Example</h4>
<p>To personalize with the recipient's first name and include a reference number:</p>
<p class="padding-2 bg-base-lightest">State WIC: Hello ((first name)), your reference is ((ref number)). Please provide this number when you call 123-123-1234 to make an appointment.</p>
<p class="padding-2 bg-base-lightest">State WIC: Hello ((first name)), your reference is ((ref number)). Please provide this number when you call 555-123-1234 to make an appointment.</p>

<p>Note that variations in the length of personalized content can impact the length of specific messages, and may affect
the number of parts used.</p>

{# Add conditional content #}
<h2 class="padding-top-1" id="conditional-content">Add conditional content</h2>
Expand All @@ -106,7 +109,7 @@ <h4>Examples</h4>
<li>
If you want to make people who are homebound aware of the option of virtual visits (but not other message recipients):
</br>
<p class="padding-2 bg-base-lightest">State Medicaid: Please call 123-123-1234 to schedule an appointment. ((homebound??Virtual visits are available.))</p>
<p class="padding-2 bg-base-lightest">State Medicaid: Please call 555-123-1234 to schedule an appointment. ((homebound??Virtual visits are available.))</p>
</li>
<li>
If you want to send a messages in different languages to different recipients:
Expand Down Expand Up @@ -231,7 +234,7 @@ <h3>Examples</h3>
</li>
<li>Auto-response text:
</br>
<p class="padding-2 bg-base-lightest">State Agency: This number is unmonitored. To contact us, call us at 123-123-1234. We will never ask for personal details
<p class="padding-2 bg-base-lightest">State Agency: This number is unmonitored. To contact us, call us at 555-123-1234. We will never ask for personal details
in a text. If you have questions about how to protect your privacy, see statename.gov/privacy.</p>
</li>
</ol>
Expand Down
21 changes: 12 additions & 9 deletions app/templates/views/pricing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
{% extends "content_template.html" %}

{% block per_page_title %}
Pricing
Message parts
{% endblock %}

{% block content_column_content %}

<h1 class="font-body-2xl margin-bottom-3">Pricing</h1>
<h1 class="font-body-2xl margin-bottom-3">Message parts</h1>

{{ content_metadata(
data={
"Last updated": "January 25, 2024"
"Last updated": "February 5, 2024"
}
) }}

Expand All @@ -30,7 +30,8 @@ <h1 class="font-body-2xl margin-bottom-3">Pricing</h1>
</ul>

<h3 class="font-body-lg" id="long-text-messages">Long text messages</h3>
<p>If a text message is longer than 160 characters (including spaces), it counts as more than one message part.</p>
<p>If a text message is longer than 160 characters (including spaces and service name), it counts as more than one message
part.</p>

<div class="bottom-gutter-3-2">
{% call mapping_table(
Expand All @@ -55,6 +56,13 @@ <h3 class="font-body-lg" id="long-text-messages">Long text messages</h3>
{% endcall %}
</div>

<h3 class="font-body-lg" id="Personalization">Personalization</h3>
<p>Personalization can change the length of messages. For example, if you are personalizing with a first name, Fred is
significantly shorter than Alexander. When you are evaluating how long a message is, you need to consider variations in
message length based on personalization.</p>
<p>Before you send messages, Notify will let you know how many messages you are sending, the number of parts you are using,
and the number of parts you’ll have left.</p>

<h3 class="font-body-lg" id="symbols">Signs and symbols</h3>

<p>
Expand Down Expand Up @@ -158,9 +166,4 @@ <h3 class="font-body-lg" id="accents">Accents and accented characters</h3>
{% endcall %}
</div>

<h3 class="font-body-lg" id="international-numbers">Trial mode</h3>
<p>When a new service is added, it will start in <a href="/using-notify/trial-mode">trial mode</a>. Moving a service out of trial mode is subject to approval by
the Notify.gov team. Additional unique services may be added, although moving each service out of trial mode is subject
to approval by the Notify.gov team.</p>

{% endblock %}
6 changes: 4 additions & 2 deletions tests/app/main/views/test_send.py
Original file line number Diff line number Diff line change
Expand Up @@ -2612,8 +2612,10 @@ def test_preview_notification_shows_preview(
session["placeholders"] = {}

page = client_request.post(
"main.preview_notification", service_id=service_one["id"], template_id=fake_uuid,
_expected_status=200
"main.preview_notification",
service_id=service_one["id"],
template_id=fake_uuid,
_expected_status=200,
)
assert page.h1.text.strip() == "Preview"
assert (page.find_all("a", {"class": "usa-back-link"})[0]["href"]) == url_for(
Expand Down

0 comments on commit ae08461

Please sign in to comment.