Getting TeamRaiser Greeting Page Information

Options
If we would need to display information that is input on the TR Greeting Page (Sponsor 1, Sponsor 2, etc.)


All of this information is available in the Create & Update TeamRaiser APIS, but not GetTeamraiserbyDistance. Is there no way to pull this information either in a report or via api?

<eventSchedule>Arrive at 11. The math begins at noon, prizes at 3pm.</eventSchedule>
<mapLink>www.maps.google.com/cowboysstadium</mapLink>
<coordinatorEmail>jjones@cowboys.com</coordinatorEmail>
<coordinatorName>Jerry Jones</coordinatorName>
<coordinatorPhone>(512) 555-5555</coordinatorPhone>
<sponsor1>Pepsi</sponsor1>
<sponsor2>Frito Lay</sponsor2>
<sponsor3>NFL</sponsor3>
<sponsor4>Ford</sponsor4>
<sponsor5>ESPN</sponsor5>
Tagged:

Comments

  • Here's the easiest way to do it in my experience:

    Setup pseudoAPI using LO


    Create a secure pagebuilder page, call it pseudoAPI_TR.

    Add an html content block with the following JSON code (tip: make sure there's no auto <p></p> tag added by LO when you're saving/editing it later on, LO sure loves to do that and I spent a few minutes wondering why it wasn't working).

    {
    "teamraiser": {
    "event_schedule":"[[E47:[[S334:fr_id]]:fr_info:1:event_schedule]]" ,
    "map_link":"[[E47:[[S334:fr_id]]:fr_info:1:map_link]]" ,
    "coordinatorEmail":"[[E47:[[S334:fr_id]]:fr_info:1:coordinator_email]]" ,
    "coordinatorName":"[[E47:[[S334:fr_id]]:fr_info:1:coordinator_name]]" ,
    "coordinatorPhone":"[[E42:[[S334:fr_id]]:fr_info:1:coordinator_phone]]" ,
    "sponsor1":"[[E47:[[S334:fr_id]]:fr_info:1:sponsor_1]]" ,
    "sponsor2":"[[E47:[[S334:fr_id]]:fr_info:1:sponsor_2]]" ,
    "sponsor3":"[[E47:[[S334:fr_id]]:fr_info:1:sponsor_3]]" ,
    "sponsor4":"[[E47:[[S334:fr_id]]:fr_info:1:sponsor_4]]" ,
    "sponsor5":"[[E47:[[S334:fr_id]]:fr_info:1:sponsor_5]]"
    }
    }

    Then, you can access all these from your website using whatever language you work in- I use php mostly, so here's a php example using curl (replace YOURFRID and YOURSITENAME with your FR_ID number and organization respectively):


    //Code to grab all JSON from pseudoAPI
    $frid = YOURFRID;
    $urlTR = "https://secure3.convio.net/YOURSITENAME/site/SPageServer?pagename=pseudoAPI_TR&fr_id=" . $frid . "&pgwrap=n";
    $chTR = curl_init();
    // set URL and other appropriate options
    curl_setopt($chTR, CURLOPT_URL, $urlTR);
    curl_setopt($chTR, CURLOPT_HEADER, 0);
    curl_setopt($chTR, CURLOPT_RETURNTRANSFER, true);
    // grab URL and pass it to the browser
    $outputTR = curl_exec($chTR);
    //Uncomment to check if working
    //print_r($outputTR);
    // close curl resource, and free up system resources
    curl_close($chTR);

    $trData = json_decode($outputTR);
    Now you have all your data accessible under $trData. Here's an example of displaying it in PHP:

    echo($trData->teamraiser->sponsor3)

    Let me know if you have any questions!
  • Hi Bri,


    Thank you! This is exactly what I was looking for.


    And i'll get greedy and ask if you've found a way to have this information included in any of the TeamRaiser Report Writer Reports?


    Hilary
  • Note that while the pseudo-URL approach works, you can also use the (now documented) Content API getTagInfo method. This method can be used to parse any Luminate Online template tag (e.g. S-Tags):

    http://open.convio.com/api/#content_api.gettaginfo_method.html


    If you happen to be using AngularJS in your project, this module might come in handy:

    https://github.com/noahcooper/angular-luminate-utils#evaluating-template-tags-with-luminatetemplatetag
  • Thanks Noah, that's interesting! I'll check that out for some projects coming up.
  • Hi Hilary,


    I haven't experimented with the report writer in this regard, but if I run across it I'll update this thread!

Categories