Trigger Referral
growsurf_trigger_referralTriggers referral credit for a referred participant when a sign-up plus qualifying action occurs; optionally delays the award by 0-90 days to cover refund windows.
Instructions
Trigger referral credit for a referred participant (use when your trigger is Sign up + Qualifying Action). Optionally pass delayInDays (whole days, 0-90) to hold the credit for N days before awarding it (e.g. to cover a refund window). Omit it, or pass 0, to award credit immediately. Targets campaignId if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaignId | Yes | Target program id for this call: the `id` returned by `growsurf_list_campaigns`, not the program name or a share URL. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Program IDs also identify newly created programs without restarting the server. | |
| delayInDays | No | ||
| participantId | No | ||
| participantEmail | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | No | Human-readable result message. Present when credit was not awarded immediately. | |
| success | No | Whether referral credit was awarded, scheduled, or cancelled. |