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 if it is outside of your VT system, and also on the “transactional” page where the payment is taken.
Before we go through the steps for each integration point, however, there are a few things you’ll need first to get started:
- 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. 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.
- 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.
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)
Step A2: Setup A Dedicated Merchant/Administrator
- Next, a dedicated “Merchant (Administrator)” account should be created to use with the PAP API. 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.
If you don’t see “Merchants (Administrators)” navigate to the Global NAV side bar, select “Configuration” then “Features” as shown below:
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” 
- 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.
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
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.
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 email@example.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:
For e.g. if your system ID was “1234” then the format would look like the following:
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: