Options
All
  • Public
  • Public/Protected
  • All
Menu

Module shopperContext

Index

References

ErrorResponse

Re-exports ErrorResponse

ErrorResponse

Re-exports ErrorResponse

ShopperContext

Re-exports ShopperContext

ShopperContext

Re-exports ShopperContext

ShopperContextGeoLocation

Re-exports ShopperContextGeoLocation

ShopperContextGeoLocation

Re-exports ShopperContextGeoLocation

ShopperContextParameters

Re-exports ShopperContextParameters

ShopperContextParameters

Re-exports ShopperContextParameters

ShopperContextPathParameters

Re-exports ShopperContextPathParameters

ShopperContextPathParameters

Re-exports ShopperContextPathParameters

ShopperContextQueryParameters

Re-exports ShopperContextQueryParameters

ShopperContextQueryParameters

Re-exports ShopperContextQueryParameters

ShopperContexts

Re-exports ShopperContexts

ShopperContexts

Re-exports ShopperContexts

createShopperContextPathParameters

Re-exports createShopperContextPathParameters

createShopperContextPathParameters

Re-exports createShopperContextPathParameters

createShopperContextQueryParameters

Re-exports createShopperContextQueryParameters

createShopperContextQueryParameters

Re-exports createShopperContextQueryParameters

defaultBaseUri

Re-exports defaultBaseUri

deleteShopperContextPathParameters

Re-exports deleteShopperContextPathParameters

deleteShopperContextPathParameters

Re-exports deleteShopperContextPathParameters

deleteShopperContextQueryParameters

Re-exports deleteShopperContextQueryParameters

deleteShopperContextQueryParameters

Re-exports deleteShopperContextQueryParameters

getShopperContextPathParameters

Re-exports getShopperContextPathParameters

getShopperContextPathParameters

Re-exports getShopperContextPathParameters

getShopperContextQueryParameters

Re-exports getShopperContextQueryParameters

getShopperContextQueryParameters

Re-exports getShopperContextQueryParameters

updateShopperContextPathParameters

Re-exports updateShopperContextPathParameters

updateShopperContextPathParameters

Re-exports updateShopperContextPathParameters

updateShopperContextQueryParameters

Re-exports updateShopperContextQueryParameters

updateShopperContextQueryParameters

Re-exports updateShopperContextQueryParameters

Type aliases

ErrorResponse

ErrorResponse: { detail: string; instance?: undefined | string; title: string; type: string } & {}
property

title: A short, human-readable summary of the problem type. It will not change from occurrence to occurrence of the problem, except for purposes of localization

  • Max Length: 256
property

type: A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be "about:blank". It accepts relative URIs; this means that they must be resolved relative to the document's base URI, as per [RFC3986], Section 5.

  • Max Length: 2048
property

detail: A human-readable explanation specific to this occurrence of the problem.

property

instance: A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. It accepts relative URIs; this means that they must be resolved relative to the document's base URI, as per [RFC3986], Section 5.

  • Max Length: 2048

ShopperContext

ShopperContext: { assignmentQualifiers?: undefined | {}; clientIp?: undefined | string; customQualifiers?: undefined | {}; customerGroupIds?: Array<string>; effectiveDateTime?: string | null; geoLocation?: ShopperContextGeoLocation; sourceCode?: string | null } & {}
property

effectiveDateTime: Qualifier to set the effective date time for the context to apply. For example, "Shop the Future" use cases. If not provided, the current dateTime will be assumed.

property

sourceCode: Qualifier to set the source code for the context to apply. Set the source code to evaluate source code group that triggers the promotion (campaign assignment) and Price books (assigned to Source code group).

property

customerGroupIds: Qualifier to set the Customer Group Ids for the context to apply. Set the Customer Group Ids to evaluate customer groups that trigger the promotions (campaign assignment) assigned to the customer groups.

property

customQualifiers: Map of custom qualifiers for the shopper context. Set this object to trigger pricing and promotion experiences using a dynamic session-based customer group. Object size is limited to 20 key-value pairs (properties).

property

assignmentQualifiers: Map of assignment qualifiers for the shopper context. Set this object when using the assignment framework to activate experiences based on assignment qualifiers. Currently, only pricing and promotion experiences are supported. Object size is limited to 20 key-value pairs (properties).

property

clientIp: The IP Address of the client. If the client IP is not a valid IPv4 address, a Bad Request (400) error is thrown. This property is available with B2C Commerce version 24.7. When clientIp is set, the geolocation based on the clientIp is returned in the X-Geolocation header in the response. Note: Use/retrieve this header in a case insensitive manner. However, if the geoLocation attribute is also set in the context, it takes precedence over the clientIp, and the X-Geolocation header returns the geolocation based on the geoLocation attribute. The query parameter evaluateContextWithClientIp determines whether to evaluate the context using the provided clientIp. - If evaluateContextWithClientIp is set to true: - The clientIp is saved and used in subsequent requests. Note: If geoLocation is also saved in the context, it takes precedence over the clientIp. - If evaluateContextWithClientIp is set to false: - The clientIp is not saved and is not used in subsequent requests.

property

geoLocation:

ShopperContextGeoLocation

ShopperContextGeoLocation: { city?: undefined | string; country?: undefined | string; countryCode?: undefined | string; latitude?: undefined | number; longitude?: undefined | number; metroCode?: undefined | string; postalCode?: undefined | string; region?: undefined | string; regionCode?: undefined | string } & {}
property

city: The city name associated with this location.

property

country: The country name associated with this location.

property

countryCode: The ISO country code associated with this location.

property

latitude: The latitude coordinate, which is a number between -90.0 and +90.0, associated with this location.

property

longitude: The longitude coordinate, which is a number between -180.0 and +180.0, associated with this location.

property

metroCode: The metro code associated with this location.

property

postalCode: The postal code associated with this location.

property

region: The region (subdivision) name for this location. Corresponds with "state" in the USA.

property

regionCode: The region (province or state) code for this location.

ShopperContextParameters

All parameters that are used by ShopperContext.

ShopperContextPathParameters

All path parameters that are used by at least one ShopperContext method.

ShopperContextQueryParameters

All query parameters that are used by at least one ShopperContext method.

createShopperContextPathParameters

createShopperContextPathParameters: { organizationId: string; usid: string }

Type declaration

  • organizationId: string
  • usid: string

createShopperContextQueryParameters

createShopperContextQueryParameters: { evaluateContextWithClientIp?: undefined | false | true; siteId: string }

Type declaration

  • Optional evaluateContextWithClientIp?: undefined | false | true
  • siteId: string

deleteShopperContextPathParameters

deleteShopperContextPathParameters: { organizationId: string; usid: string }

Type declaration

  • organizationId: string
  • usid: string

deleteShopperContextQueryParameters

deleteShopperContextQueryParameters: { siteId: string }

Type declaration

  • siteId: string

getShopperContextPathParameters

getShopperContextPathParameters: { organizationId: string; usid: string }

Type declaration

  • organizationId: string
  • usid: string

getShopperContextQueryParameters

getShopperContextQueryParameters: { siteId: string }

Type declaration

  • siteId: string

updateShopperContextPathParameters

updateShopperContextPathParameters: { organizationId: string; usid: string }

Type declaration

  • organizationId: string
  • usid: string

updateShopperContextQueryParameters

updateShopperContextQueryParameters: { evaluateContextWithClientIp?: undefined | false | true; siteId: string }

Type declaration

  • Optional evaluateContextWithClientIp?: undefined | false | true
  • siteId: string

Variables

Const defaultBaseUri

defaultBaseUri: "https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/v1" = "https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/v1"

Generated using TypeDoc