Skip to content

Commit

Permalink
docs(custom strats): adjust heading levels, add ideas.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasheartman committed Dec 22, 2021
1 parent daeb73a commit caa5ae1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions website/docs/advanced/custom-activation-strategy.md
Expand Up @@ -5,27 +5,31 @@ title: Custom Activation Strategy

Even though Unleash comes with a few powerful [activation strategies](../user_guide/activation-strategies.md) there might be scenarios where you would like to extend Unleash with your own custom strategies.

### Example: TimeStamp Strategy {#example-timestamp-strategy}
Custom activation strategies are ...

Must be implemented on the client.

## Example: TimeStamp Strategy {#example-timestamp-strategy}

In this example we want to define an activation strategy offers a scheduled release of a feature toggle. This means that we want the feature toggle to be activated after a given date and time.

#### Define custom strategy {#define-custom-strategy}
### Define custom strategy {#define-custom-strategy}

First we need to "define" our new strategy. To add a new "Strategy", open the Strategies tab from the sidebar.

![A strategy creation form. It has fields labeled "strategy name" and "description". It also has fields for a parameter named "enableAfter". The parameter is of type "string" and the description is "Expected format: YYYY-MM-DD HH:MM". The parameter is required.](/img/timestamp_create_strategy.png)

We name our strategy `TimeStamp` and add one required parameter of type string, which we call `enableAfter`.

#### Use custom strategy {#use-custom-strategy}
### Use custom strategy {#use-custom-strategy}

After we have created the strategy definition, we can now decide to use that activation strategy for our feature toggle.

![The strategy configuration screen for the TimeStamp strategy. It shows the strategy from above with a date entered into the "enableAfter" field.](/img/timestamp_use_strategy.png)

In the example we want to use our custom strategy for the feature toggle named `demo.TimeStampRollout`.

#### Client implementation {#client-implementation}
### Client implementation {#client-implementation}

All official client SDK's for Unleash provides abstractions for you to implement support for custom strategies.

Expand Down

0 comments on commit caa5ae1

Please sign in to comment.