iOS SDK - Loyalty Objects

DOCS

Last updated: Aug 15th, 7:00am

Loyalty Domain Objects

The following domain objects contain data that is specific to managing a user’s loyalty subscriptions such that the wallet behaves accordingly when the user accumulates loyalty rewards for qualifying purchases.

PDAccrualActivity

Summarizes the point accumulation following a particular transaction.

PropertyDescription
loyaltyProgramUriString
The unique identifier of the particular loyalty program that was affected by the transaction.
pointsBalanceInteger
The total number of points accrued at the time of the transaction.
pointsEarnedInteger
The points that are added or subtracted based on completion of an eligible transaction.
pointsPostStatusPDPointsPostStatus Enum
The current state of a point addition or subtraction.
pointsToRewardBalanceInteger
The number of points still required to meet the minimum amount required to redeem a reward. For example, if the minimum reward is 200 points and the current balance is 175, this value is 25.
rewardbalanceAmountNSNumber
The value of the awards you have earned. For example, if you earn $5 for every 1000 points and you have 2500 points, this value equals 10.00.

PDGlobalProfileAdditionalData

A custom property that extends the loyalty global profile definition with information that is relevant for a specific use case.

PropertyDescription
keyString
The name of the property that this object represents.
valueString
The value ascribed to the property for the specific profile in which it is included.

PDLoyaltyProgram

Identifies a particular loyalty program in the WLW platform.

PropertyDescription
loyaltyProgramUriString
The unique identifier of the user’s loyalty registration.
paymentAccountNetworkTypeUriString
The code identifier of the payment network types available for this loyalty program. For example, Paydiant.LoyaltyAccNetwork.
paymentAccountTypeUriString
The code identifier of the payment account tender type, for example, Credit, Debit, Gift, or Loyalty.
loyaltyProgramStatusPDLoyaltyProgramStatus Enum
The current state of the loyalty program’s use.
loyaltyProgramTypePDLoyaltyProgramType Enum
The manner in which the loyalty program earns and redeems rewards.
loyaltyProgramArtifcatsPDLoyaltyProgramArtifact
An array of the set of loyalty artifact objects that are relevant to the specific loyalty program.

PDLoyaltyProgramArtifact

Specifies how a loyalty program is represented in the mobile app.

PropertyDescription
contentString
The text that appears in the abstract when the loyalty program is shown in the Loyalty Programs menu in the app.
artifactContentTypePDLoyaltyProgramArtifactContentType Enum
The format of the content.
artifactViewTypePDLoyaltyProgramArtifactViewType Enum
The specific viewing definition for this artifact.

PDLoyaltyReceipt

Represents the loyalty specification for a specific type of transaction.

PropertyDescription
accrualActivityUriString
The unique identifier of the activity that generated the points accrual.
loyaltyAccrualActivityTypePDLoyaltyAccrualActivityType
The type of activity that qualified for points accrual, based on the PDLoyaltyAccrualActivityType Enum:
kPDLoyaltyAccrualActivityTypePurchase
kPDLoyaltyAccrualActivityTypeRefund
kPDLoyaltyAccrualActivityTypeVoidPurchase
kPDLoyaltyAccrualActivityTypeVoidRefund
kPDLoyaltyAccrualActivityTypeExternalActivity
kPDLoyaltyAccrualActivityTypeEnrollment
kPDLoyaltyAccrualActivityTypeNone (default)
loyaltyProgramUriString
The unique identifier of the particular loyalty program that was affected by the transaction.
pointsInteger
The total number of points accrued or subtracted for the activity.

PDTransactionLoyaltyAccrualActivity

Summarizes the loyalty activity pertaining to a qualified transaction.

PropertyDescription
accrualActivityUriString
The unique identifier of the qualified action that earned the loyalty accrual.
loyaltyAccrualActivityTypePDLoyaltyAccrualActivityType
The qualified activity category into which the performed action falls.
loyaltyProgramUriString
The unique identifier of the particular loyalty program that was affected by the transaction.
paydiantReferenceIdString
The unique identifier of the transaction within the WLW service.
pointsInteger
The total number of points accrued or subtracted for the action performed.
amountNSNumber
The total dollar amount of the completed transaction.
transactionAmountDecimal
Deprecated as of SDK 5.5 and replaced by amount.
transactionDateNSDate
The time and date at which the transaction was completed.
transactionWeightInteger
The value used to calculate how many points are earned for completion of the particular loyalty activity.

Loyalty Message Objects

PDRetrieveGlobalProfileMetadataResponse

Returns the set of properties that defines a user loyalty profile.

