docs
  1. Scayle Developer Guides
  2. Customer
  3. Customer Groups

Customer Groups

General

SCAYLE allows users to add new customer groups.

Admin API

Add customer group

let response = await adminApi.apis.Customers.addCustomerGroups({shopKey: shopKey, countryCode: countryCode, customerIdentifier: customerIdentifier}, {requestBody: customerGroups});
let customer = response.body;

Parameters

param nametyperequireddescription
groupsstringtrueGroup to which the customer belongs to

Add a Customer Group

let customerGroups = {
  "groups": [
    "employee"
  ]
};

let response = await adminApi.apis.Customers.addCustomerGroup({shopKey: 'ms', countryCode: 'DE', customerIdentifier: "key=my-key"}, {requestBody: customerGroups});
customer = response.body;

console.log(customer.id);

Delete customer group

SCAYLE allows users to delete a customer group by its reference key or ID.

await adminApi.apis.Customers.deleteCustomerGroup({shopKey: shopKey, countryCode: countryCode, customerIdentifier: customerIdentifier, customerGroup: customerGroup});
Provide Feedback