Create Campaign

Campaigns are the core of your loyalty program. See the sample example of how this can be configured. Links to more detailed instructions can be found at the end of the article.

How this example works

OpenLoyalty allows you to create various types of campaigns to engage and reward your customers. You can set up point-based campaigns, referral campaigns, or even time-based promotions.

Creating campaigns is a complex process, but using the admin panel can simplify it.

In this example, we will create a campaign that rewards a member with 100 points for each transaction.


Try yourself

  • Input the previous saved token and storeCode in the request header

  • Create a campaign Endpoint: POST /api/{storeCode}/campaign

    {
        "campaign": {
            "type": "direct",
            "trigger": "transaction",
            "translations": {
                "en": {
                    "name": "Get 100 points for any transaction",
                    "description": ""
                }
            },
            "activity": {
                "startsAt": "2024-01-01 00:00+00:00",
                "endsAt": null
            },
            "rules": [
                {
                    "effects": [
                        {
                            "effect": "give_points",
                            "pointsRule": "100",
                            "walletCode": "default"
                        }
                    ]
                }
            ],
            "labels": [],
            "limits": {},
            "active": true
        }
    }

Endpoints used


More resources

For a detailed overview and description of the campaign creation and management, please refer to these series of articles:

Last updated

Was this helpful?