Test Data

Chargify provides you with a comprehensive testing area to develop your subscriber communications. Within Chargify’s email editor, we give you the following options:

  • Ability to preview subscriber emails
  • Options to customize the subscriber data for usage in the preview
  • Ability to send preview emails to the email address on file for the account
  • Edit emails on the fly using our WYSIWYG editor

Email Formatting

The email editor requires that you use strict XML formatting, versus HTML. For more information on email formatting, please see our documentation on what formatting is acceptable.

Preview Subscriber Emails

When you open the editor for your subscriber emails, Chargify provides you with a starting place and a set of draft communications. This template is the basis of information to distribute to your subscribers.

Use these templates as a starting point. Customize the emails to include all the information necessary to keep your subscribers happy and informed!

This screen shows you two sections, the email body editor, on the left, and the preview pane, on the right:

Editing Examples

In the example below, we’ve added a few attributes:

  • Mailing address
  • A link to a fictitious account update URL

Please take notice of the usage of <br> for creating line breaks.

The mailing address information was added to the body of the email by adding variables from our email templates list.

We see that your current mailing address is:<br>
{{customer.address}}<br>
{{customer.city}}, {{customer.state}} {{customer.zip}}

Next up, we’ll discuss how to customize the test data for a more accurate depiction of your subscriber communications.

Customization of Test Data

Chargify pre-populates the test data editor with many variables to use during testing. Over time, we expect the needs of a pre-determined set of data to change. Therefore, we allow you to customize the test data to your needs.

In the example below, we have sue.smith@example.com as the current email address on file. However we’d like to update the test data to match our current needs:

  • To edit the standard information of the body of the email, select Test Data in the upper right hand corner of the window.
  • Change the field contents to the new test data
  • Select Save, then Back

Here, we’ve updated the test data value of the email field to joe.smith@example.com. This is reflected in the preview pane as well, which is depicted in the next screen grab, under Preview Emails.

Preview Emails

Once you’re happy with your edit, you can send a copy of the newly edited email to the email on file for current user. Select Send Preview to proceed.

Liquid Previewing

Chargify allows you to use liquid syntax in your subscriber emails. The link above will show you a few use cases for common questions we hear from merchants. As you construct your test emails, you may find that you would like to change the test data to produce different scenarios with your liquid syntax.

In the example below, we see that the liquid syntax is looking at the existing balance_in_cents for the subscription. If the balance_in_cents is greater than 0, then the specified text will be displayed in the email.

You can change the value of balance_in_cents in the test data. The result with the liquid syntax will be as follows:

Helpful Tips

The defined fields in the editor are only for previewing purposes and will not be used when sending the email. It is also possible to produce scenarios that are not possible in the Chargify system.

Also, not all fields are available for editing will display in email templates. Some fields are used to populate the supported fields. For more information regarding supported fields please check the documentation on email templates.

Test Data

Below you’ll find a complete table of all of the data that is configurable in the email aeditor. Please keep in mind that once a value is changed for the test data, there is no option to revert to the original data set.

