Affiliate Marketing Using Post Affiliate Pro
  • 26 May 2022
  • 9 Minutes to read
  • Dark
    Light

Affiliate Marketing Using Post Affiliate Pro

  • Dark
    Light

Article Summary

Getting Started

There are several points of integration that you can leverage between your VT System and Post Affiliate Pro (PAP) and this article will explain how those work and show you how to set them up.

  • Integration Point A) User creation/updating from your VT System to your PAP account. This means that as users are created in your VT System, we will make an API call to Post Affiliate Pro (PAP) and create the Affiliate using their First Name, Last Name, and Email address. Keep in mind that this creates a “default” affiliate type, so you will need to know how you want the ‘default’ affiliate configured under your PAP settings for this to reflect your desired outcome. One of these details includes whether you want the “default” affiliate to have a status of “Pending” or “Approved.”
  • Integration Point B) Toggle the Affiliate from “Pending” to “Approved” based on any usage event from your VT System. Some companies want affiliates to be “Approved” instantly upon initial creation, however, if you are having an affiliate created in PAP in a “Pending” status, then you can have a usage event, such as; completing a certain course, or courses, and that can make an API call to PAP and toggle the affiliate from “Pending” to “Approved.”
  • Integration Point C) Single Sign On for your affiliates from your VT System over to PAP. You can create a link pretty much anywhere on your VT System that when clicked, an API call will be made and your user will be taken to the “Affiliate Dashboard” in PAP. therefore you never need to have a Sign In screen or URL for PAP for your Affiliates. The username from LSVT will be the same username in PAP. In addition, if the username is updated in LSVT, it will also update the username in PAP.
  • Integration Point D)Track the sales of one time and recurring purchases for the affiliates.
    To do this we will show you the few lines of code that need to be implemented on the “landing” page or “transactional” page where the payment is taken and in your Stripe account.

Before we go through the steps for each integration point, however, there are a few things you’ll need first to get started:

  1. You will need to have at least the “Ultimate” account type (not “Pro”) with PAP and at the time of this writing, the cost is $197/mo for PAP. This plan, like every plan, comes with a 14 day free trial and there are no initial setup fees. After enrolling in this plan, you should receive a notification asking you to verify your email address.
    You’ll also need to note where the “merchant” login is for your PAP account, as this is where you will sign into PAP, not your affiliates.
    In setting up your PAP account, if your company name is “ABC” then the URL for the merchant sign in to PAP would be as follows: https://abc.postaffiliatepro.com/merchants
    Remember, this is where you as the PAP merchant (admin) will sign in, not where your Affiliates will sign in, as SIngle Sign On will be in place for them which will be covered in the later steps in this article.
  2. There are a few spots in this documentation where you will need to know your VT System ID.
    From the Super User Dashboard, click “System Management”, then on the next screen you’ll see your VT System name, and then the System ID in brackets, as shown below with that example of “[ 000 ]” where “000” is the System ID.
202103systemid1-1024x9151.jpeg


The set up instructions below will go through the steps for each “integration point” noted above; A, B, C and D. Some implementations will use all of them, and others may only use one or two, based on the needs of your project.

Step A – Create/Update Affiliates from your VT System to your PAP account.

Step A1: Retrieve Your Original Account Domain

  • To get what PAP calls the “Original Account Domain” login to Post Affiliate Pro (PAP), then navigate to the Global NAV side bar, select “Configuration” and then “Domain Settings”
  • Take note of the “Original Account Domain” which will be the first part before the “postaffiliatepro.com” domain name. (E.g. the original account domain for ligthspeedvt .postaffiliatepro.com is just lightspeedvt )
202103ogDomain1-1024x6481.jpg


Step A2: Setup A Dedicated Merchant/Administrator

  • Next, a dedicated “Merchant (Administrator)” account should be created to use with the PAP API. As a best practice, you should always create a separate merchant account rather than using your registered account to setup the integration in your VT system (In the event that you forget your password and change it, the password would then need to be updated in your VT system API settings)
  • Just before you do this, you’ll want to enable “do not force email usernames” in PAP by navigating to the Global NAV side bar, select “Configuration”, then “Affiliate Signup”
  • On The resulting page, you’ll see several tabs at the top > Click the “Fields” tab then check the box next to “do not force email usernames” and click Save at the bottom.
  • Now you’re ready to create a dedicated “Merchant Administrator” account. To do this, navigate to the Global NAV side bar select “Tools” then “Merchants (Administrators)” Make sure to take note of the username and password, as we will cut and paste it into the integration settings in your VT System in Step B.
202103forceEmailUsernames1-1024x5381.jpeg

If you don’t see “Merchants (Administrators)” navigate to the Global NAV side bar, select “Configuration” then “Features” as shown below:

202103multipleMAs1.png

Then locate the “Multiple merchants (Administrators)” feature towards the bottom of this screen and click the Activate button. Now you’re finally ready to create a dedicated “Merchant (Administrator)” account as noted above.