PropertyDescription
globalProfileAdditionalDataArray
The set of PDGlobalProfileAdditionalData instances representing custom properties required for loyalty registration.

PDRetrieveAvailableLoyaltyProgramsResponse

Returns the set of loyalty programs available to the logged-in user.

PropertyDescription
loyaltyProgramsArray
The set of PDLoyaltyProgram objects that define the loyalty programs for which the logged-in user is eligible to subscribe.

PDRetrieveMyLoyaltyProgramsResponse

Returns the set of loyalty programs to which the user is subscribed.

PropertyDescription
loyaltyProgramsArray
The set of PDLoyaltyProgram objects that define the loyalty programs in which the logged-in user is currently enrolled.

PDRetrieveLoyaltyProgramRequest

Specifies the loyalty program requested by the app.

PropertyDescription
loyaltyProgramUriString
This is the unique identifier of the loyalty program being requested.

PDRetrieveLoyaltyProgramResponse

Returns the set of loyalty programs the user is subscribed to. 
|Property|Description| |---|---| |loyaltyProgram|PDLoyaltyProgram
Object that defines the loyalty program requested.|

PDRegisterCustomerForLoyaltyRequest

Passes the user-input values for properties required for the registerCustomerForLoyalty method.

PropertyDescription
variableProperties in this object vary based on what is returned in the PDRetrieveGlobalProfileMetadataResponse of the retrieveGlobalProfileMetadata method.
globalProfileAdditionalDataArray
The set of PDGlobalProfileAdditionalData instances that identify any custom properties relevant to the loyalty profile.

PDRecordExternalActivityRequest

Requests the information about a transaction completed outside the app that resulted in loyalty point accrual activity.

PropertyDescription
externalActivityTypePDActivityType Enum
Defines the eligible action that merits the points accrual.
externalActivityWeightString
The value that is assigned to the external activity that is used to calculate how many points are earned for its completion.
externalActivityUriString
This is the unique identifier of the external activity that was completed.

PDRecordExternalActivityResponse

Returns the total loyalty points accrued for the logged-in user.

PropertyDescription
accrualActivitiesArray
The set of PDTransactionLoyaltyAccrualActivity objects that define the points awarded for a qualifying event performed outside of the mobile wallet.

PDTransactionLoyaltyPointsResponse

The transaction loyalty points response object returns the loyalty points that were awarded for the specified transaction.

PropertyDescription
accrualActivitiesArray
The set of PDTransactionLoyaltyAccrualActivity objects that define the points that were awarded for a particular qualifying event.

Loyalty Enums

PDPointsPostStatus

Enum
kPDPointsPostStatusPosted
kPDPointsPostStatusPending
kPDPointsPostStatusFailed
kPDPointsPostStatusCancelled
kPDPointsPostStatusNone (default)

PDLoyaltyProgramStatus

Enum
kPDLoyaltyProgramStatusActive
kPDLoyaltyProgramStatusNone(default)

PDLoyaltyProgramType

Enum
kPDLoyaltyProgramTypePointsToMoney
kPDLoyaltyProgramTypeNone (default)

PDLoyaltyProgramArtifactContentType

Enum
kPDLoyaltyProgramArtifactContentTypeText
kPDLoyaltyProgramArtifactContentTypeUrl
kPDLoyaltyProgramArtifactContentTypeNone (default)

PDLoyaltyProgramArtifactViewType

Enum
kPDLoyaltyProgramArtifactViewTypeThumbnail
kPDLoyaltyProgramArtifactViewTypeImage
kPDLoyaltyProgramArtifactViewTypePointsInformation
kPDLoyaltyProgramArtifactViewTypeDetails
kPDLoyaltyProgramArtifactViewTypeConfirmation
kPDLoyaltyProgramArtifactViewTypeTermsAndConditions
kPDLoyaltyProgramrArtifactViewTypeTitle
kPDLoyaltyProgramArtifactViewTypeDescription
kPDLoyaltyProgramArtifactViewTypeAdditionalInformation
kPDLoyaltyArtifactViewTypeNone (default)

PDLoyaltyAccrualActivityType

Enum
kPDLoyaltyAccrualActivityTypePurchase
kPDLoyaltyAccrualActivityTypeRefund
kPDLoyaltyAccrualActivityTypeVoidPurchase
kPDLoyaltyAccrualActivityTypeVoidRefund
kPDLoyaltyAccrualActivityTypeExternalActivity
kPDLoyaltyAccrualActivityTypeEnrollment

|kPDLoyaltyAccrualActivityTypeNone (default)

PDActivityType

Enum
kPDExternalActivityTypeGameLevelReached
kPDExternalActivityTypeSocialNetworking
kPDExternalActivityTypeNone (default)