Email Field Default Value Description
customer.address 123 Market St Customer street address
customer.address_2 Unit 4 Customer street address, second line
customer.billing_portal? No Is the billing portal enabled for the subscriber? yes/no
customer.city Boston Customer city
customer.country US Customer country
customer.created_at Current day Timestamp of when the customer was created
customer.email sue.smith@example.com Email address of customer
customer.first_name Sue Customer first name
customer.id 1 ID of the customer
customer.last_name Smith Customer last name
customer.organization Initrode Organization of the customer
customer.phone 1-555-555-1234 Phone number of the customer
customer.reference Sue 222 Reference value for the customer
customer.state MA Customer state
customer.zip 02116 Customer zip
payment_profile.bank_account_holder_type personal Type of bank account. Personal or business.
payment_profile.bank_account_type checking Type of bank account. Checking or savings.
payment_profile.bank_name Chase Name of bank where ACH information originates
payment_profile.billing_address 123 Market St Billing street address
payment_profile.billing_address_2 Unit 4 Billing street address, line 2
payment_profile.billing_city Boston Billing city
payment_profile.billing_country US Billing country
payment_profile.billing_state MA Billing state
payment_profile.billing_zip 02116 Billing zip code
payment_profile.brand Visa Card type/brand
payment_profile.card_type visa Card type/brand
payment_profile.expiration_month 02 Card expiration month
payment_profile.expiration_year 2021 Card expiration year
payment_profile.first_name Sue Payment profile first name
payment_profile.id 2 Payment profile ID
payment_profile.last_name XXXXXXX1111 Payment profile last name
payment_profile.masked_bank_account_number XXXX XXXX XXXX 1 Masked bank account number
payment_profile.masked_bank_routing_number XXXX XXXX XXXX 1 Masked bank routing number
payment_profile.masked_card_number XXXX XXXX XXXX 1 Masked card number
payment_profile.method_masked_number XXXX XXXX XXXX 1 Masked card number
payment_profile.method_type card Payment profile method
payment_profile.verification_url https://123.com/verify/123/456 URL to verify ACH account
payment_profile.verified? No Is the ACH account verified?
payment.amount $10.89 Payment amount
payment.amount_in_cents 1089 Payment amount in cents
payment.card_number XXXX XXXX XXXX 1 Card number used for current payment
payment.card_type visa Card type used for current payment
payment.gateway_transaction_id transaction-123 Gateway transaction ID, generated by the gateway
payment.memo Payment of $10.89 Payment memo
payment.success No Was the payment successful?
payment.test No Was the payment made when the site was in test mode?
product_family.name Acme Online Product family name
product.accounting_code AC 1111 Account code of the product
product.archived_at 31 December, 1969 Timestamp when the product was archived
product.archived? No Is the product archived?
product.currency USD The current currency of the site
product.description A delightful free product Description of the product
product.expiration_duration 1 month Product expiration duration
product.expires? No Does the product expire?
product.handle free Product API handle
product.id 2 Product ID
product.initial_charge $0.00 Initial setup charge for the current product
product.initial_charge_in_cents 0 Initial setup charge for the product in cents
product.initial_charge? No Is there an initial charge associated with the product
product.interval 1 Product renewal interval
product.interval_unit month Product renewal interval unit
product.name Free Product name
product.offers_trial? Yes Does the product offer a trial?
product.price $10.99 Current price of the product
product.price_in_cents 1099 Current price of the product in cents
product.qualified_name Acme Online - Free Qualified name of the product
product.recurring_duration 1 month Product recurring duration
product.request_credit_card? Yes Does the product purchase request a credit card?
product.require_credit_card? Yes Does the product purchase require a credit card?
product.trial_duration 1 month Duration of the trial of the product
product.trial_interval 30 Duration of the trial of the product
product.trial_interval_unit day Unit of measure for the trial period
product.trial_price $2.99 Product trial price
product.trial_price_in_cents 299 Product trial price in cents
product.update_return_url https://yoursite.example.com?update=true&return=true URL provided to the subscriber after successful update via self-service page
subscription.activated_at Current day Timestamp in which the subscription was activated at
subscription.agreement_terms by accepting this you agree that Acme Inc may charge your account Agreement terms associated with the subscription, as provided on the Public Signup Page
subscription.authorizer_first_name Jane First name of authorizing party for the ACH/bank account on file
subscription.authorizer_last_name Doe Last name of authorizing party for the ACH/bank account on file
subscription.balance_in_cents 1001 Subscription’s current balance in cents
subscription.bank_account_on_file? No Is there a bank account / ACH information on file for the subscription currently?
subscription.billing_portal_management_url http://billing-portal.example.com/management/1231321321 Billing Portal management URL
subscription.billing_portal? No Is the Billing Portal currently enabled for the subscriber?
subscription.cancel_at_end_of_period Yes Is the subscription configured to cancel at the end of the billing period?
subscription.canceled_at Current day Timestamp in which the subscription was canceled at
subscription.cancellation_message   Cancellation message associated with the cancellation
subscription.card_on_file? Yes Is there a credit card on file for the subscription?
subscription.coupon_code FREESTUFF Current coupon code applied to the subscription
subscription.current_billing_amount $10.99 Current amount due as per the “next billing amount”
subscription.current_billing_amount_in_cents 1099 Current amount due as per the “next billing amount” in cents
subscription.current_period_ends_at Current day Timestamp of when the current billing period ends at
subscription.current_period_starts_at Current day Timestamp of when the current billing period starts at
subscription.estimated_renewal_amount $10.99 Estimated renewal amount formatted in currency
subscription.estimated_renewal_amount_in_cents 1099 Estimated renewal amount in cents
subscription.expires_at Current day Timestamp of the subscription’s expiration
subscription.expires_at_end_of_period? Yes Does the subscription have an expiration date?
subscription.id 1 ID of the subscription
subscription.payment_collection_method automatic Payment method of the subscription. Can be automatic or invoice.
subscription.payment_method_on_file? Yes Is there a valid payment method on file
subscription.referral_code REFCODE123 Subscription’s referral code
subscription.state active Subscriber’s current subscription state
subscription.subscriber_name Sue Smith Subscriber’s full name
subscription.total_revenue $100,000.00 Total revenue of the subscription in cents
subscription.total_revenue_in_cents 10099 Total revenue of the subscription in cents
subscription.trial_ended_at Current day Timestamp when the subscription’s trial ended at in the past (if any)
subscription.trial_ends_at Current day Timestamp when the subscription’s trial ends in the future (if any)
subscription.trial_started_at Current day Timestamp when the subscription’s trial began (if any)
update_url http://example.com/update/subscription URL for the self-service page associated with the customer