Currently Salesforce Service Cloud is calling Marketing Cloud API to insert a Mobile contact when a button is clicked. It only adds the record to The MobileConnect app with the rest.marketingcloudapis.com/contacts/v1/contacts API call. This is done because 99% of the users are already in the All Subscribers list with their email address, and we don't want to create duplicate subscribers. This call allows us to set the ContactKey to be the existing SubscriberKey (personcontactid in this case). Then when the user texts Join to the short code, the system doesn't create a new record but adds the JOIN keyword to their contact in Marketing Cloud.
The one problem with this architecture: People who don't want emails, but instead want texts. If they don't exist in the All Subscribers table, the cloudpagesurl() link will not work. I'm passing the SubscriberKey through the link to be able to capture who's clicking on the links in Marketing Cloud, then writing them back to Service Cloud via a journey. Using the Cloudpagesurl links in a text uses the AllSubscriber record. If they don't have one, and only have the Mobile contact record, then the user gets a 500 error.
So, I'm looking for the best way to get the subscriber added to AllSubscribers when they don't already exist so the link doesn't break. Not sure if there's a decision point in the journey where you could figure out if they exist, and if they don't send an alt text....
Any thoughts would be appreciated. Thanks!