Skip to content

Instantly share code, notes, and snippets.

View ranveer5289's full-sized avatar

Ranveer Raghuwanshi ranveer5289

View GitHub Profile
@ranveer5289
ranveer5289 / CommerceEndpointSearchProductSearch.cls
Created April 18, 2024 08:51
Commerce_Endpoint_Search_ProductSearch
public with sharing class CommerceEndpointSearchProductSearch extends ConnectApi.BaseEndpointExtension {
public override ConnectApi.EndpointExtensionRequest beforePost(ConnectApi.EndpointExtensionRequest request) {
System.debug('We are in the beforePost entry method of Commerce_Endpoint_Search_ProductSearch extension');
return request;
}
public override ConnectApi.EndpointExtensionResponse afterPost(ConnectApi.EndpointExtensionResponse response, ConnectApi.EndpointExtensionRequest request) {
System.debug('We are in the afterPost entry method of Commerce_Endpoint_Search_ProductSearch extension');
System.debug('response.getResponseObject()-----' + response.getResponseObject());
ConnectApi.ProductSearchResults results = (ConnectApi.ProductSearchResults)response.getResponseObject();
#!/bin/bash
# Trusted Agent on Behalf of Demo:
#
# https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=getTrustedAgentAuthorizationToken
# SLAS Client requires `sfcc.ta_ext_on_behalf_of` scope.
set -eou pipefail
CODE='kv7kzm78'
ORG='f_ecom_zzrf_001'
CLIENT='8eefe333-cac4-4cbe-ad1c-a7336693acbc'
{"basePath":"/s/-/dw/data/20.8","consumes":["application/json","text/xml","application/xml"],"definitions":{"ab_test":{"description":"The id of the A/B Test","properties":{"customer_groups":{"description":"The list of customer group ids assigned to the A/B Test. Defaults to 'Everyone' if not specified on create","items":{"type":"string"},"type":"array"},"description":{"description":"The optional description of the A/B Test","maxLength":4000,"type":"string"},"email_addresses":{"description":"The optional list of email addresses to send A/B Test results","items":{"type":"string"},"type":"array"},"enabled":{"description":"The flag representing the enabled state of the A/B Test. Defaults to false if not specified on create","type":"boolean"},"end_date":{"description":"The date that the A/B Test ends. Defaults to two weeks from creation date if both start and end dates are not specified on create","format":"date-time","type":"string"},"expiration_type":{"description":"The participant expiration type of the A/B Tes
<?xml version="1.0" encoding="UTF-8"?>
<customer-list xmlns="http://www.demandware.com/xml/impex/customer/2006-10-31" list-id="GlobalSite">
<header>
<customerno-sequence-enabled>false</customerno-sequence-enabled>
<customer-lockout-enabled>false</customer-lockout-enabled>
<max-failed-logins>10</max-failed-logins>
<lockout-effective-period>30</lockout-effective-period>
<customer-login-attempt-reset-time>30</customer-login-attempt-reset-time>
<min-password-length>1</min-password-length>
<min-password-special-chars>0</min-password-special-chars>