Prompt and grant action nodes for campaign graphs
What's new
Campaign graphs accept four new node types. Two of them ask the player for something:
EmailPromptActionNode— asks the player for their email with a hub popup.WebpushPromptActionNode— asks the player to allow browser push notifications with a hub prompt.
Both carry the same fields as the other hub popup nodes: body, content_type, button_text, button_link, items, and the offer-linking fields item_id, store_item_id, store_id, and link_created_offer.
The other two hand something to the player:
GrantVirtualCurrencyNode— addsvalueunits ofvirtual_currency_idto the player's balance. Both fields are required, andvalueruns from 1 to 10^18.GrantPointsNode— addsvaluepoints to a loyalty program (loyalty_id), a progression program (progression_program_id), or both, and can announce it withshow_points_popup. Onlyvalueis required, with a minimum of 1.
Campaigns also gained an email_submitted trigger type, which fires when a player submits their email — the event that pairs with EmailPromptActionNode.
The new nodes are campaign-only. Page graph_rules and segment-group graphs are unchanged.
Impact
A campaign can collect a marketing channel and reward the player for it in the same graph, without a webhook round trip to the game server. Granting currency or loyalty points no longer needs an out-of-band call to issue_loyalty_points.
Changes
| Resource | Change |
|---|---|
| create_campaign, update_campaign | Added the four nodes to the graph.nodes discriminator and oneOf |
| get_campaign_graph, update_campaign_graph | Added the four nodes to the graph nodes discriminator and oneOf |
| get_campaigns, get_campaigns_by_ids, get_campaign | Added email_submitted to the campaign type enum |
| create_campaign, update_campaign, update_campaign_graph | Added email_submitted to the campaign type enum on both the request and the response |
Upgrade
- No action required. To use a node, add an entry to the campaign graph
nodesmap withmodel_typeset toEmailPromptActionNode,WebpushPromptActionNode,GrantVirtualCurrencyNode, orGrantPointsNode. - Clients that validate campaigns against a generated model should regenerate, since these node types can now appear in
nodesandemail_submittedcan now appear as a campaigntype.
Need help?
Contact our integration team at [email protected]