Difference between revisions of "NATS4 Upsell Plus"
Line 41: | Line 41: | ||
* <code>additional[approvalposturl]=<url>?<query_string></code> - url to send a post to if ANY of the upsells are successful (this is in addition to not instead of the postback url defined in the NATS site admin) | * <code>additional[approvalposturl]=<url>?<query_string></code> - url to send a post to if ANY of the upsells are successful (this is in addition to not instead of the postback url defined in the NATS site admin) | ||
* <code>additional[denialposturl]=<url>?<query_string></code> - url to send a post to if NONE of the upsells are successful (this is in addition to not instead of the postback url defined in the NATS site admin) | * <code>additional[denialposturl]=<url>?<query_string></code> - url to send a post to if NONE of the upsells are successful (this is in addition to not instead of the postback url defined in the NATS site admin) | ||
+ | |||
+ | You will also need to make sure you have the following code on your upsellplus templates | ||
+ | <pre> | ||
+ | {if !empty($smarty.request.additional) && is_array($smarty.request.additional)} | ||
+ | {foreach from=$smarty.request.additional key=additional_key item=additional_val} | ||
+ | <input type="hidden" name="additional[{$additional_key|escape:'htmlall'}]" value="{$additional_val}"/> | ||
+ | {/foreach} | ||
+ | {/if} | ||
+ | </pre> | ||
== Site Templates == | == Site Templates == |
Revision as of 17:08, 28 May 2020
Upsell Plus is a feature in NATS4 that allows you to offer your members incentives to sign up for other sites after they have joined one of your sites. In order to complete the Upsell Plus process, the member will have to click on a link that you provide for them.
Creating an Upsell Link
If you want to offer the Upsell Plus feature to your members, first create an upsell in the Upsells Admin, then provide your member with a link to your Upsell Plus option. This supports one of two link formats:
Preferred format:
- https://<linkdomain>/signup/upsellplus.php?site=<siteid>&username=<username>
- Siteid and Username is the preferred method
Alternative format:
- https://<linkdomain>/signup/upsellplus.php?memberid=<memberid>&natssess=<nats_session>&site=<siteid>
For all links, replace <linkdomain> with the linkdomain of the site that is offering this upsell and <siteid> with the site ID this member has already joined under. Replace <memberid>, <nats_session>, and <username> in the above examples with the member ID, session ID, and username of the member, respectively. Although both of the example formats will work with Upsell Plus, the first format is preferred.
You can also specify multiple sites to check through (to use with network member sites, for example):
- https://<linkdomain>/signup/upsellplus.php?siteids=<siteid>,<siteid2>,<siteid3>&username=<username>
Optional Variables
Upsell Plus supports the use of additional variables to get certain effects from your Upsell Plus sales:
- If you want members to be automatically submitted for upsells, add &upsellid=<upsellid>&email=<email>&submit=1 to the end of the Upsell Plus URL. Replace <email> with the e-mail address of the member and <upsellid> with the Outgoing Upsell ID of the upsell to purchase, found in the Upsells Admin.
- If you want any of the available upsell options on the join form to be pre-checked, add &upsellids=<upsellid_list> to the end of the Upsell Plus URL. Replace <upsellid_list> with a comma-separated list of ID numbers for the upsell options you want to be automatically checked.
- Some billers also support passing additional custom variables by adding &member_extra[<upsellid>][<customvariable>]=<customvalue> to the Upsell Plus URL. Billers that currently support this are:
- To use autocampaigns with internal upsells, add &autocamp=campaign to the Upsell Plus URL. NOTE: For this to work, you must set $config['ALLOW_REQUEST_AUTOCAMP']=1 in your config.php file and add "autocamp" as a hidden variable in the gateway_upsell and thirdparty_upsell templates:
<input type="hidden" name="autocamp" value="{$smarty.request.autocamp}">
Redirect and Postback URLs
Note: this feature is currently in development
Upsell Plus supports overriding approval and denial redirect urls as well as additional approval and denial postback urls. This feature will work for any biller that does not require a redirect to their system to complete the upsell process. To use this feature, you will need to add the additional[] array to your /signup/upsellplus.php link. For example, adding &additional[approvalurl]=https://somedomain.com/sopmepage.html
will redirect the member to the https://somedomain.com/sopmepage.html url if ANY of the upsells are successful instead of showing the NATS page_upsell_approval template. Here are all of the available variables:
additional[approvalurl]=<url>?<query_string>
- url to redirect to if ANY of the upsells are successfuladditional[denialurl]=<url>?<query_string>
- url to redirect to if NONE of the upsells are successfuladditional[approvalposturl]=<url>?<query_string>
- url to send a post to if ANY of the upsells are successful (this is in addition to not instead of the postback url defined in the NATS site admin)additional[denialposturl]=<url>?<query_string>
- url to send a post to if NONE of the upsells are successful (this is in addition to not instead of the postback url defined in the NATS site admin)
You will also need to make sure you have the following code on your upsellplus templates
{if !empty($smarty.request.additional) && is_array($smarty.request.additional)} {foreach from=$smarty.request.additional key=additional_key item=additional_val} <input type="hidden" name="additional[{$additional_key|escape:'htmlall'}]" value="{$additional_val}"/> {/foreach} {/if}
Site Templates
Once you have set up your upsell options, your Upsell Plus URL, and any optional variables you wish to add to the process, you will need to modify new site templates if you want to customize the design of the Upsell Plus pages visited by your members:
- gateway_upsell - Displayed to the member when they click an upsellplus link if their original subscription was purchased through a gateway biller
- thirdparty_upsell - Displayed to the member when they click an upsellplus link if their original subscription was purchased through a third-party biller
- page_upsell_approval - Displayed to the member if their upsell is approved
- page_upsell_denial - Displayed to the member if their upsell is denied
There is also a _mobile version for each of the above templates, which is displayed to the member if NATS detects they are using a mobile device.
Additional Security
As of NATS version 4.1, Upsell Plus offers additional features that you can use to secure your member upsells. Member authentication strings allow you to require a verification string with member upsell submissions in order to prevent unwanted upsell attempts from outside sources, and traffic throttling allows you to prevent unwanted repeated access to your Upsell Plus pages.
Authentication Strings
This feature is disabled by default. If you want to enable this feature for your Upsell Plus transactions, enable the MEMBER_STRING_AUTH_UPSELLPLUS setting in the "Security" section of the Configuration Admin.
Once you have activated this setting, use the GET /member/authstring REST API endpoint to get the correct auth string for the member you want to process an upsell for. Please see our REST API Get Member Auth String wiki article for more information on this process.
This function will return the necessary auth string for the member to authenticate their Upsell Plus attempts. Include this auth string in the link for your member as shown in the example below:
https://<linkdomain>/signup/upsellplus.php?site=<siteid>&username=<username>&authstring=<authstring>
Throttling
Throttling is a security setting available in NATS 4.1 that allows you to temporarily lock out incoming traffic from a specific IP address if they submit too many requests to certain pages in NATS.
You can use the Throttling feature to help secure your upsellplus.php page, preventing surfers from forcing transactions without the correct auth string. Throttling settings are available in the "Security" section of the Configuration Admin.
Please visit our Throttling wiki article for general information about this feature.