Introduction
As marketers, we sometimes need to delete cards to remove irrelevant or outdated promotional content that no longer serves its purpose. We should ideally remove the card when its expiry condition is met. However, there may be scenarios where you need to delete the card for a user before its expiry, such as:
- User availing the benefit: The user has already utilized the card benefits, making the card irrelevant.
- User feedback: If users consistently ignore or negatively react to a specific card, deleting it can improve campaign performance.
- Cleaning up clutter: Removing redundant or similar cards helps present a more streamlined experience for users, allowing us to deliver focused messaging.
Advantages of triggering card deletion
- Improved user experience: Automating Card Deletion based on specific trigger conditions helps improve the user experience and ensures the relevance of campaigns.
- Relevant information: Removing cards after a user has taken a specific action or when they are no longer eligible for a promotion ensures that the user interface remains clean and focused on relevant information.
- Reduced resource consumption: By removing outdated cards, you can optimize system performance and save resources.
- Increased efficiency: Automated card deletion streamlines campaign management and reduces manual effort.
We will achieve this use case by creating a Custom Connector campaign that automatically deletes cards based on predefined trigger conditions.
info |
Information You can also remove the card for the specific user manually using the Delete Cards API. |
Expected Result
Cards will be deleted depending on the trigger conditions.
library_add_check |
Prerequisites
|
Create a Custom Connector Campaign
In this section, we will create a Custom Connector campaign to delete a card automatically.
Step 1: Target Users
- On the left navigation menu in the MoEngage dashboard, click Engage, and then click Campaigns.
- On the All campaigns page, click + Create campaign.
- Under Connectors, click Custom > Event Triggered. For more information, refer to Event Triggered Campaigns.
You are taken to the first step, Target users, of defining your campaign. - Define your campaign with a name and tags. Enter the following details:
- Team: Select a team if your organization has teams enabled for your account. For more information, refer to Teams in MoEngage.
- Campaign name: Enter a name for the campaign. For example, Delete Card API Connector.
-
Campaign tags: Select the required campaign tags.
- In the Trigger criteria section, define the trigger condition by performing the following steps:
- In the IF user section, select Checkout Started.
- Click + Attribute and select Product IDs because they are unique attributes that can help you identify the card.
- Select the (any of) is operator because you want an exact match.
- In the Select Option list, select 8137850880291.
- In the Select audience section, define the audience as users who have executed the Card Campaign Sent event at least once in the last 3 days with the noted Campaign Id as shown below:
- In the Control groups section, turn the Global control group toggle off.
- Click Next to move to the second step, Content, where you can define the content for your custom connector campaign.
Step 2: Content
- In the Method section, select the DELETE option to configure the API request.
- In the Webhook URL box, type your URL. For example, https://api-0X.moengage.com/v1/cards/delete.
info Information
Because each user is hosted on a different data center, refer to the Data Centers in MoEngage article to find your data center number (value of X).
- Under Headers, type key names and their values as shown in the following table:
Key Sample Values Authorization {"Authorization": "Basic Base64_ENCODED_WORKSPACEID_APIKEY=="} Content_Type {"Content_Type": "application/json"}
For more information on the authentication key to be used in this request, refer to Delete Cards API. - Select the Body type as Raw and then enter the JSON code in the input field as follows:
{
"uid": "{{UserAttribute['ID']}}",
"campaign_ids": [
"{{readable_campaign_id}}"
],
"platforms": [
"android","web","ios"
]
}
Attribute Description uid Replace ID with the unique MoEngage Standard ID (Email ID Standard, Mobile Number Standard, or any unique identifier mapped to a MoEngage standard attribute) that identifies the user.
The Delete API will use this identifier to delete the card for the right user. You can add this value by personalizing it to the ID attribute.
campaign_ids Replace readable_campaign_id with the previously noted Campaign ID of the card you wish to remove.
For any additional configuration, refer to the Delete Cards API documentation. - Click Next to move to the third step, Schedule and goals, where you can define your campaign's schedule and goals.
Step 3: Schedule and Goals
- In the Send campaign section, define when to start and end this campaign.
- In the Conversion goals section, set the conversion goal as Card Campaign Dismissed with the attribute Campaign ID that you have identified before.
- In the Delivery controls section, define the settings based on your requirements.
- Click Publish.
Conclusion
In this use case, we created a Custom Connector campaign to delete a card automatically.
Now that we have created and published the card and its Delete Card API Connector campaign, the campaign will monitor users who meet the trigger condition and then request to delete the relevant card.
info |
Information
|