Skip to content

Assign promo code

Assign Promo CodeΒΆ

Description

The action is used to assign a promo code from a campaign to a member.

Parameters

Parameter Type Format Description
Campaign Code String Text The campaign code to assign a promo code from

JavaScript API

UDF.assignPromoCode(campaignCode, callback)

Events Triggered

Possible Errors

Error Code Error Message Description
2087 Promo campaign with code %s not found Reported if the promo campaign code isn't found
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 campaign exists and is within its effective period
  • Updates promo code status from 'New' to 'Assigned'
  • Sets assignment date to current time
  • Validates campaign belongs to member's program