Skip to content

Assign and redeem promo code

Assign And Redeem Promo CodeΒΆ

Description

The action is used to assign and immediately redeem a promo code in a single operation.

Parameters

Parameter Type Format Description
Promo Code String Text The promo code to assign and redeem

JavaScript API

UDF.assignAndRedeemPromoCode(promoCode, callback)

Events Triggered

Possible Errors

Error Code Error Message Description
2089 Promo code %s to be redeemed not found Reported if the promo code doesn't exist or isn't available
2088 Promo campaign with code %s expired Reported if the promo campaign's end date is before the activity date
2090 Promo campaign with code %s not started Reported if the promo campaign's start date is after the activity date

Additional Considerations

  • Validates promo code exists and is in 'New' status
  • Updates promo code status directly from 'New' to 'Redeemed'
  • Sets both assignment and redemption dates to current time
  • Validates campaign belongs to member's program