Page MenuHomePhabricator

Show iframe with donor details in Zendesk
Closed, ResolvedPublic8 Estimated Story Points

Description

DR to provide list of desired data.

Event Timeline

@EBrill-WMF @krobinson One finer detail to consider: What should we do when the email matches more than one contact?
Options:

  1. Just report that there is more than one contact, the user can click the button above to go to Civi and view or merge.
  2. Show the names of the contacts and the user can click one whose name matches the email's from to show that contact's details.
  3. Show the combined stats for all of the contacts, like we do in Acoustic.

Hi team,

The details to be displayed via iFrame are:

-First name, last name
-Country
-Last donation date
-Last donation currency & amount (in local currency)
-Audience segment (grassroots, etc)
-Status (recurring, lapsed, etc)
-Opt-in status

Regarding multiple records with the same email address, please proceed with option:

  1. Just report that there is more than one contact, the user can click the button above to go to Civi and view or merge

Thank you!

Thanks @EBrill-WMF !

@Lars if the opt in status will slow things down (as I'm not sure where button clean up work is at and I know sometimes there are contradictory statuses) please disregard that one for now, and we can add it down the line. Thanks!

Yes, we might add opt-in status a little later.

Would it also be useful to see something like "Has a DAF" or "Has given via DAF" at the bottom of this list? Would we want to include DAF soft credits in last donation data? @AMJohnson

Hey @Lars! Checked with the team who confirmed both of those would also be good additions. Thank you! :)

@krobinson @EBrill-WMF A few thoughts while implementing this:

Other data we might want to add (easier to do it now rather than later):

  • Conditionally show Employer if present
  • Buttons to copy email prefs centre or donor portal login links
  • Conditionally show last donor portal login date, if within the last week
  • Any kind of activity visibility
  • Anything else

Currently it separately shows OTG status, last OTG (date, amount, currency, status if there is one), recur status, last recur (same as OTG). Let me know if that's an issue, but I think it will be more clear than just using overall status.

This will look better with some styles inherited in ZD, but just so you have a reference for functionality:
{F100488864}

Change #1331782 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] Make it possible to link directly to the contributions recurring subtab on the contact summary

https://gerrit.wikimedia.org/r/1331782

@krobinson @EBrill-WMF Also, I'm assuming if there is one contact with the email as primary and another with it as secondary, we just use the primary email contact, but let me know if that's not the desired behaviour.

Change #1331782 abandoned by Lars SG:

[wikimedia/fundraising/crm@master] Make it possible to link directly to the contributions recurring subtab on the contact summary

Reason:

Will wait for SK version of the contributions tab instead

https://gerrit.wikimedia.org/r/1331782

Change #1331825 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] WIP: Donor summary page by email for iframe use in ZD

https://gerrit.wikimedia.org/r/1331825

This is a note about the technical challenge for authentication of user sessions in the iframe on ZD (I'm working on this issue):
The session cookie authenticating logged-in staff has no SameSite attribute set, so browsers default to Lax and withhold it on cross-origin iframe loads => no authenticated session, no page load.
CiviCRM core has an iframe extension that looks like the obvious fix but isn't: it's built for anonymous public pages like contribution pages, and its Standalone entry point (WebEntrypoint::invokeIframeMode()) strips every incoming cookie before processing the request, so it can never carry an authenticated session regardless of SameSite.
So we need a way to send cookies with SameSite=None cookie (in Standalone.php and likely in other CMS too if we want to make this a core change) and then to only allow iframes to load specific whitelisted pages, which we can manage as a setting. Additionally, browsers won't respect SameSite=None if Secure is not set on the cookie and core currently only sets Secure if $_SERVER['HTTPS'], which ours is not presumably because of proxying. It looks like CRM_Utils_System::isSSL() can replace this check and should accurately reflect if we're on SSL.

We'll also need to make sure our client cert also works in this context.

Change #1331867 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] REF: Move createContribution from ThankYouTest to WMFEnvironmentTrait for general use

https://gerrit.wikimedia.org/r/1331867

Change #1331963 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] Set a default silverpop database id instead of mocking it in each test

https://gerrit.wikimedia.org/r/1331963

Thanks @Lars

Other data we might want to add (easier to do it now rather than later):
Conditionally show Employer if present
Buttons to copy email prefs centre or donor portal login links
Conditionally show last donor portal login date, if within the last week
Any kind of activity visibility
Anything else
Currently it separately shows OTG status, last OTG (date, amount, currency, status if there is one), recur status, last recur (same as OTG). Let me know if that's an issue, but I think it will be more clear than just using overall status.

=>This all looks good, thank you!

Re. the second question about emails, and primary / secondary I feel that would be a case for: Report that there is more than one contact, the user can click the button above to go to Civi and view or merge. As it may be that some Civi clean up needs to happen, and having more of a holistic overview may help us with the inquiry. Is that possible?

Change #1331867 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] REF: Move createContribution from ThankYouTest to WMFEnvironmentTrait for general use

https://gerrit.wikimedia.org/r/1331867

Change #1331963 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Set a default silverpop database id instead of mocking it in each test

https://gerrit.wikimedia.org/r/1331963

QQ on this one, @Lars as @AMJohnson flagged something: Buttons to copy email prefs centre or donor portal login links => this would be to give to donors, correct? Are we now moving towards being able to share these pages directly with the donors? Would the links expire after a given time? As we were specifically told not to share the direct links with donors, only the log on pages, for security reasons. Are we now moving away from that guidance?

Thanks for any insights you have.

@krobinson, OK I'll add 1) conditionally show Employer if present and 2) conditionally show last donor portal login date, if within the last week.

For donor portal and email prefs centre links, we'll talk about the emails from Acoustic case with the donor portal working group (added to next week's agenda), but specifically for DR sending links to donors, what do you feel comfortable with? Since the donor only has to have access to the email inbox to log in anyways, there isn't really any technical difference if DR sends the contact the link or we send it directly from Civi. The main risk would be that someone copies the donor portal login link for one donor and then pastes it into an email to another donor. We can specify whatever expiration we would like for these links in particular (we use 7 days for the links you can get from the contact summary in Civi). Another option would be for us to add a button that sends the login link email directly to the donor.

