I usually ask Dave Berard questions via email, but he mentioned he'd be away until Friday so I thought I'd give posting here a try.
When we provision accounts, we set their SingleBilling element text as 'Yes' and specify 'EmailMarketing' as their single Product entry text under the Products element. This works fine.
After the account goes live, we perform a POST on:
with XML setting the text of the Status element of the 'EmailMarketing' product entry to 'Open'. This also works fine.
In the case that an account needs to be disabled, we perform a POST on:
with XML setting the text of the Status element of the 'EmailMarketing' product entry to 'Canceled'. This works fine, up to a point. Here's what doesn't work with it.
When canceling the 'EmailMarketing' product, the SingleBilling element text is automatically changed to 'No' and the 'EmailMarketing' Product entry is removed from the Products element. As that is the only product, when the account is subsequently retrieved the Products element is empty. As the Products element is required for any SiteOwner update, this is an inconsistent state.
If, after an account has been canceled, we were to need to set it to 'Open' status, again, since we may only alter the state of accounts under our partner single billing we must first once again add the account to our partner account single billing. However, we can not do this because the account has an empty Products entry and any request to the SiteOwners collection is required to contain 1 or more Product entries under Products. As converting the 'EmailMarketing' product to 'Open' from 'Canceled' state requires updating the SiteOwner to be added to SingleBilling, and updating the SiteOwner to be added to SingleBilling requires 1 or more Products already be present, this appears to be a catch-22 situation.
So, here's my question. Once an account is in the 'Canceled' state, how can we update that account to add them back to our partner SingleBilling if an empty Products element is not allowed so we can once again 'Open' the 'EmailMarketing' product?
I believe the reasoning for this issue is that if you cancel the last product on an account it will ultimately cancel the account. Once an account is cancelled you wont be able to do much with it until it is reactivated. I know that this is how it works outside of the API. I will try to find a work around for you.
Thanks for the response!
I'm assuming that the account is automatically removed from partner single billing because its last added service was moved to canceled status, so... perhaps adding a second dummy or simply free service which would be shifted to open at the same time as email marketing but when email marketing were canceled would not be canceled would work to prevent automatically shifting accounts for which email marketing has been disabled. Then, if the desire is to remove the account from single billing, then after the email marketing service were canceled we can offer a separate call to set the dummy or free service to canceled, also, and thereby trigger that behavior on purpose.
Is something like that workable, or... have you had any luck finding a different workaround?
View API documentation, code samples, get your API key.Visit Page
The holidays have come and gone. For many seasonal businesses, this means the rush of shoppers has decreased as well. Instead of turning off the lights and waiting for spring, make your email marketi...See Article