Moving a portal from legacy OLR
Legacy Trax Online Registration serves each portal at {host}/{client}/{org}/. Everything after the # is a page of
its single-page app, such as #/activities/1234. Links like these are already out in the world: staff "Open in OLR"
buttons, flyers, bookmarks and emails. They keep pointing at the old addresses after a portal moves to a new front end.
When a portal moves, nFocus keeps its address and sends {host}/{client}/{org}/ to the new front end. So the front
end receives legacy's links and should open the page each one meant. This guide maps every legacy page to the API
calls that replace it.
Reading a legacy link
- The page is in the fragment. Browsers never send the part after
#to a server, so the front end reads it in the browser (location.hash). - Lower-case it, as legacy did. Query values after
?keep their case. - Unknown pages went to legacy's dashboard. Send them to your home page.
- The tokens:
{client}and{org}in the path are the API's{clientToken}and{orgToken}. - Ids carry over: legacy's activity, group and membership ids are this API's ids.
The pages
| Legacy page | What to show | API |
|---|---|---|
#/activities/{id} |
The activity | GET /v1/portals/{clientToken}/{orgToken}/activities/{id} |
#/activities/groups/{id} |
The activity group, to pick sessions | GET …/activity-groups/{id} |
#/search, #/search/enroll, #/search/membershipenroll, #/search/summary, #/search/checkout, #/shoppingcart |
The catalog, the cart or checkout | GET …/activities, GET …/cart, POST …/checkout |
#/memberships, #/editmembershipdate |
Memberships; a membership's start date | GET …/memberships, GET …/memberships/{id}/eligibility |
#/dashboard, #/, #/privacy_policy, #/terms_of_use |
Home; the policies | GET …/config, GET …/content/{key} |
#/donate |
Giving | GET …/donations/options, a donation cart line or POST …/donations |
#/login, #/register |
Sign in; create an account | The hosted account pages (see Authentication) |
#/forgotpassword, #/completeregistration |
The forgot-password page, with the address filled in | See Reset and complete-registration links |
#/changepassword |
Change password | PUT …/me/password |
#/account, #/household, #/participantform |
The household and its forms | GET …/household, the forms endpoints |
#/accountrecenttransactions, #/accountstatements |
Account history; statements | GET …/account/transactions, GET …/account/statements |
#/paymentmethods, #/paymentplan, #/autopayments |
Saved cards; the payment plan; automatic payments | GET …/payment-methods, GET …/payment-plan, GET …/automatic-payments |
#/receipt |
The family's orders | GET …/orders/{id} (legacy kept the receipt in the browser, never in a link) |
#/attendance, #/participant, #/householdtest, #/noaccess |
Home | None: legacy's stubs and test pages |
In ParentPortalOnly mode, legacy sent the catalog, cart, membership and donation pages to #/noaccess. The portal's
configuration says whether that mode is on.
One activity
GET https://api.nfocus.solutions/v1/portals/riverbend/north/activities/3 → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/north/activities/3'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/activities/3');
const data = await response.json();C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/portals/riverbend/north/activities/3");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();Reset and complete-registration links
Legacy emailed #/forgotpassword?code=…&email=… to reset a password, and #/completeregistration?code=…&email=… to
set the first one. The code is a legacy token this API can't read, and it expires within a day. Send the family to
the API's forgot-password page with the address filled in:
/account/{clientToken}/{orgToken}/forgot-password?email={email}
- Escape the address (
encodeURIComponent). Legacy didn't, so a+in an address reached the page as a space; the page puts it back. - Nothing is looked up. The page is the same for every address, so it never shows whether one has an account. The family asks for a new link, and the API emails one that works for both cases.
- Something that isn't an email address leaves the field empty.
Signing in on both systems
The new front end and legacy OLR share logins but not sessions. A family who moves between the moved portal and a legacy sibling portal signs in again.
What nFocus changes at the switch
Moving a portal also needs a few row values in the client database, the proxy rule and the API's settings. nFocus
makes those changes from the go-live checklist (docs/operations/pilot.md in this repository).