If a visitor is reporting that the following error, or variation of it which includes "REQUIRED_FIELD_MISSING, accountId must be specified if contactId is not null", is appearing on the thank you page after they complete an order in Soapbox Shop, it is likely due to them:
- Already existing as a Contact in your Salesforce instance with the same first name, last name, and email address they used in the Contact Information section of the form; and
- Their Contact record is not associated with an Organization/Account record:
If this is the case for Soapbox Shop, any payment associated with the form submission should have gone through with the payment processor. The process then failed when attempting to create the appropriate record in Salesforce.
To resolve the issue:
- Confirm that the payment was received by logging into your account with your payment processor; and
- Manually add the record for the action in Salesforce. For Soapbox Shop, you can get payment information from your payment processor and order details from any confirmation email set to be sent to staff, if you've included the variable for the order in the email body.
You should then add an Organization / Account record for the orphaned Contact. This will ensure that this does not occur again.
In general, it is good practice to avoid having orphaned Contacts and we'd encourage you to find and address other instances as well.