Skip to content
Choose a tag to compare

Template test model storage

@derekrushforth derekrushforth released this
· 56 commits to master since this release
Choose a tag to compare

You can now test your templates using a custom model! Pulling your templates will store each template's model inside the TestRenderModel key in the metadata JSON file:

  "Name": "Receipt",
  "Alias": "receipt",
  "Subject": "Receipt for XYZ Widgets",
  "TemplateType": "Standard",
  "LayoutTemplate": "basic",
  "TestRenderModel": {
    "name": "name_Value",
    "credit_card_brand": "credit_card_brand_Value",
    "credit_card_last_four": "credit_card_last_four_Value",
    "billing_url": "billing_url_Value",
    "receipt_id": "receipt_id_Value",
    "date": "date_Value",
    "receipt_details": [
        "description": "description_Value",
        "amount": "amount_Value"
    "total": "total_Value",
    "support_url": "support_url_Value",
    "action_url": "action_url_Value",
    "expiration_date": "expiration_date_Value",
    "product_name": "product_name_Value"

You can then enter your own test data and use the preview command to see how your templates look:

2020-01-22 16-51-02 2020-01-22 16_52_40