REST Resource: repricingrules

Resource: RepricingRule

Represents a repricing rule. A repricing rule is used by shopping serving to adjust transactable offer prices if conditions are met. Next ID: 24

JSON representation
{
  "ruleId": string,
  "merchantId": string,
  "countryCode": string,
  "languageCode": string,
  "title": string,
  "paused": boolean,
  "eligibleOfferMatcher": {
    object (EligibleOfferMatcher)
  },
  "effectiveTimePeriod": {
    object (EffectiveTime)
  },
  "type": enum (RepricingRuleType),
  "restriction": {
    object (Restriction)
  }
}
Fields
ruleId

string

Output only. Immutable. The ID to uniquely identify each repricing rule.

merchantId

string (int64 format)

Output only. Immutable. Merchant that owns the repricing rule.

countryCode

string

Required. Immutable. CLDR country code (e.g. "US").

languageCode

string

Required. Immutable. The two-letter ISO 639-1 language code associated with the repricing rule.

title

string

The title for the rule.

paused

boolean

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

object (EligibleOfferMatcher)

Required. Match criteria for the eligible offers.

effectiveTimePeriod

object (EffectiveTime)

Required. Time period when the rule should take effect.

type

enum (RepricingRuleType)

Required. Immutable. The type of the rule.

restriction

object (Restriction)

Required. Restriction of the rule appliance.

EligibleOfferMatcher

Matcher that specifies eligible offers. When the USE_FEED_ATTRIBUTE option is selected, only the repricing_rule_id 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 (MatcherOption),
  "offerIdMatcher": {
    object (StringMatcher)
  },
  "itemGroupIdMatcher": {
    object (StringMatcher)
  },
  "brandMatcher": {
    object (StringMatcher)
  }
}
Fields
matcherOption

enum (MatcherOption)

Determines whether to use the custom matchers or the product feed attribute "repricing_rule_id" to specify offer-rule mapping.

offerIdMatcher

object (StringMatcher)

Filter by the offer id.

itemGroupIdMatcher

object (StringMatcher)

Filter by the item group id.

brandMatcher

object (StringMatcher)

Filter by the brand.

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 repricing_rule_id feed attribute on the product resource to specify offer-rule mapping.

StringMatcher

Matcher by string attributes.

JSON representation
{
  "strAttributes": [
    string
  ]
}
Fields
strAttributes[]

string

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 regex.

EffectiveTime

JSON representation
{
  "fixedTimePeriods": [
    {
      object (FixedTimePeriod)
    }
  ]
}
Fields
fixedTimePeriods[]

object (FixedTimePeriod)

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

string (Timestamp format)

The start time (inclusive) of the period. It can only be hour granularity.

endTime

string (Timestamp format)

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_WIN_BUY_BOX Buy Box winning price-based rules. In Buy on Google, the Buy Box refers to the offer for a product shown at the top of the Product Detail Page (PDP) with an "Add to Cart" button. If this rule is chosen, your offer price will be lowered within the range you set to help increase the likelihood that you will win the Buy Box. There is no RuleDefinition needed for this type.

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 (Boundary)
  }
}
Fields
useAutoPricingMinPrice

boolean

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 AUTO_PRICING_MIN_PRICE existing on the offer will get Repricer treatment, even if a floor value is set on the rule. Also, if useAutoPricingMinPrice is true, the floor restriction will be ignored.

floor

object (Boundary)

The inclusive floor lower bound. The repricing rule only applies when new price >= floor.

Boundary

Definition of a boundary.

JSON representation
{
  "priceDelta": string,
  "percentageDelta": integer
}
Fields
priceDelta

string

The price micros relative to the offer selling price. This field is signed. It must be negative in floor. 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 >= $8.

percentageDelta

integer

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. 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

create

Creates a repricing rule for your Merchant Center account.

delete

Deletes a repricing rule in your Merchant Center account.

get

Retrieves a repricing rule from your Merchant Center account.

list

Lists the repricing rules in your Merchant Center account.

patch

Updates a repricing rule in your Merchant Center account.