---
schema_version: "1"
id: e60b34a5963e0dfe5cae6d79f835e3e4899b87943735d370e9c8cb3338e614f7
title: RegisterGuestBuyer Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_ConnectAPI_RegisterGuestBuyer_static_methods.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_RegisterGuestBuyer_static_methods.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4c78e1264a9cd2b2e846ee13825148b01203b3c75e28f5ced5b7e4ef70abf9ea
description: Register a guest buyer for a webstore using an account ID, enabling a guest buyer to order on behalf of another buyer.These methods are for RegisterGuestBuyer. All methods are static. Your org must have the Order Management Growth license or Order Management as part of Connected Commerce.Register a guest buyer for a webstore using an account ID. This method enables a guest buyer to order on behalf of another buyer.
---
# RegisterGuestBuyer Class

Register a guest buyer for a webstore using an account ID, enabling a guest buyer to order on behalf of another buyer.

## Namespace

[ConnectApi](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_connect_api.htm "The ConnectApi namespace (also called Connect in Apex) provides classes for accessing the same data available in Connect REST API. Use Connect in Apex to create custom experiences in Salesforce.")

## RegisterGuestBuyer Methods

These methods are for RegisterGuestBuyer. All methods are static. Your org must have the Order Management Growth license or Order Management as part of Connected Commerce.

- **[registerGuestBuyer(webstoreId, accountId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_RegisterGuestBuyer_static_methods.htm#apex_ConnectAPI_RegisterGuestBuyer_registerGuestBuyer_1)**  
    Register a guest buyer for a webstore using an account ID. This method enables a guest buyer to order on behalf of another buyer.

### registerGuestBuyer(webstoreId, accountId)

Register a guest buyer for a webstore using an account ID. This method enables a guest buyer to order on behalf of another buyer.

#### API Version

60.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.RegisterGuestBuyerOutputRepresentation registerGuestBuyer(String webstoreId, String accountId)

#### Parameters

webstoreId

Type: String

ID of the webstore.

accountId

Type: String

ID of the account for which the request is made.

#### Return Value

Type: [ConnectApi.RegisterGuestBuyerOutputRepresentation](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_register_guest_buyer_output.htm "Indicates success or failure of a register guest buyer action.")