Thanks @Lars !

I feel this last one would be the best workaround: Another option would be for us to add a button that sends the login link email directly to the donor. but I defer to @AMJohnson and @EBrill-WMF for their input.

Hi Lars,

agree with @krobinson regarding the option to add a button that sends the link to the donor. Ty!

Not sure how often we'd use it but Another option would be for us to add a button that sends the login link email directly to the donor is fine with me. :)

Change #1341395 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] Add standalone logout event

https://gerrit.wikimedia.org/r/1341395

Change #1341395 merged by Eileen:

[wikimedia/fundraising/crm@master] Add standalone logout event

https://gerrit.wikimedia.org/r/1341395

@krobinson @EBrill-WMF We have found a small annoyance, which is that Safari blocks third party cookies by default and won't allow persistent override of this for one page as other browsers do. So if you have Safari users on your team, they will either want to switch to another browser or turn off the "Prevent cross-site tracking" setting under Privacy in Safari to avoid having to click to allow the iframe to load every time.

Thanks for the heads up, we'll share with the team when we let them know about this. I don't think it's a big issue, most use Chrome or Firefox afaik.

Change #1346163 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] Allow new checksum link messages to set the activity source contact

https://gerrit.wikimedia.org/r/1346163

Change #1346163 merged by Eileen:

[wikimedia/fundraising/crm@master] Allow new checksum link messages to set the activity source contact

https://gerrit.wikimedia.org/r/1346163

Change #1331825 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Add iframe for donor details to be shown in ZD

https://gerrit.wikimedia.org/r/1331825

Change #1346776 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] Improve donor iframe styling to better match Zendesk

https://gerrit.wikimedia.org/r/1346776

Change #1346776 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Improve donor iframe styling to better match Zendesk

https://gerrit.wikimedia.org/r/1346776

Here's a brief guide to using the donor details iframe: https://docs.google.com/document/d/1zyiHbvp1NGDqiONl5hJWB2IoLSLU8VxEt5caa_15oFw/edit?tab=t.0
Let me know if this is added to your docs somewhere so I can make future updates there if needed.

Change #1347667 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] Add Relationship Manager and WLS to ZD iframe

https://gerrit.wikimedia.org/r/1347667

Thanks, @Lars ! Core folks on the team are going to be testing this in the coming days and we'll revert back with a round of feedback and perhaps some asks for tweaks. Once we're locked in, we'll ensure documentation is in place for the wider team - I'm not yet sure if we'll just stick with yours or add this into our ZD guide somewhere.

Thanks for all of your work on this thus far!

Change #1347680 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] Fix monthly convert example

https://gerrit.wikimedia.org/r/1347680

Change #1347667 merged by Lars SG:

[wikimedia/fundraising/crm@master] Add Relationship Manager and WLS to ZD iframe

https://gerrit.wikimedia.org/r/1347667

Change #1353488 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] Update donor details iframe per DR requests

https://gerrit.wikimedia.org/r/1353488

Change #1353489 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] Update donor details iframe per DR requests

https://gerrit.wikimedia.org/r/1353489

Change #1353488 abandoned by Lars SG:

[wikimedia/fundraising/crm@master] Update donor details iframe per DR requests

Reason:

duplicate

https://gerrit.wikimedia.org/r/1353488

Change #1353489 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Update donor details iframe per DR requests

https://gerrit.wikimedia.org/r/1353489

Lars set the point value for this task to 8.
Lars set Final Story Points to 8.