iOS SDK - Loyalty Objects
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.
| Property | Description |
|---|---|
loyaltyProgramUri | String The unique identifier of the particular loyalty program that was affected by the transaction. |
pointsBalance | Integer The total number of points accrued at the time of the transaction. |
pointsEarned | Integer The points that are added or subtracted based on completion of an eligible transaction. |
pointsPostStatus | PDPointsPostStatus EnumThe current state of a point addition or subtraction. |
pointsToRewardBalance | Integer 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. |
rewardbalanceAmount | NSNumber 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.
| Property | Description |
|---|---|
key | String The name of the property that this object represents. |
value | String 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.
| Property | Description |
|---|---|
loyaltyProgramUri | String The unique identifier of the user’s loyalty registration. |
paymentAccountNetworkTypeUri | String The code identifier of the payment network types available for this loyalty program. For example, Paydiant.LoyaltyAccNetwork. |
paymentAccountTypeUri | String The code identifier of the payment account tender type, for example, Credit, Debit, Gift, or Loyalty. |
loyaltyProgramStatus | PDLoyaltyProgramStatus EnumThe current state of the loyalty program’s use. |
loyaltyProgramType | PDLoyaltyProgramType EnumThe manner in which the loyalty program earns and redeems rewards. |
loyaltyProgramArtifcats | PDLoyaltyProgramArtifactAn 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.
| Property | Description |
|---|---|
content | String The text that appears in the abstract when the loyalty program is shown in the Loyalty Programs menu in the app. |
artifactContentType | PDLoyaltyProgramArtifactContentType EnumThe format of the content. |
artifactViewType | PDLoyaltyProgramArtifactViewType EnumThe specific viewing definition for this artifact. |
PDLoyaltyReceipt
Represents the loyalty specification for a specific type of transaction.
| Property | Description |
|---|---|
accrualActivityUri | String The unique identifier of the activity that generated the points accrual. |
loyaltyAccrualActivityType | PDLoyaltyAccrualActivityTypeThe type of activity that qualified for points accrual, based on the PDLoyaltyAccrualActivityType Enum:kPDLoyaltyAccrualActivityTypePurchasekPDLoyaltyAccrualActivityTypeRefundkPDLoyaltyAccrualActivityTypeVoidPurchasekPDLoyaltyAccrualActivityTypeVoidRefundkPDLoyaltyAccrualActivityTypeExternalActivitykPDLoyaltyAccrualActivityTypeEnrollmentkPDLoyaltyAccrualActivityTypeNone (default) |
loyaltyProgramUri | String The unique identifier of the particular loyalty program that was affected by the transaction. |
points | Integer The total number of points accrued or subtracted for the activity. |
PDTransactionLoyaltyAccrualActivity
Summarizes the loyalty activity pertaining to a qualified transaction.
| Property | Description |
|---|---|
accrualActivityUri | String The unique identifier of the qualified action that earned the loyalty accrual. |
loyaltyAccrualActivityType | PDLoyaltyAccrualActivityTypeThe qualified activity category into which the performed action falls. |
loyaltyProgramUri | String The unique identifier of the particular loyalty program that was affected by the transaction. |
paydiantReferenceId | String The unique identifier of the transaction within the WLW service. |
points | Integer The total number of points accrued or subtracted for the action performed. |
amount | NSNumber The total dollar amount of the completed transaction. |
transactionAmount | Decimal Deprecated as of SDK 5.5 and replaced by amount. |
transactionDate | NSDate The time and date at which the transaction was completed. |
transactionWeight | Integer 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.
| Property | Description |
|---|---|
globalProfileAdditionalData | Array 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.
| Property | Description |
|---|---|
loyaltyPrograms | Array 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.
| Property | Description |
|---|---|
loyaltyPrograms | Array 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.
| Property | Description |
|---|---|
loyaltyProgramUri | String 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.
| Property | Description |
|---|---|
variable | Properties in this object vary based on what is returned in the PDRetrieveGlobalProfileMetadataResponse of the retrieveGlobalProfileMetadata method. |
globalProfileAdditionalData | Array 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.
| Property | Description |
|---|---|
externalActivityType | PDActivityType EnumDefines the eligible action that merits the points accrual. |
externalActivityWeight | String The value that is assigned to the external activity that is used to calculate how many points are earned for its completion. |
externalActivityUri | String This is the unique identifier of the external activity that was completed. |
PDRecordExternalActivityResponse
Returns the total loyalty points accrued for the logged-in user.
| Property | Description |
|---|---|
accrualActivities | Array 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.
| Property | Description |
|---|---|
accrualActivities | Array 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) |