NATS4 Mailer Template Variables

From TMMwiki
Jump to: navigation, search
NATS 4
Mailing Admin
The Mailing Admin
Create New Mailer
Email Configuration
The Mailing Queue
Mailer Template Variables
Mass Mailing Template Variables
Common Mailer Examples
Setting Rules

You can use the following variables, grouped by their arrays, on templates in the Skins and Templates Admin and Site Templates that get mailed to affiliates and members. For example, mail_affiliate_on_member_joined or mail_member_change. When testing your changes, make sure that you customize both the regular e-mail template and the _html e-mail template. Unless both forms of the template are properly configured, your e-mails will not be sent.

member

The following variables hold members' information. These are available in mail_member_, mail_owner_, and mail affiliate_on_member_:

  • {$member.loginid} - The affiliate's ID that member was referred from in NATS
  • {$member.status} - the status of the member.
    • 0: Never Joined
    • 1: Active
    • 2: Expired
  • {$member.trial} - whether they are on trial or not.
    • 0: not trial
    • 1: trial
  • {$member.joined} - when they joined
  • {$member.expired} - when they have completely expired (set to 0 until completely expired)
  • {$member.siteid} - site id member signed up under
  • {$member.optionid} - join option id member signed up under
  • {$member.billerid} - biller id member signed up under
  • {$member.rebills} - the time the member will rebill next
  • {$member.custom1} - the custom field in the members admin
  • {$member.custom2}
  • {$member.custom3}
  • {$member.custom4}
  • {$member.custom5}
  • {$member.transaction} - Array of transaction details
  • {$member.transaction.transaction_id} - transaction ID under the subscription in NATS
  • {$member.transaction.biller_transid} - Biller transaction ID reported to NATS with biller short name prepended
  • {$member.transaction.biller_time} - time the transaction occured on biller's side
  • {$member.transaction.server_time} - time the transaction was recorded in NATS
  • {$member.transaction.biller_transid} - transaction ID on the biller's side
  • {$member.transaction.total_transaction_payout} - payout to the affiliate on this transaction
  • {$member.transaction.amount} - calculated amount of transaction in NATS
  • {$member.transaction.biller_amount} - amount of transaction reported by biller
  • {$member.transaction.biller_currency} - currency of biller_amount reported by biller


The following variables hold additional members' information but are only available in mail_member_ and mail_owner_:

  • {$member.memberid} - the id of the member
  • {$member.firstname} - first name of the member
  • {$member.lastname} - last name of the member
  • {$member.address1} - first line of address
  • {$member.address2} - second line of address
  • {$member.zip} - the zip code
  • {$member.city} - city of address
  • {$member.country} - country
  • {$member.state} - state
  • {$member.member_subscription_id} - subscription ID of member in NATS
  • {$member.shipping_firstname} - shipping first name
  • {$member.shipping_lastname} - shipping last name
  • {$member.shipping_address1} - shipping address 1
  • {$member.shipping_address2} - shipping address 2
  • {$member.shipping_zip} - shipping zip code
  • {$member.shipping_city} - shipping city
  • {$member.shipping_country} - shipping country
  • {$member.shipping_state} - shipping state
  • {$member.phone} - member's phone number
  • {$member.xsell_success} - Do Not Use
  • {$member.xsell_message} - the xsell message sent
  • {$member.last_modified} - last time the member was modified
  • {$member.identid} - a unique number that contains information about the campaignid, tourid, siteid, optionid etc.
  • {$member.refurl_lookup_id} An id that identifies the URL that referred the member.
    • Note: This only retrieves the ID number and not the referring URL. To get the URL, use the template function nats_get_refurl.
    • For example: {nats_get_refurl refid=$member.refurl_lookup_id} to set the function, then use the Smarty function: {$nats_refurl} to display it.
  • {$member.last_login} - last time they logged in
  • {$member.stamp} - last time member was updated
  • {$member.username} - the member's username
  • {$member.cryptpass} - the crypted password
  • {$member.ip} - the ip they used to sign up
  • {$member.email} - the email they signed up with
  • {$member.session} - session id of the member in NATS
  • {$member.mailok} - if the member opted in for emails. 1 if yes, 0 for no
  • {$member.flat_price}
  • {$member.first_login} - when they first logged in.
  • {$member.third_party_partner_id} - the id of the third party
  • {$member.cascadeid} - The id for the cascade that the member used to sign up.
  • {$member.cascade_item_id} - The id for the biller in the cascade that the member used to sign up.
  • {$member.token} - The hash that each member of a token site uses to authenticate.
  • {$member.original_username} The member's original username.
  • {$member.renamed} - The date when the member's username was changed.

