-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
21367: [Spike] Nightly job to filter and sync contacts #241
base: master
Are you sure you want to change the base?
21367: [Spike] Nightly job to filter and sync contacts #241
Conversation
65c65d1
to
36ff8f1
Compare
src/main/java/com/impactupgrade/nucleus/controller/AccountingController.java
Outdated
Show resolved
Hide resolved
src/main/java/com/impactupgrade/nucleus/controller/AccountingController.java
Outdated
Show resolved
Hide resolved
src/main/java/com/impactupgrade/nucleus/controller/PaymentGatewayController.java
Outdated
Show resolved
Hide resolved
src/main/java/com/impactupgrade/nucleus/service/segment/SynchronizationService.java
Outdated
Show resolved
Hide resolved
…SFDC to Xero/Stripe; Code review comments
30a8db5
to
7bcf057
Compare
… mappings for household/org account types
ea1d1f8
to
75ef24c
Compare
src/main/java/com/impactupgrade/nucleus/service/segment/AccountingPlatformService.java
Outdated
Show resolved
Hide resolved
src/main/java/com/impactupgrade/nucleus/service/segment/XeroAccountingPlatformService.java
Outdated
Show resolved
Hide resolved
src/main/java/com/impactupgrade/nucleus/service/segment/XeroAccountingPlatformService.java
Outdated
Show resolved
Hide resolved
src/main/java/com/impactupgrade/nucleus/service/segment/XeroDataSyncService.java
Outdated
Show resolved
Hide resolved
public void syncTransactions(Calendar updatedAfter) throws Exception { | ||
List<CrmDonation> crmDonations = env.primaryCrmService().getDonations(updatedAfter); | ||
if (env.accountingPlatformService().isPresent()) { | ||
//TODO: get all contacts ids for crm contacts and do bulk update instead? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Safe to skip the updateOrCreateContacts step here! My goal is to schedule the contact sync first, then follow up with the transaction sync later, separated by at least an hour. Assume the contacts already exist and have been updated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
We may have one missing piece here: we have crmDonation and crmContact, but we need to have contact id (xero one) to assign transaction to contact.
It seems to me that we need to have smth like getContactForCrmContact (getByAccountNumber, etc) method in the Xero service to complete the flow. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really good point! That was one benefit of doing the real time sync, where we had everything about the contact and transaction in a single shot. Makes sense!
} else { | ||
// Organization | ||
//TODO: Three different record types to include: AU ORGANISATION, AU CHURCH, AU SCHOOL? | ||
contact.setName(crmContact.account.name + " " + supporterId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VSydor Look through the doc I put together and DR AU's data mapping sheet to verify this one. Are organization record types supposed to use supporterId, or was supporterId for household contacts only and organizations simply use accountId?
No description provided.