ccrz.ccLogicAccountCreateAccount.processAccount

Constructs an account sObject from the input values.

Compatibility

This reference applies to:

Release Managed Package Version API Version
B2B Commerce for Visualforce Winter ’21 4.13 12
B2B Commerce for Visualforce Spring ’20 4.12 11
B2B Commerce for Visualforce Summer ’19 4.11 10
B2B Commerce for Visualforce Spring ’19 4.10 9
B2B Commerce for Visualforce Summer ’18 4.9 8

Signature

global virtual Map<String, Object> processAccount(Map<String, Object>)

Inputs (Required)

This method accepts the Map<String, Object> after the ccrz.ccLogicAccountCreateAccount.getOwnerAccount method completes.

This method requires the following keys in the working map:

ccrz.ccApiAccount.ACCOUNT_NEW
List<String> that specifies fields and values for creating the account record. Only certain account fields are writable when creating the record:
Field Required? Type
billingAddress Required Map<String, Object> (see the following table)
companyName Optional String
customField1 Optional String
customField2 Optional String
firstName Required String
lastName Required String
primaryPhone Required String
shippingAddress Required Map<String, Object> (see the following table)
taxExemptFlag Required Boolean
userName Required String

The billingAddress and shippingAddress maps can contain the following writable fields:

Field Required? Type
address1 Required String
address2 Optional String
city Required String
country Required String
countryCode Optional String
postalCode Required String
state Required String
stateCode Optional String
ccrz.ccLogicAccountCreateAccount.AG
String that specifies the Salesforce ID of the account group for the storefront's portal account.
ccrz.ccLogicAccountCreateAccount.OWNER_ACCOUNT
Account that represents the storefront's portal account.

Logic Performed

This method sets the following fields on the account sObject based on the input data:

Account Field Input Data
ccrz__AccountGroup__c ccrz.ccLogicAccountCreateAccount.AG
BillingAddress billingAddress field of ccrz.ccApiAccount.ACCOUNT_NEW
ccrz__CustomField1__c customField1 field of ccrz.ccApiAccount.ACCOUNT_NEW
ccrz__CustomField2__c customField2 field of ccrz.ccApiAccount.ACCOUNT_NEW
Description userName field of ccrz.ccApiAccount.ACCOUNT_NEW
OwnerId ccrz.ccLogicAccountCreateAccount.OWNER_ACCOUNT
Name
  1. If specified, companyName field of ccrz.ccApiAccount.ACCOUNT_NEW
  2. Otherwise, a concatenation of firstName and lastName fields of ccrz.ccApiAccount.ACCOUNT_NEW
Phone primaryPhone field of ccrz.ccApiAccount.ACCOUNT_NEW
ShippingAddress shippingAddress field of ccrz.ccApiAccount.ACCOUNT_NEW
ccrz__TaxExemptAccount__c taxExempt field of ccrz.ccApiAccount.ACCOUNT_NEW
ccrz__UsedByCloudcraze__c true

Outputs

This method returns the working Map<String, Object>, and sets the following keys:

ccrz.ccApiAccount.ACCOUNT_NEW
Account that represents the constructed account sObject.