affiliate

The following variables hold affiliates' information, for affiliates that sign up to your affiliate program. These variables can be used on the mailer templates mail_owner_affiliate_signup and mail_affiliate_on_signup. All of the stored affiliate information can be found in the $affiliate array.

  • {$affiliate.nats}
  • {$affiliate.company}
  • {$affiliate.url}
  • {$affiliate.firstname}
  • {$affiliate.lastname}
  • {$affiliate.email}
  • {$affiliate.nostore_verify_email}
  • {$affiliate.mailok}
  • {$affiliate.icq}
  • {$affiliate.aim}
  • {$affiliate.msn}
  • {$affiliate.username}
  • {$affiliate.password}
  • {$affiliate.nostore_verify_password}
  • {$affiliate.address1}
  • {$affiliate.address2}
  • {$affiliate.city}
  • {$affiliate.state}
  • {$affiliate.zip_code}
  • {$affiliate.country}
  • {$affiliate.tax_id_or_ssn}
  • {$affiliate.payvia}
  • {$affiliate.minimum_payout}
  • {$affiliate.verify}

details.loginid

The details.login array holds the NATS information about an affiliate who referred a specific member. These variables can be used on the mailer templates beginning with the mail_member_, mail_owner_, and mail_affiliate_ prefixes.

  • {$details.loginid.loginid} - affiliate's ID in NATS
  • {$details.loginid.username} - affiliate's username
  • {$details.loginid.password} - affiliate's password
  • {$details.loginid.deleted} - if the affiliate is deleted or not.
    • 0 - not deleted
    • 1 - deleted
  • {$details.loginid.type} - ID access level of the affiliate
  • {$details.loginid.skinid} - ID of the skin the affiliate is using
  • {$details.loginid.payvia_type_id} - ID of the payvia method affiliate is using
  • {$details.loginid.status} - status of the affiliate
    • 0: Active
    • 1: Disabled
    • 2: Banned
    • 3: Wait on Verify
    • 4: Pending
    • 5: Denied
  • {$details.loginid.pass_hash} - password hash
  • {$details.loginid.join_date} - when the affiliate joined
  • {$details.loginid.inhouse} - if the affiliate is an inhouse account or not
    • 0 - not inhouse
    • 1 - inhouse
  • {$details.loginid.firstname} - affiliate's first name
  • {$details.loginid.lastname} - affiliate's last name
  • {$details.loginid.email} - affiliate's email
  • {$details.loginid.date_posted}
  • {$details.loginid.last_login} - when the affiliate last logged in
  • {$details.loginid.last_login_ip} - the IP the affiliate last logged in from
  • {$details.loginid.reviewed} - if the affiliate is manually marked as reviewed
    • 0 - not reviewed
    • 1 - reviewed
  • {$details.loginid.minimum_payout} - the minimum payout the affiliate set for their payvia type
  • {$details.loginid.bonus}
  • {$details.loginid.verify}
  • {$details.loginid.reason}
  • {$details.loginid.unencoded}
  • {$details.loginid.startpage}
  • {$details.loginid.rep_baseline}
  • {$details.loginid.company} - the company of the affiliate
  • {$details.loginid.url} - the url of the affiliate
  • {$details.loginid.tel} - the telephone number of the affiliate
  • {$details.loginid.icq} - ICQ number of affiliate
  • {$details.loginid.aim} - AIM username of affiliate
  • {$details.loginid.msn} - MSN username of affiliate
  • {$details.loginid.address1} - address of affiliate
  • {$details.loginid.address2}
  • {$details.loginid.city} - city of affiliate
  • {$details.loginid.state} - state of affiliate
  • {$details.loginid.country} - country of affiliate
  • {$details.loginid.zip_code} - zip code of affiliate
  • {$details.loginid.tax_id_or_ssn} - tax ID or SSN of the affiliate
  • {$details.loginid.invoicer}
  • {$details.loginid.req_docs} - if affiliate is marked as having the required documentation
  • {$details.loginid.w9} - if the affiliate has a W9 uploaded or not
    • 0 - no W9
    • 1 - has W9
  • {$details.loginid.mailok} - if affiliate opted in for emails or not
    • 0 - not opted in
    • 1 - opted in
  • {$details.loginid.trust_level}
  • {$details.loginid.new_notification}
  • {$details.loginid.default_campaign}
  • {$details.loginid.default_program}
  • {$details.loginid.default_site}
  • {$details.loginid.pv_instant}
  • {$details.loginid.payout_approval}


