Partner Account Creation
When you receive a request from Pax8 for a partner you haven't seen before you will have to create a partner record in your system. Pax8 offers two solutions for implementing partner account creation.
Automated Partner Creation within Provisioner System:
The recommended and more common method is to enable your system to identify instances when Pax8 submits a
ProvisionRequest
for a Partner
that is absent from your records. In response, your system will automatically generate the corresponding partner account before then provisioning services.
const partnersData = [];
function checkAndCreatePartnerAccount(provisionRequest) {
//Every ProvisionRequest contains a unique partnerId
// Check if the partnerId exists in your systems data
const existingPartner = partnersData.find((partner) => partner.partnerId === provisionRequest.partnerId);
if (existingPartner) {
// Partner account already exists, use the existing account in your system
return existingPartner;
} else {
// Partner account doesn't exist, create a new account
const newPartnerAccount = {
id: provisionRequest.partnerId,
name: provisionRequest.partnerName,
domain: provisionRequest.partnerDomain,
address: provisionRequest.partnerAddress,
// Add any other relevant fields from the provisionRequest or additional data you need to store
};
partnersData.push(newPartnerAccount); // Save the new partner account in your data store
// You can perform any additional logic or operations related to the new account here
return newPartnerAccount;
}
}
Partner Enrollment Provision Request:
Alternatively, the second approach involves utilizing PartnerEnrollment
, which is a ProvisionRequest
type that prompts provisioners to generate partner-level accounts before the partner can even create an order. This functionality lets Partners opt-in to a provisioner system, and allows provisioners to collect personalized account setup information. This custom setup may be helpful for provisioners who need specific information to create a partner-level account, or have a distinct partner account creation process. You can find more information about the partner enrollment requests on the Provision Request Types page.
Select the option that aligns best with your integration preferences.
Updated 6 months ago