Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

For Developers

Dave Mackey edited this page Aug 23, 2017 · 6 revisions

Overview

In this article I will attempt to hit on a few topics of interest to developers looking to edit the code for Liquid Outreach.

Where is the CCB API Documentation?

There are a few places the CCB API documentation can be accessed, I recommend going straight to the documents hosted on AWS: https://designccb.s3.amazonaws.com/helpdesk/files/official_docs/api.html

How is Data Synced to the Application

From CCB API to WP Temporary Tables

The CCB API provides XML responses which are converted into JSON arrays. This data is then saved in two database tables that exist outside of WordPress' built-in tables:

  1. wp_lo_ccb_events_api_data
  2. wp_lo_ccb_groups_api_data

This is only a temporary holding place for the events and groups data. We created this temporary holding place because of limitations in CCB's API which make it impossibly to select with any significant precision which events one desires to bring over. The temporary table allows us to perform additional filtering on the events so that we only import into WordPress' tables those posts we actually want.

From WP Temporary Tables to WP Posts and Post Meta Tables

When we perform a Sync, the specified records (based on the filters we set) are moved into two WordPress built-in tables:

  1. wp_posts
  2. wp_postmeta Once they have been imported into wp_posts and wp_postmeta one still needs to publish the posts that have been created before the events/groups will show on the front-end. By default all posts/orgs are created with a status of Draft, this allows one to further refine which events/orgs are published and to edit the posts and the associated meta data.

What CCB API Services Are Utilized By the Liquid Outreach Plugin?

Searching for these in the above referenced CCB API documentation is one of the easiest ways to find the relevant documents. Unfortunately, the CCB API docs are one big file without a hyperlinked Table of Contents, making navigating the API docs difficult.

  1. Attendance Profile (attendance_profile) - Returns attendance info. regarding a specific occurrence of an event.
  2. Attendance Profiles (attendance_profiles) - Returns attendance info. regarding events that occurred within a date range.
  3. Event Profile (event_profile) - Returns the profile for a specific event identified by ID.
  4. Event Profiles (event_profiles) - Returns all profiles that have been created or modified since a specified date.
  5. Group Profile From ID (group_profile_from_id) - Returns a group profile for a specified ID. NOTE: Images have to be cached on the WP side as the URLs provided by CCB expire.
  6. Individual Profile From ID (individual_profile_from_id) - Returns an individual's profile for a provided ID.

CCB doesn't have the concept of Partner Organizations, how are you making Partner Organizations?

For our purposes the Group that created the Event is considered a Partner Organization. In order to make this work you should have Groups for each Partner Organization and have the events related to that Partner Organization created by the Group you created to represent the Partner Organization.

What Are the Post Meta Associated With An Individual Event?

  1. lo_ccb_events_weekday_name - Day of the week the event is occurring on.
  2. lo_ccb_events_team_lead_phone - Phone Number of the Team Lead.
  3. lo_ccb_events_team_lead_lname - Last Name of Team Lead.
  4. lo_ccb_events_team_lead_fname - First Name of Team Lead.
  5. lo_ccb_events_team_lead_id - CCB Profile ID for the Team Lead.
  6. lo_ccb_events_team_lead_email - Email Address of the Team Lead.
  7. lo_ccb_events_start_date - In Unix Time, the start date for the event.
  8. lo_ccb_events_register_url - The URL to the form for registering for the event. NOTE: The Gravity Form integration if using our CCB <--> Gravity Forms plugin (CCBravity) uses a different field, ccb_events_gform
  9. lo_ccb_events_openings - The number of available spots left for this particular event. NOTE: Besides numeric values this can have a setting of no-limit or expired.
  10. lo_ccb_events_kid_friendly - yes/no.
  11. lo_ccb_events_image_id - The ID of the image provided by CCB. NOTE: These images expire very quickly, that is why we cache them on the WP side.
  12. lo_ccb_events_image - Our locally cached copy of the image for an event.
  13. lo_ccb_events_group_id - The ID of the Group to which the Event belongs.
  14. lo_ccb_events_gform - If using CCBravity, the Gravity <--> CCB integration we created as a separate plugin, this is the form ID in Gravity Forms of the form you'll be using with this particular event.
  15. lo_ccb_events_costs - The cost associated with the event.
  16. lo_ccb_events_city - The city in which the event is occurring.
  17. lo_ccb_events_ccb_event_id - The Event ID in CCB for this particular event.
  18. lo_ccb_events_address - The full address including city, state, zip for the event.

What Are the Post Meta Associated With A Partner Organization?

  1. lo_ccb_event_partner_email - The email address of our contact at the Partner Organization.
  2. lo_ccb_event_partner_group_id - The Group ID of the Partner Organization in CCB.
  3. lo_ccb_event_partner_image - The image associated with this Partner Organization.
  4. lo_ccb_event_partner_location - A serialized version of the address of the Partner Organization.
  5. lo_ccb_event_partner_phone - The phone number of our contact at the Partner Organization.
  6. lo_ccb_event_partner_team_leader - The first and last name of our contact at the Partner Organization.
  7. lo_ccb_event_partner_team_leader_id - The ID in CCB of our contact at the Partner Organization.