biller

The details.billerid array holds information about the biller the member signed up under. These variables can be used on the mailer templates beginning with the mail_member_, mail_owner_, and mail_affiliate_on_member_ prefixes.

  • {$details.billerid.billerid} - ID of the biller in NATS
  • {$details.billerid.networkid}
  • {$details.billerid.biller} - the name of the biller
  • {$details.billerid.last_poll}
  • {$details.billerid.form_method}
  • {$details.billerid.deleted}


details.campaignid

The details.campaignid array holds information about the campaign that the member signed up under. These variables can be used on the mailer templates beginning with the mail_member_, mail_owner_, and mail_affiliate_on_member_ prefixes.

  • {$details.campaignid.campaignid}
  • {$details.campaignid.loginid}
  • {$details.campaignid.name}
  • {$details.campaignid.description}
  • {$details.campaignid.created_date}
  • {$details.campaignid.hide}
  • {$details.campaignid.old_campaignid}


details.programid

The details.programid array holds information about the program that the member signed up under. These variables can be used on the mailer templates beginning with the mail_member_, mail_owner_, and mail_affiliate_on_member_ prefixes.

  • {$details.programid.programid}
  • {$details.programid.program}
  • {$details.programid.hidden}
  • {$details.programid.type}
  • {$details.programid.name}
  • {$details.programid.extended_payout}
  • {$details.programid.max_ratio}
  • {$details.programid.fallbackid}
  • {$details.programid.addstr}
  • {$details.programid.deleted}
  • {$details.programid.abi_paycom_prefix}
  • {$details.programid.abi_paycom_perc}
  • {$details.programid.deduct_credits}
  • {$details.programid.deduct_chargebacks}
  • {$details.programid.deduct_voids}
  • {$details.programid.deduct_insufficient}
  • {$details.programid.verify_hash}
  • {$details.programid.verify_initial}
  • {$details.programid.retro_payout}
  • {$details.programid.hide_rebills}
  • {$details.programid.hide_joins}
  • {$details.programid.description}
  • {$details.programid.thumb}


details.siteid

The details.siteid array holds information about the site the member signed up under. These variables can be used on the mailer templates beginning with the mail_member_, mail_owner_, and mail_affiliate_on_member_ prefixes.

  • {$details.siteid.siteid}
  • {$details.siteid.networkid}
  • {$details.siteid.site}
  • {$details.siteid.deleted}
  • {$details.siteid.name}
  • {$details.siteid.type}
  • {$details.siteid.hidden}
  • {$details.siteid.date_added}
  • {$details.siteid.date_live}
  • {$details.siteid.network}
  • {$details.siteid.reuse_active}
  • {$details.siteid.no_personal_member_info}
  • {$details.siteid.mobile_tour}
  • {$details.siteid.site_group_id}


