Saturday, September 7, 2024

Introduce Loyalty Playing cards to Your Software with Samsung Pockets

Introduction

The Samsung Pockets software enables you to retailer playing cards that can be utilized for numerous functions. If you wish to present reward factors to your members, use the newly launched loyalty card sort, also referred to as a membership card.

On this article, we present how one can create a loyalty card within the Pockets Companions Portal. We additionally present tips to implement the cardboard, so as to combine the loyalty card into your software.

Card setup

Earlier than including the cardboard to Samsung Pockets, create your card within the Pockets Companions Portal.

  1. Log in to the Pockets Companions Portal.
  2. Choose Pockets Playing cards from the sidebar after which navigate to Create Pockets Card.
  3. Observe the directions within the Common data part to finish the shape.
  4. Choose “Loyalty card” from the Pockets Card Template menu.
  5. Choose your location from the Principal (Headquarters) Location menu. In the event you get a “nation not supported” error throughout a later part, contact Samsung Developer Assist.

After finishing the shape, save the cardboard. All created playing cards are listed within the Handle Pockets Card view. You possibly can view, edit, and delete the cardboard data from this view. Lastly, launch the cardboard.

Card specification

As soon as a card is created within the Pockets Companions Portal, the cardboard may be applied within the accomplice software in order that the person should buy and use it. To take action, implement the “Add to Samsung Pockets” button in your software. For this goal, generate a Card Knowledge Token and create a closing URL. This URL is built-in with the “Add to Samsung Pockets” button so as to add the cardboard to Samsung Pockets.

For producing a Card Knowledge Token, you could outline the Pockets card information. The loyalty card follows the specification beneath.

Title Description
title Required. The primary title of the loyalty card.
Within the pattern card, this area has the worth “Card Title”.

eventId Non-obligatory. The occasion ID. Use this ID to search out and course of an motion to an occasion to all loyalty playing cards with the identical ID.
groupingId Non-obligatory. Identifier to group associated playing cards.
subtitle1 Non-obligatory. An auxiliary area for displaying supporting details about your card.
logoImage Non-obligatory. Brand picture displayed within the card merchandise. The picture dimension have to be a most of 256 KB.
logoImage.darkUrl Non-obligatory. Brand picture displayed within the card merchandise in darkish mode. The picture dimension have to be a most of 256 KB.
logoImage.lightUrl Non-obligatory. Brand picture displayed within the card merchandise in gentle mode. The picture dimension have to be a most of 256 KB.
providerName Required. Supplier title for the loyalty card.
startDate Non-obligatory. Card validity begin date. The date format is an epoch timestamp in milliseconds.
endDate Non-obligatory. Card validity finish date. The date format is an epoch timestamp in milliseconds.
places Non-obligatory. Record of places the place the cardboard can be utilized. This data can be utilized to supply location-based service and Samsung Pockets can use this data to indicate maps, place names and addresses. You could find extra in regards to the location area and the JSON format within the documentation.

noticeDesc Non-obligatory. The Notices part can be utilized for any extra data in your card. You need to use HTML tags with none CSS or script on this area.
For the check card, this area incorporates the next record:

<ul>
   <li>Loyalty card discover. <a href=”https://www.samsung.com/”>Be taught extra.</a></li>
   <li>Loyalty card discover.</li>
</ul>

csInfo Non-obligatory. Customer support data seen to the cardboard person. This data is saved as key-value pairs with the next keys that correspond with the classes of data proven to the person:
appLinkLogo Required. Software hyperlink emblem URL
appLinkName Required. Software hyperlink title
appLinkData Required. Software hyperlink vacation spot URL

bgImage Non-obligatory. Background picture for the cardboard
bgColor Non-obligatory. Background colour for the cardboard.
In the event you use bgColor along with bgImage, they’re displayed in a predefined ratio. To solely show a background picture, omit the bgColor worth. The next picture exhibits the distinction between a situation the place each bgImage and bgColor are used (left) to 1 the place solely bgImage is used (proper).

fontColor Non-obligatory. Font colour on the cardboard artwork.
barcode.worth Non-obligatory. Barcode information and serial quantity.
barcode.serialType Non-obligatory. Barcode presentation sort.
For extra particulars, see the Presentation Varieties (serialType) desk.
barcode.ptFormat Non-obligatory. Barcode presentation format.
You could find all supported presentation codecs within the Presentation Codecs (ptFormat) desk.
barcode.ptSubFormat Non-obligatory. Barcode format. Some generally used barcode codecs are listed within the Barcode Codecs (ptSubFormat) desk.
barcode.errorCorrectionLevel Non-obligatory. QR code error correction stage. 4 error correction ranges can be found: L/M/Q/H.

merchantId Non-obligatory. Service provider identifier. Use this area when you’ve got service provider ID.
merchantName Non-obligatory. Service provider title.
quantity Non-obligatory. Whole quantity of factors or preliminary stability.
It is strongly recommended to make use of a one-letter forex image. Use any of those codecs: $1,000 or 1,000P.
stability Non-obligatory. Out there factors or remaining stability. Use the identical format as the quantity area.

