Adding referral rule with advanced filter

Asked on October 18, 2016 in Technical.

I am trying to add two reward rules to branch. One that adds an “invited” (not default) credit for all referring users who trigger the event open. And one that adds an “installed” credit for all referring users who trigger the event install.  That alone works. Now I want to restrict the rewards by adding advanced filter like channel (key) must be ios (value) and feature (key) must be feature1 (value) and which is not working. I figured that probably it must be a key value pair that is added to metadata of the branch universal object since the reward rule interface automatically prepends “event.metadata.” to the key. So I added a metadata key value pair type (key) and type1 (value). But the rule does not increase credits once I add an advanced filter. How can I make this work? Am I missing an important point with the filter rules?

1 Answer(s)
Answered on October 18, 2016.

Hey – can you create a ticket for our integrations team here with your app details so we can dive deeper into this ?

Commented on October 19, 2016.

Thanks for the quick response. In the meantime I figured some things out I was probably doing wrong. I am now sending a custom event when starting a share

branch.userCompletedAction(“custom_share”, withState: [“type” : “invite”]) //similar to Share Started in Branch

and sending the same custom event with different parameters from initSessionWithLaunchOptions when the parameters contain

+clicked_branch_link: 1 //opened from branch link
+is_first_session: 1 //install

branch.userCompletedAction(“custom_share”, withState: [“type” : “accept”])

My reward rules now say:

Referring users get 1 custom_accept credit every time users they’ve referred trigger the event custom_share
+ Filter event.metadata.type = “accept”

All acting users get 1 custom_invite credit every time they trigger the event custom_share
+ Filter event.metadata.type = “invite”

Everything works now as intended. Only thing that is weirdI could not formulate the rules yesterday since the custom event in the event drop down in Dashboard > Referrals > Add a new rule did not appear. Today it was there. Any ideas, why that is?

I still have the problem that the Branch ID of my device somehow gets / got split up to two Branch IDs, which now does not show the developer identity but Anonymous instead.  But that may be another issue?

Commented on October 20, 2016.

Hi! Glad you got this working. The missing dropdown yesterday could have been due to a UI update we just released, so keep an eye out and let us know if it comes up missing again in future.

Referrals and device IDs can be especially challenging to test because Branch has so many anti-fraud protections in place. Are you using the debug mode on your device?

Branch — Developer