Automatic invite with program enrollment

Is there a way I can automate sending the invite to join PB when a new client enrolls in a program?