details.tourid

The details.tourid array holds information about the tour the member signed up under. These variables can be used on the mailer templates beginning with the mail_member_, mail_owner_, and mail_affiliate_on_member_ prefixes.

  • {$details.tourid.tourid}
  • {$details.tourid.tour}
  • {$details.tourid.siteid}
  • {$details.tourid.networkid}
  • {$details.tourid.name}
  • {$details.tourid.url}
  • {$details.tourid.linkdomain}
  • {$details.tourid.description}
  • {$details.tourid.thumb}
  • {$details.tourid.thumb_ext}
  • {$details.tourid.third_party_partner_id}
  • {$details.tourid.spartaurl}
  • {$details.tourid.denyurl}
  • {$details.tourid.denypost}
  • {$details.tourid.approvalurl}
  • {$details.tourid.approvalpost}
  • {$details.tourid.rebillpost}
  • {$details.tourid.creditpost}
  • {$details.tourid.chargebackpost}
  • {$details.tourid.insufficient_fundpost}
  • {$details.tourid.voidpost}
  • {$details.tourid.userpost}
  • {$details.tourid.userman}
  • {$details.tourid.expirepost}
  • {$details.tourid.custom}
  • {$details.tourid.admin_signup_email}
  • {$details.tourid.upgradeurl}
  • {$details.tourid.upgradepost}
  • {$details.tourid.allowed_lang}
  • {$details.tourid.alternativeurl}
  • {$details.tourid.allowed_lang_track_raw}
  • {$details.tourid.allowed_lang_track_unq}
  • {$details.tourid.hidden}
  • {$details.tourid.mail_member_joined}
  • {$details.tourid.mail_member_cancelled}
  • {$details.tourid.mail_member_rebilled}
  • {$details.tourid.mail_member_credited}
  • {$details.tourid.mail_member_chargedback}
  • {$details.tourid.mail_member_insufficient}
  • {$details.tourid.mail_member_voided}
  • {$details.tourid.upgradedenyurl}
  • {$details.tourid.upgradedenypost}
  • {$details.tourid.prejoinpost}
  • {$details.tourid.byo_owner}
  • {$details.tourid.byo_program}
  • {$details.tourid.byo_owner_only}
  • {$details.tourid.deleted}
  • {$details.tourid.niche}
  • {$details.tourid.strack_programid}
  • {$details.tourid.mail_member_change}
  • {$details.tourid.change_detailspost}


details.optionid

The details.optionid array holds information about the join option the member signed up under. These variables can be used on the mailer templates beginning with the mail_member_, mail_owner_, and mail_affiliate_on_member_ prefixes.

  • {$details.optionid.optionid}
  • {$details.optionid.initial}
  • {$details.optionid.initial_days}
  • {$details.optionid.rebill}
  • {$details.optionid.rebill_days}
  • {$details.optionid.name}
  • {$details.optionid.packageid}
  • {$details.optionid.no_old_members}
  • {$details.optionid.hidden}
  • {$details.optionid.initial_free}
  • {$details.optionid.package_upgrade_allowed}
  • {$details.optionid.token_rebuy_allowed}


details.countryid

If country information is available, you can also use the following variables in details.countryid array. These variables can be used on the mailer templates beginning with the mail_member_, mail_owner_, and mail_affiliate_on_member_ prefixes.

  • {$details.countryid.short} - two letter abbreviation of country
  • {$details.countryid.name} - full name of country

Profits

TRUE PROFIT CALCULATIONS

As of version 4.0.71.2

Profit calculation(in mail_owner_joined template):
{math equation="(y-x-z)/100" x=$member.cost_charge y=$member.transaction.amount z=$member.transaction.total_transaction_payout assign='profit'}
Profit: {$profit|string_format:"%.2f"}

In this equation the variable Z calculates the affiliate payouts for ALL affiliates including site partners etc.