All Release Notes

Conditional API Extensions in Beta

8 June 2022
Enhancement
CustomizationGraphQL

Conditional triggers on API Extensions allow you to specify the criteria under which a given Extension is triggered. By default, API Extensions are called on every create or update to the resource they are configured for. However, the new feature allows you to specify fine-grained predicates based on the resource's properties. Using conditional statements you can configure the API Extension to trigger only when your particular use case requires it. Conditional triggers are especially useful in cases where multiple brands or countries reside in a single project.

Changes:

  • [API] Added condition field to ExtensionTrigger.
  • [GraphQL API] Changed the TriggerInput type:
    • Input field condition was added to TriggerInput type
  • [GraphQL API] Changed the Trigger type:
    • Added the condition field to the Trigger type.
extend type Trigger {
condition: String
}
extend input TriggerInput {
condition: String
}