- Resource: RepricingRule
- EligibleOfferMatcher
- MatcherOption
- StringMatcher
- EffectiveTime
- FixedTimePeriod
- RepricingRuleType
- StatsBasedRule
- CostOfGoodsSaleRule
- Restriction
- Boundary
- Methods
Resource: RepricingRule
Represents a repricing rule. A repricing rule is used by shopping serving to adjust transactable offer prices if conditions are met.
JSON representation |
---|
{ "ruleId": string, "merchantId": string, "countryCode": string, "languageCode": string, "title": string, "paused": boolean, "eligibleOfferMatcher": { object ( |
Fields | |
---|---|
ruleId |
Output only. Immutable. The ID to uniquely identify each repricing rule. |
merchantId |
Output only. Immutable. Merchant that owns the repricing rule. |
countryCode |
Required. Immutable. CLDR country code (for example, "US"). |
languageCode |
Required. Immutable. The two-letter ISO 639-1 language code associated with the repricing rule. |
title |
The title for the rule. |
paused |
Represents whether a rule is paused. A paused rule will behave like a non-paused rule within CRUD operations, with the major difference that a paused rule will not be evaluated and will have no effect on offers. |
eligibleOfferMatcher |
Required. Match criteria for the eligible offers. |
effectiveTimePeriod |
Required. Time period when the rule should take effect. |
type |
Required. Immutable. The type of the rule. |
restriction |
Required. Restriction of the rule appliance. |
Union field RuleDefinition . Definition of the rule to achieve above goal. RuleDefinition can be only one of the following: |
|
statsBasedRule |
The rule definition for TYPE_STATS_BASED. Required when the rule type is TYPE_STATS_BASED. |
cogsBasedRule |
The rule definition for TYPE_COGS_BASED. Required when the rule type is TYPE_COGS_BASED. |
EligibleOfferMatcher
Matcher that specifies eligible offers. When the USE_FEED_ATTRIBUTE option is selected, only the repricingRuleId attribute on the product feed is used to specify offer-rule mapping. When the CUSTOM_FILTER option is selected, only the *_matcher fields are used to filter the offers for offer-rule mapping. If the CUSTOM_FILTER option is selected, an offer needs to satisfy each custom filter matcher to be eligible for a rule. Size limit: the sum of the number of entries in all the matchers should not exceed 20. For example, there can be 15 product ids and 5 brands, but not 10 product ids and 11 brands.
JSON representation |
---|
{ "matcherOption": enum ( |
Fields | |
---|---|
matcherOption |
Determines whether to use the custom matchers or the product feed attribute "repricingRuleId" to specify offer-rule mapping. |
offerIdMatcher |
Filter by the offer id. |
itemGroupIdMatcher |
Filter by the item group id. |
brandMatcher |
Filter by the brand. |
skipWhenOnPromotion |
When true, the rule won't be applied to offers with active promotions. |
MatcherOption
Options for how offers are matched to rules.
Enums | |
---|---|
MATCHER_OPTION_UNSPECIFIED |
Unused. |
MATCHER_OPTION_CUSTOM_FILTER |
Use custom filters. |
MATCHER_OPTION_USE_FEED_ATTRIBUTE |
Use repricingRuleId feed attribute on the product resource to specify offer-rule mapping. |
MATCHER_OPTION_ALL_PRODUCTS |
Matching all products. |
StringMatcher
Matcher by string attributes.
JSON representation |
---|
{ "strAttributes": [ string ] } |
Fields | |
---|---|
strAttributes[] |
String attributes, as long as such attribute of an offer is one of the string attribute values, the offer is considered as passing the matcher. The string matcher checks an offer for inclusivity in the string attributes, not equality. Only literal string matching is supported, no regular expressions. |
EffectiveTime
JSON representation |
---|
{
"fixedTimePeriods": [
{
object ( |
Fields | |
---|---|
fixedTimePeriods[] |
A list of fixed time periods combined with OR. The maximum number of entries is limited to 5. |
FixedTimePeriod
Definition of a fixed time period.
JSON representation |
---|
{ "startTime": string, "endTime": string } |
Fields | |
---|---|
startTime |
The start time (inclusive) of the period. It can only be hour granularity. |
endTime |
The end time (exclusive) of the period. It can only be hour granularity. |
RepricingRuleType
Possible types of a rule.
Enums | |
---|---|
REPRICING_RULE_TYPE_UNSPECIFIED |
Unused. |
TYPE_STATS_BASED |
Statistical measurement based rules among Google SA merchants. If this rule is chosen, repricer will adjust the offer price based on statistical metrics (currently only min is available) among other merchants who sell the same product. Details need to be provdided in the RuleDefinition. |
TYPE_COGS_BASED |
Cost of goods sale based rule. Repricer will adjust the offer price based on the offer's sale cost which is provided by the merchant. |
TYPE_SALES_VOLUME_BASED |
Sales volume based rule. Repricer will adjust the offer price based on the offer's sales volume in the past period of time defined within the rule. |
TYPE_COMPETITIVE_PRICE |
Competitive price rule. Repricer will adjust the offer price based on the min price from a list of unnamed big competitors. |
StatsBasedRule
Definition of stats based rule.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field delta . The change of price compared to statistical measure. delta can be only one of the following: |
|
priceDelta |
The price delta against the above price target. A positive value means the price should be adjusted to be above statistical measure, and a negative value means below. Currency code must not be included. |
percentageDelta |
The percent change against the price target. Valid from 0 to 100 inclusively. |
CostOfGoodsSaleRule
A repricing rule that changes the sale price based on cost of goods sale.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field delta . This rule is defined relative to the COGS. The delta can be 1.2x of the COGS, or $100 more of the COGS. delta can be only one of the following: |
|
priceDelta |
The price delta against the COGS. For example, 2 means $2 more of the COGS. |
percentageDelta |
The percent change against the COGS. Ex: 20 would mean to set the adjusted price 1.2X of the COGS data. |
Restriction
Definition of a rule restriction. At least one of the following needs to be true: (1) useAutoPricingMinPrice is true (2) floor.price_delta exists (3) floor.percentage_delta exists If floor.price_delta and floor.percentage_delta are both set on a rule, the highest value will be chosen by the Repricer. In other words, for a product with a price of $50, if the floor.percentage_delta
is "-10" and the floor.price_delta is "-12", the offer price will only be lowered $5 (10% lower than the original offer price).
JSON representation |
---|
{
"useAutoPricingMinPrice": boolean,
"floor": {
object ( |
Fields | |
---|---|
useAutoPricingMinPrice |
If true, use the AUTO_PRICING_MIN_PRICE offer attribute as the lower bound of the rule. If useAutoPricingMinPrice is true, then only offers with |
floor |
The inclusive floor lower bound. The repricing rule only applies when new price >= floor. |
Boundary
Definition of a boundary.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field delta . The price change relative to the base price. delta can be only one of the following: |
|
priceDelta |
The price micros relative to the offer selling price. This field is signed. It must be negative in floor. For example, if an offer is selling at $10 and this field is -$2 in floor, the repricing rule only applies if the calculated new price is
|
percentageDelta |
The percentage delta relative to the offer selling price. This field is signed. It must be negative in floor. When it is used in floor, it should be > -100. For example, if an offer is selling at $10 and this field is -30 in floor, the repricing rule only applies if the calculated new price is >= $7. |
Methods |
|
---|---|
|
Creates a repricing rule for your Merchant Center account. |
|
Deletes a repricing rule in your Merchant Center account. |
|
Retrieves a repricing rule from your Merchant Center account. |
|
Lists the repricing rules in your Merchant Center account. |
|
Updates a repricing rule in your Merchant Center account. |