Create Customer Account Action

Create a customer account for tariff comparison enrollment as a Person Account or a Business Account with a Contact, based on org settings.

This action is available in API version 68.0 and later.

Special Access Rules

The Create Customer Account action is available in Enterprise and Unlimited Editions with Energy and Utilities Cloud.

Supported REST HTTP Methods

URI
/services/data/v68.0/actions/standard/createCustomerAccount
Formats
JSON, XML
HTTP Methods
POST
Authentication
Authorization: Bearer token

Inputs

Input Details
firstName
Type
string
Description

Required.

The first name of the customer.

lastName
Type
string
Description

Required.

The last name of the customer.

emailAddress
Type
string
Description

Optional.

The email address of the customer.

phoneNumber
Type
string
Description

Required.

The phone number of the customer.

isPersonAccount
Type
boolean
Description

Required.

Indicates whether to create a Person Account instead of a Business Account with a Contact. The default value is false.

Outputs

Output Details
accountId
Type
string
Description
The ID of the account record created for tariff comparison enrollment.
contactId
Type
string
Description
The ID of the contact associated with the created account. For Person Accounts, this is the person contact ID. For Business Accounts, this is the contact ID.
isPersonAccountCreated
Type
boolean
Description
Indicates whether a Person Account was created. When false, a Business Account with a Contact was created instead.

Example

POST

This sample request is for the Create Customer Account action.

1{
2  "inputs": [
3    {
4      "firstName": "Alex",
5      "lastName": "Rivera",
6      "emailAddress": "alex.rivera@example.com",
7      "phoneNumber": "415-555-0100",
8      "isPersonAccount": true
9    }
10  ]
11}

This sample response is for the Create Customer Account action.

1[
2  {
3    "actionName": "createCustomerAccount",
4    "errors": null,
5    "invocationId": null,
6    "isSuccess": true,
7    "outputValues": {
8      "accountId": "001xx000003GHijAAG",
9      "contactId": "003xx000004DKlmAAE",
10      "isPersonAccountCreated": true
11    },
12    "sortOrder": -1,
13    "version": 1
14  }
15]