跳至主要内容

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 — adds value units of virtual_currency_id to the player's balance. Both fields are required, and value runs from 1 to 10^18.
  • GrantPointsNode — adds value points to a loyalty program (loyalty_id), a progression program (progression_program_id), or both, and can announce it with show_points_popup. Only value is 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

ResourceChange
create_campaign, update_campaignAdded the four nodes to the graph.nodes discriminator and oneOf
get_campaign_graph, update_campaign_graphAdded the four nodes to the graph nodes discriminator and oneOf
get_campaigns, get_campaigns_by_ids, get_campaignAdded email_submitted to the campaign type enum
create_campaign, update_campaign, update_campaign_graphAdded 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 nodes map with model_type set to EmailPromptActionNode, WebpushPromptActionNode, GrantVirtualCurrencyNode, or GrantPointsNode.
  • Clients that validate campaigns against a generated model should regenerate, since these node types can now appear in nodes and email_submitted can now appear as a campaign type.

需要技术支持?
联系我们的集成技术团队: [email protected]