Step A3: Setup Your PAP Integration In Your VT System

  • Sign into your VT system then navigate to the Super User Dashboard and select “Integration Management” [105]
  • Click the “API → Settings” hyperlink
  • On the resulting page, scroll to the bottom to see the “Post Affiliate Pro Api Account” section where you’ll enter the information you collected in the above steps which is the “Original Account Domain” (only enter the unique sub-domain) and the “Merchant (Administrator)” username/password.
  • In the “Locations” field, enter the Location ID(s) that you want this process to automatically create affiliates in Post Affiliate Pro. If left blank, all users created in all Locations will be created as affiliates in Post Affiliate Pro.
  • Below the Locations field just above the Save button you’ll see the “Webhook endpoint” which you’ll need to copy in order to complete the next step; Step A4.
202103intManagement1.pngapiSettings-1024x438papIntegration




Step A4: Create A New Webhook Endpoint

  • While still in the LSVT “Integration Management” area, navigate to the Webhooks tab and create a new webhook by clicking on the “Add URL” button
  • Give it a name like “PAP SSO Integration” so you can reference it in the future
  • Next, paste the copied webhook from Step A3 into the URL field
  • Lastly, register “User Creation” and “User Update” as the following events – This will be so that users are created in PAP as soon as they are created in your VT System, and also updated in PAP for any future updates to users

202103papWebhook1.png

NOTE

if you have some users that already exist in LSVT and PAP prior to this integration, make sure their usernames match in both LSVT and PAP, since there is no automation to update/sync users in PAP that were not created via this integration.

Step B – Auto Approve Or Manually Approve Affiliates

Step B1 – Approve Affiliates Instantly Upon Initial Creation

  • Here you’ll want to make sure you have “Automatic Approval” selected under your PAP settings. To do this login to Post Affiliate Pro (PAP) > Navigate to the Global NAV side bar, select “Configuration” then “Affiliate Sign Up” near the bottom
  • Then in the middle of the page you’ll see the “Affiliate Approval” section where you can select “Automatic Approval” from the drop menu, save your changes, and skip Step B2.
202103affiliateSU-1024x5511.jpeg

Step B2 – Manually Approve Affiliates Upon Initial Creation

If you indeed want to have affiliates created in PAP with a “Pending” status, then set the above to “Manual Approval” where you can have a usage event, such as; completing a certain course, or courses, and that can make an API call to PAP which will toggle the affiliate from “pending” to “approved.” This is convenient so that you can ensure your Affiliates are trained appropriately, and leverage the automation and integration between LightSpeed VT and PAP.

For assistance with setting up this trigger please contact LSVT Support at support@lightspeedvt.com

Step C – Setup Single Sign On For Your Affiliates In Your VT

To reiterate from earlier, the affiliate username from LSVT will be the same username in PAP. In addition, if the username is updated in LSVT, it will also update the username in PAP. To enable SSO, use the below link format, where the value for the s parameter needs to be the your system ID:

https://vt.lightspeedvt.com/hookme.cfm?params=username&s=XXX &hook_url=https://webservices.lightspeedvt.net/postAffiliatePro/link.ashx

For e.g. if your system ID was “1234” then the format would look like the following:

https://vt.lightspeedvt.com/hookme.cfm?params=username&s=1234 &hook_url=https://webservices.lightspeedvt.net/postAffiliatePro/link.ashx

Step D – Track Your Affiliate Sales

You’re almost done! This part is really easy if you are using the LSVT Stripe Widget, or the integrated Chargify solution for selling your info products, where LSVT already has the integration done for you if you have the Post Affiliate API settings in configured from Step A3 above. This will track all of the purchases from affiliates whether they one time or recurring.

The only thing you need to do is drop the code snippet provided from PAP into the footer area of every html pages of the site you want the affiliate tracked. This will place a client side cookie on the users browser, and the LSVT Stripe Widget or Chargify Checkout Page will parse this cookie and track the purchase accordingly.

Below is a screenshot from the code in PAP that you need. The highlighted areas need to be changed to your PAP information:

202103js-1024x3231.png

To find that code snippet in your PAP, navigate to the Global NAV side bar, select “Tools”, “Integration”, then “Clicks Tracking”, and on the resulting screen you’ll be provided with the javascript code needed.

202103trackSales1-1024x5201.jpg

Lastly, you’ll need to drop in an additional endpoint in either your Chargify or Stripe (depending on which you are using). The Stripe endpoint and events to listen for are included below:

  • Stripe Webhook Endpoint: https://webservices.lightspeedvt.net/stripe/stripe_pap_webhook.ashx?client=1&accountId={accountId}
Note

the “accountId” parameter in the Stripe endpoint refers to the account id in your webservices > This can be accessed from your Super User Dashboard by clicking on the Stripe Integration tool. In the URL address you should see the unique id featured as the last parameter or you can simply copy the “Stripe PAP Webhook Endpoint” that is already generated for you under the “General Settings” tab:202205Screen-Shot-2022-05-03-at-121413-PM1.png

In Stripe’s Dashboard under Developers -> Webhooks, you can add the endpoint with the following events:

  1. invoice.payment_succeeded
  2. invoice.paid
  3. charge.refunded

Once you’ve added in the webhook endpoint in your Stripe, you’ll need to copy/paste what’s called the “Signing Secret Token” which will be generated after you add the webhook endpoint noted above into it’s designated field in LSVT:

202205Screen-Shot-2022-05-03-at-121642-PM1.png

Click the Save button and you’re done!


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.