82 Serialized Coupon Services

This chapter provides the information necessary to send messages contained in the Serialized Coupon API. Information can be obtained using the Web Service Description Language (WSDL) in conjunction with a Simple Object Access Protocol (SOAP), XML Schema, and various methods contained in the classes of the API to provide the web service described above.

The URL for the WSDL is:

https://<servername>:<portNumber>/ws/v1_0/SerializedCouponServices?wsdl

where <servername> is the name or address of the server. For a cloud installation, the default port number is 443.

The information presented below describes the methods and classes.

The format of the method and any arguments is shown along with an explanation of what the method does and any other information that is necessary to use the method properly. If an argument is shown in dark blue, it is a class and the class name is a link to a description of the class and its attributes.

The class section shows the attributes of the classes along with an explanation of each attribute and when necessary, when they are used.

Note:

Authentication is required. See Introduction for information on creating and implementing an authentication key.

Methods

This section presents the methods used in the Serialized Coupon Services API.

generateCouponsForPromotion

generatedCoupon[] generateCouponsForPromotion(                           long campaignId,                           long promotionId,                           string requestingUserId)     throws RelateProcessingException
Variable Required? Description

campaignId

[required]

ID of the campaign.

promotionId

[required]

ID of the promotion.

requestingUserId

[optional]

ID of the user generating the coupons.

The generateCouponsForPromotion method requests that all the serialized coupons for a promotion be generated.

This method returns an array of generatedCoupon elements.

generateNewCoupon

generatedCoupon generateNewCoupon(                string couponPrefix,                                    long campaignId,                long promotionId,                                    long dealId,                string requestingUserId)     throws RelateProcessingException
Variable Required? Description

couponPrefix

[optional]

Prefix for the coupon.

campaignId

[required]

ID of the campaign associated with the coupon.

promotionId

[required]

ID of the promotion associated with the coupon.

dealId

[required]

ID of the deal associated with the coupon.

requestingUserId

[optional]

ID of the user requesting the coupon generation.

The generateNewCoupon method requests that one serialized coupon be generated for a specified Campaign, Promotion, and Deal, and with a specified Coupon Prefix.

This method returns a generatedCoupon element.

redeemCoupons

couponActionResult[] redeemCoupons(                string[] couponList,                custIdentifier custIdentifier,                string operatorId,                long retailTransactionSequence,                long retailWorkstationId,                string retailLocationId,                dateTime retailTransactionBusinessDate,                boolean forceRedemption)     throws RelateProcessingException
Variable Required? Description

couponList

[optional]

Array of coupon IDs to be redeemed.

custIdentifier

[optional]

ID of customer associated with the transaction.

operatorId

[optional]

ID of associate performing the redemption.

retailTransactionSequence

[optional]

Sequence number of the transaction.

retailWorkstationId

[optional]

ID of the register where the redemption is being performed.

retailLocationId

[optional]

ID of the retail location where the redemption is taking place.

retailTransactionBusinessDate

[optional]

Business date of the redemption transaction.

forceRedemption

[required]

Indicates whether to force the coupon to be redeemed regardless of whether it meets the eligibility rules.

The redeemCoupons method submits a list of serialized coupons to be redeemed in a transaction that can, optionally, be associated with a specified customer.

This method returns an array of custIdentifier elements.

validateCoupons

couponActionResult[] validateCoupons(                  string[] couponList)     throws RelateProcessingException
Variable Required? Description

couponList

[optional]

Array of coupon IDs to be validated.

The validateCoupons method retrieves the current status of each coupon listed in a list of Coupon Codes.

This method returns an array of couponActionResult elements.

voidCoupons

couponActionResult[] voidCoupons(              string[] couponList,              string requestingUserId)     throws RelateProcessingException
Variable Required? Description

couponList

[optional]

Array of coupon IDs.

requestingUserId

[optional]

ID of the user performing the void.

The voidCoupons method changes a list of redeemed coupons to unredeemed coupons. This voids the coupon redemptions and enables them for use again.

This method returns an array of couponActionResult elements.

Classes

This section presents the classes used in the Serialized Coupon Services API.

RelateProcessingException

For a description of this class, see Introduction.

couponActionResult

The couponActionResult class contains the following elements:

Type Element Description

string

couponCode

Coupon Code for the redeemed coupon.

couponStatus

couponStatus

The status of the coupon following the coupon redeem request.

relateExceptionCode

processError

The exception code (if any) returned by the coupon redemption process.

custIdentifier

The custIdentifier class contains the following elements:

Type Element Description

string

alternateKey

Alternate ID for the customer.

string

alternateKeyTypeCode

Type Code for the Alternate ID.

string

cardNumber

Card Number associated with the customer.

string

relateCustomerId

Customer ID for the customer in Customer Engagement.

generatedCoupon

The generatedCoupon class contains the following elements:

Type Element Description

string

couponCode

The Coupon Code for the coupon.

string

couponPrefix

The Coupon Prefix for the coupon.

long

dealId

The ID of the deal associated with the coupon.

long

promotionId

The ID of the promotion associated with the coupon.