Card JSON instance

The cardboard information have to be within the JSON format and must observe the precise construction.

The instance beneath exhibits a card information pattern that we have now used to implement the loyalty card used on this content material. Modify the cardboard information as per your card data. Discover extra in regards to the card information format within the Pockets Playing cards documentation.

{
    "card": {
        "sort": "loyalty",
        "subType": "others",
        "information": [
            {
                "refId": "9400ae65-751b-4327-866c-37e8c228f1c4",
                "createdAt": 1672574400000,
                "updatedAt": 1672574400000,
                "language": "en",
                "attributes": {
                    "title": "Card Title",
                    "eventId": "event-001",
                    "groupingId": "group-001",
                    "orderId": "order-001",
                    "subtitle1": "Card Subtitle",
                    "logoImage": "https://kr-cdn-gpp.stg.mcsvc.samsung.com/devops/ops/partner-portal/test-tool/assets/img/ticket_movie.jpg",
                    "logoImage.lightUrl": "https://kr-cdn-gpp.stg.mcsvc.samsung.com/devops/ops/partner-portal/test-tool/assets/img/ticket_movie.jpg",
                    "logoImage.darkUrl": "https://kr-cdn-gpp.stg.mcsvc.samsung.com/devops/ops/partner-portal/test-tool/assets/img/ticket_movie.jpg",
                    "providerName": "Provider Name",
                    "startDate": 1715533051242,
                    "endDate": 1715833051242,
                    "noticeDesc": "<ul><li>Loyalty card notice. <a href="https://www.samsung.com/">Learn more.</a></li><li>Loyalty card notice.</li></ul>",
                    "csInfo": "{"website":"https://homepage.com/cs","email":"cs@email.com","call":"555 333 111"}",
                    "appLinkLogo": "https://play-lh.googleusercontent.com/ZnFa1roZ7hpv9j-jIAcBjmjuDl2x-FnuwTE0OYvbbcwvf5VPzOQQiKBXGK7d-APTvag=w240-h480-rw",
                    "appLinkName": "Loyalty Card Link",
                    "appLinkData": "www.samsung.com",
                    "bgImage": "https://djcpagh05u38x.cloudfront.net/wlt/us/stg/x1IWgocnRoqA5DmWPykfKQ/QUPknpwnTMqt7letkguFag.png",
                    "bgColor": "#ffffff",
                    "fontColor": "#ffffff",
                    "locations": "[{"lat":48.861614505643196,"lng":2.380811870098114,"address":"38 Rue Saint-Maur, 75011 Paris","name":"Atelier des Lumieres"}]",
                    "quantity": "$1,000",
                    "stability": "$100",
                    "barcode.worth": "CS16138353212584806754FG1802",
                    "barcode.serialType": "QRCODE",
                    "barcode.ptSubFormat": "QR_CODE",
                    "barcode.ptFormat": "QRCODESERIAL",
                    "barcode.errorCorrectionLevel": "M",
                    "merchantId": "123344433",
                    "merchantName": "MerchantName"
                }
            }
        ]
    }
} 

As soon as the cardboard information specification particulars and the JSON construction of the loyalty card are established, we will check the “Add to Samsung Pockets” performance.

First, we use the Add to Pockets Take a look at Device as this instrument offers minimal card information in JSON format by default. After that, you’ll be able to modify the JSON information and check the playing cards as you need.

Observe the directions beneath to make use of the Add to Pockets Take a look at Device. For extra particulars, check with the Add to Pockets Take a look at Device documentation.

  1. Register to the Add to Pockets Take a look at Device.
  2. Enter the non-public key within the Enter Accomplice Personal Key area.
  3. Choose the loyalty card we have now created after which enter the JSON within the information area.
  4. Lastly add the cardboard to Samsung Pockets.

Create JWT token

If testing with Add to Pockets Take a look at Device is profitable, you’ll be able to implement the “Add to Samsung Pockets” performance together with your software or web site and deal with the Card Knowledge Token era course of in your server. Lastly, generate the URL and combine it with the “Add to Samsung Pockets” button.

For extra particulars on the implementation, try our Implementing “Add to Pockets” in an Android Software article, which is an entire information to implementing the “Add to Samsung Pockets” button on an Android software and dealing with the Card Knowledge Token era course of on the server aspect.

Conclusion

As soon as the implementation of each the appliance and server is accomplished, you’ll be able to combine the loyalty card together with your manufacturing server and carry out a full check on the loyalty card. After the check is completed, an admin will verify and set the cardboard as Energetic.

Whereas implementing your card, observe the steps proven in Seamlessly Combine “Add to Pockets” for Samsung Pockets, as this text focuses on the widespread errors.

When you have any questions or face difficulties implementing the cardboard, you’ll be able to contact Samsung Developer Assist.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles