Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Creating a State Policy aware action

Creating a State Policy aware action

Note: Before You Begin

Make sure that you have Creating a State Policy extension point in the plugin.

For a Commerce Manager action to be State Policies aware, it must extend AbstractPolicyAwareAction.

The getTargetIdentifier method must be implemented to return the unique identifier that will be used to map Creating a State Policy Contribution to this target.

public String getTargetIdentifier() {
    return targetIdentifier;