GraphRequest Class
Contains constructors and properties to set the graph ID and a list of records to be ingested. The list of records is specified in a key-value map format that contains the field values of an order.
Create the list of records to be ingested by using these steps.
-
Create the list of records by constructing the
Map<String, Object>map of field values of an order. -
To create a record object from the field values, create an instance of the
RecordResourceclass. -
To associate the Record object with a reference identifier, create an instance of the
RecordWithReferenceRequestclass. -
Invoke the Place Order Apex API.
The
CatalogRatesPreferenceEnumenum is available when the Usage-Based Selling feature is enabled. -
To contain all record objects, create an instance of the
GraphRequestclass. -
Learn more about the available constructors with the
GraphRequestclass. -
Learn more about the available properties with the
GraphRequestclass.
Learn more about the available constructors with the GraphRequest class.
The GraphRequest class includes these constructors.
-
GraphRequest(graphId, records)
Creates an instance of the
GraphRequestclass to assign the graph ID and a list of records to be ingested.
Creates an instance of the GraphRequest class to assign the graph ID and a list of records to be ingested.
public GraphRequest(String graphId, List<commerceorders.RecordWithReferenceRequest> records)
graphId
Type: String
ID of the graph.
records
Type: List<commerceorders.RecordWithReferenceRequest>
List of records to be ingested.
Learn more about the available properties with the GraphRequest class.
The GraphRequest class includes these properties.
-
Set the
graphIdproperty to assign the ID value of the graph.
Set the graphId property to assign the ID value of the graph.
public String graphId {get; set;}
Type: String