Send gifts · Workspace: required (from goody_workspaces_list)
Creates a paused autogift rule — a recurring gift that sends automatically when a recipient hits a birthday, work anniversary, or onboarding milestone.
There are two ways to supply the gift contents — pick exactly one:
- (A) Clone a recently-sent gift batch with
source_order_batch_id. The cart, card, message, From name, payment method, and shipping are all pulled from that batch. - (B) Build from scratch (no prior send) — a cart plus
card_id,message, andpayment_method_id.
The rule is created paused. Call
goody_autogift_rules_activate once the user confirms — activation is what commits the recurring spend.Parameters
Required
An existing contact list — from
goody_contact_lists_list or goody_contact_lists_create. Mutually exclusive with contact_ids; supply exactly one.Contact UUIDs to gift. The tool creates an implicit list from them. Mutually exclusive with
contact_list_id; supply exactly one.The gift batch to clone, from
goody_order_batches_list. Mutually exclusive with a from-scratch cart; supply exactly one.From-scratch path
Supply these instead ofsource_order_batch_id to build the gift without a prior send.
A single product to gift, from
goody_products_search. Use this or cart.Greeting card UUID — from
goody_cards_list.The gift-card message. Personalization tags (e.g. the recipient’s first name) are filled per-recipient at send time.
The autopay payment method the rule charges on activation — from
goody_payment_methods_list. Recommended. Without it the rule is created but won’t activate.Optional (both paths)
When to send relative to the occasion —
send_on_anchor_date, send_before_anchor_date, or send_after_anchor_date.How many days before or after the occasion to send. Required when the send option is before or after.
Clone path only. When the source card’s occasion doesn’t match the event type, the request is rejected; set
true to override.