Skip to content

Advanced Customizing WebPublicPerson

James K edited this page Dec 19, 2021 · 5 revisions

The WebPublicPerson.py script controls the information that is sent to WordPress.
This allows you to exclude some people or manipulate the data before it's released to WordPress (and potentially the public internet). We use this to exclude the last names from some Global Partners.

There are two variables that are used: Data.Person and Data.Info.

Data.Person

This is the Person object direct from TouchPoint. Its attributes are documented in the documentation and the code repository. Use this object to get information from the Person's record to customize.

Data.Info

This is the object that gets returned to WordPress. It has the following attributes and default values:

  • Exclude - bool - Default: False. Setting this to True will prevent this person from being included in the WordPress completely. This means no user account will be created for them, and they will be excluded from any People Lists.
  • GoesBy - string - Default: NickName if the Person has one, otherwise FirstName. This becomes the First_Name field in WordPress.
  • LastName - string - Default: LastName. Becomes the Last_Name field in WordPress.
  • DisplayName - string - Default: GoesBy + " " + LastName. Becomes the Display_Name field in WordPress.

Sample Script

The default script provided gives an example of how we use this to protect our global partners. Our partners have a FamilyExtraValue called "Security Level" and we take specific precautions based on that level:

  1. No special precautions. Full names are printed, everything is synced.
  2. Display full first names, but not last names.
  3. First initials only. Not last names.
  4. Exclude completely.

Clone this wiki locally