NewPath-Consulting / warm

Pro Reports for Wild Apricot is a Google Data Studio connector that helps Wild Apricot administrators understand your organization’s membership engagement, renewal rates, and demographics. Trend your revenue and get expense analyses. Whatever your question, enjoy all the organized data you need at your fingertips to make the business decisions want.
https://newpathconsulting.com/warm
GNU General Public License v3.0
6 stars 4 forks source link

Add several fixed schema system fields to Members functionality #16

Closed asirota closed 4 years ago

asirota commented 4 years ago

member since - DATE renewal due - DATE renewal date last change - DATE level last changed - DATE access to profile by others - Boolean details to show - STRING (comma delimited) photo albums enabled - Boolean member bundle id or email - STRING member role - STRING

asirota commented 4 years ago

Add Support File Attachment type field - set to TRUE when there is an attachment

miasmos commented 4 years ago

1) I could not find the below fields in the https://api.wildapricot.org/v2.1/accounts/221748/Contacts?$async=false response. What are the SystemCode names for these? details to show - STRING (comma delimited) photo albums enabled - Boolean

2) member bundle id or email - STRING Just to confirm the logic around this, if BundleId is null, populate the field with Email, and if email is null, populate with "".

3) Does attachment field type boolean refer to an attachment existing on any entry in FieldValues, or a specific one? If a specific one, which field does this refer to?

asirota commented 4 years ago
  1. I think these details are part of the Privacy and Photo settings https://newpathconsulting.wildapricot.org/admin/contacts/details/privacy/?contactId=37415038 https://newpathconsulting.wildapricot.org/admin/contacts/details/photos/?contactId=37415038

But you're right -- not sure where they are in the API or if they even exist. I'll check with support. Leave off for now.

  1. If BundleId is null, just return null otherwise return the Id. The Id is a User ID that can be looked up to find the email separately.

  2. The ContactFields call will return custom attachment fields but only with v2.2 of the API. So you have to change the API call to use v2.2 in line 29 accounts: "https://api.wildapricot.org/v2.1/accounts/"

this is documented here https://gethelp.wildapricot.com/en/articles/1683-api-version-22-differences

So when you retrieve /Contacts with v2.2 API on the Sandbox site you should get a field like Your Student Resume which is a field that contains a list of attachment links. You can have up to 20 links there or it can be null. If there is a list of links retrieve them in a comma delimited list. Otherwise return null.

miasmos commented 4 years ago
  1. Leaving this for now.
  2. Now returning BundleId or null.
  3. I don't see the Your Student Resume field when calling https://api.wildapricot.org/v2.2/accounts/221748/contactfields. Specifically, I modified user 52829081 to both be a student and have a resume attached. Actually, I don't see any fields with attachments being returned. Are we sure the endpoint returns attachment fields?
asirota commented 4 years ago

I'll put in a support request for number 3 to check out what's wrong. Can you provide a JSON structure for the call so I can let them know the attachment field is not being returned?

asirota commented 4 years ago

Unfortunately manipulating privacy settings for a given contact is not possible with the API. Sorry about that.

You are only able to set the default for the field itself. For example, the '/accounts//contactfields' endpoint (see https://app.swaggerhub.com/apis-docs/WildApricot/wild-apricot_public_api/2.1.0#/Contacts.CustomFields) maintains the properties for the fields present on your account. This is essentially sets the default settings for all contacts for that respective field.

asirota commented 4 years ago

@stephenpoole - looks like v2.2 is not actually available yet.

Can I suggest you roll back to v2.1 at this point? ---- notes from WA support --- At the moment our team is still doing some work on API version 2.2 as it is not yet completely stable. So at the moment some functionality is not available, specifically the file attachment functionality. Sorry about that.

When this is rolled out (I am unable to provide an ETA when this will be unfortunately) this should return the file attachment fields as advertised. This should get rolled out on an upcoming release for the mobile app.

Let me know if you have any questions on this. Regards, Mike Leroux, Canuck Apricot

miasmos commented 4 years ago

Reverted to api 2.1.