younifyd
Menu

Create Mrt Rules

Create MRT rules to route to a new MRT environment.

POST/organizations/{organizationId}/zones/{zoneId}/mrtrules

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Create Mrt Rules action (under Zones (Data API)).
  3. Fill in the fields below, then reference the result from later steps as {{createMrtRules.response.data}}.

Request

Path parameters

zoneIdstringrequired
organizationIdstringrequired

An identifier for the organization the request is being made by

Request body

Enter the body as JSON in the step's Body field.

mrtHostnamestringrequired

The customer's MRT instance hostname.

expressionsarray<string>required

An array containing the expressions for each MRT rule.

descriptionsarray<string>

An array containing the descriptions for each MRT rule. The number of descriptions provided must match the number of expressions provided. Optional.

json
{
  "mrtHostname": "customer-react-project-production.mobify-storefront.com",
  "expressions": [
    "(http.host eq \"dev-customer.salesforce.com\" and not ( http.request.uri.path matches \"^/path1/.*\" or http.request.uri.path matches \"^.*/path2/.*/products/.*\"))"
  ],
  "descriptions": [
    "Phased rollout rule for dev-customer.salesforce.com"
  ]
}

Response

Returns 201 with an object. Read it in later steps with {{createMrtRules.response.data.<field>}}.

dataobject

Response for MRT rules. MRT rules are a way to route certain storefront requests to the managed runtime instance.

rulesetobjectrequired4 fields

An MRT ruleset. Defines a list of MRT rules that will route certain storefront requests to the managed runtime instance.

json
{
  "data": {
    "ruleset": {
      "id": "12345678901234asdfasfasdf",
      "name": "MRT Rules",
      "lastUpdated": "2022-01-01T05:20:00Z",
      "rules": []
    }
  }
}

Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.