This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates a custom automated earning rule.
Currently, only social media earning rule is supported.
function createCustomLoyaltyEarningRule(
type: Type,
options: CreateCustomLoyaltyEarningRuleOptions,
): Promise<CreateCustomLoyaltyEarningRuleResponse>;
Type of the custom earning rule.
import { earningRules } from "@wix/loyalty";
async function createCustomLoyaltyEarningRule(type, options) {
const response = await earningRules.createCustomLoyaltyEarningRule(
type,
options,
);
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.