Skip to contents

Resolves orphan accounts in P2 based on the following tests:

  1. the email from exists in P2

  2. the email to is not already used in P2

  3. the customer # field in P2 matches a value passed in customer_no

Usage

p2_resolve_orphan(from = NULL, to = NULL, customer_no = NULL, dry_run = FALSE)

Arguments

from

character, email in P2 that needs to be changed

to

character, email that will replace the from email

customer_no

integer vector, customer numbers; one of which must match the customer # field in P2 or the update will not be run

dry_run

boolean, nothing will be changed in P2 if set to TRUE

Value

TRUE if update is run succesfully, FALSE if not.

Details

It updates the from email in P2 to to, iff #1, #2 & #3 pass; or it marks the account with a tag in P2 iff #1 and #3 pass, and #2 doesn't pass