Documentation Home

Provisioning the Gift Card and sending out an email

When a customer purchases a Gift Card, the recipient will receive an email containing the Gift Card code that they can then use to redeem on your site.

Provisioning the Gift Card

The purchased gift card is provisioned during the checkout workflow via the GiftCardProvisionActivity. By default, this activity looks at any Fullfillment Groups of type GIFT_CARD and attempts to provision it. This activity is also responsible for sending out an email to the recipient of these gift cards. This activity is injected into the blCheckoutWorflow by merging it in with order 5500

    <bean p:order="5500" id="blGiftCardProvisionActivity" class="com.broadleafcommerce.accountcredit.core.workflow.GiftCardProvisionActivity"/>

You can override this bean defined in bl-account-credit-base-applicationContext.xml to customize the provisioning process.

Customizing the Email

You can customize the email being sent by overriding the following bean defined in bl-account-credit-base-applicationContext.xml

    <bean id="blGiftCardEmailInfo" parent="blEmailInfo">
        <property name="subject" value="You have received a gift card to The Heat Clinic!"/>
        <property name="emailTemplate" value="giftCard-email"/>
    </bean>

The patch file included with this documentation demosite.diff includes a Thymeleaf template: giftCard-email.html which you can use as a sample.