Skip to main content
Watch "Discover Agentforce: What AI Was Meant to Be" on Oct. 29. Register for free.

Explore Salesforce API Solutions

Learning Objectives

After completing this unit, you’ll be able to:

  • List the POS Integration kits in Loyalty Management integrations.
  • Describe the types of business APIs.
  • Explain the use of invocable actions.
  • Explain how SObject APIs are used.

Integrate Loyalty with External Systems

To build and maintain integrations between different software systems, developers have access to the following tools.

  • POS Integration Kits
  • Business APIs
  • Invocable Actions
  • SObject APIs

Let’s explore each tool and understand how it’s used for Cloud Kicks’s requirements.

Set Up POS Integration Kits

The first task on Eugene’s list is to integrate the loyalty program with the POS systems. This integration allows loyalty program data to be updated in real time or near–real time within the POS system. This in turn means a better customer experience because members can easily earn and redeem loyalty points or rewards at the point of purchase.

Cloud Kicks has many stores across the country, and all the POS systems must be integrated with the loyalty program. So when customers are at the store, they can provide their membership ID and the system applies any vouchers or discounts applicable to them.

Eugene sets up this integration through a couple of out-of-the-box Salesforce integration packages.

To integrate the two systems, install the Loyalty Management POS API, an unlocked package. Watch this helpful video to learn how the Loyalty Management POS API unlocked package works.

Alternatively, you can set up the Loyalty Management POS API powered by MuleSoft.

Because the Loyalty Management POS API is an unlocked package, you can modify it to meet your requirements. If the POS kit doesn’t meet some of your requirements, you can either edit the kit or create your own APIs. Next, let’s explore how Eugene integrates a third-party ecommerce platform using APIs.

Use Business APIs to Automate Loyalty Processes

Business APIs enable you to automate everyday business processes. Cloud Kicks Inner Circle has some standard everyday processes, such as enrolling members, updating member details, and crediting points. These processes are triggered when members perform an eligible loyalty transaction such as a purchase on the ecommerce site. Because Cloud Kicks uses a third-party ecommerce platform, the platform must be integrated with Loyalty Management to track customer purchases, points accumulation, and rewards redemption.

Eugene uses business APIs to integrate the processes in Loyalty Management with external systems. Depending on the complexity of the task, he can use two types of business APIs: static APIs and configurable APIs.

Static APIs

Use static APIs for simple tasks that don’t require customizations.

The Cloud Kicks Inner Circle loyalty program has a non-qualifying currency called Regular Points. When members enroll in the program, they receive 100 Regular Points. Mary has set up a loyalty program process to enroll members and credit points. She uses the Credit Points standard invocable action to set up the loyalty process.

The Credit Points action used in a loyalty program process rule.

For this process to work, Eugene sets up an integration with the Experience site where members sign up. To configure the Credit Points standard invocable action, he uses the associated URI and creates the required inputs. When it’s set up, here’s how the configuration works.

  • As soon as a member enrolls, the system triggers the Credit Points static API integrated with the Experience site.
  • The API creates a transaction journal record for enrollment and triggers the related loyalty program process.
  • The loyalty program process in turn updates the member’s point balance using the currency name and points to credit value.

In time, the loyalty program evolves to have multiple tiers, rewards, and more. When Mary adds more conditions to the credit points process, it’s time to use configurable APIs.

Configurable APIs

Use configurable APIs when you have frequent promotions that involve changing rewards or eligibility criteria. To cater to the growing member base, Mary wants to create complex rules for crediting points that involve promotions. Based on the new rules, members receive points equal to their transaction amount, and if the product purchased is part of an ongoing promotion, they receive additional points.

Loyalty Management offers a Credit Points loyalty program process template. Mary clones the template and customizes it to her requirements.

The Credit Points action used in a Credit Points loyalty program process template.

Eugene sets up an integration with the external ecommerce site. Let’s understand how the API works when a member makes a purchase.

  • When a member makes a purchase, they only accrue points. The points haven’t been credited yet.
  • A configurable API is integrated with the external system and executes when the member accrues points.
  • The API runs the related loyalty program process and updates the member’s points balance using the currency name and points to credit values provided in the API request.

Next, let’s see how Eugene uses invocable actions to execute the loyalty processes.

Simplify Code with Invocable Actions

Developers can write code for custom and reusable tasks, and package them into invocable actions. Invocable actions are highly portable actions used in declarative tools such as Flows and Promotion Setup. Provide inputs and the actions return useful outputs.

Eugene uses the Run Program Process for Transaction Journal invocable action in a flow to trigger the loyalty processes. When a transaction journal is created, depending on the journal type and subtype of the transaction, the action triggers the relevant loyalty program processes.

The New Action window for the Run Program Process for Transaction Journal action.

The invocable action lists the custom actions associated with all the available loyalty program processes. It then triggers an active loyalty program process using its corresponding custom invocable action.

Interact with Salesforce Objects Using SObject APIs

SObject APIs allow developers to interact with and manipulate Salesforce objects, records, and data programmatically. These APIs let you create, read, update, and delete records. You can also query and search for data on standard and custom Salesforce objects. Let’s understand how Cloud Kicks uses this type of API.

Mary wants insight into customer preferences, including their hobbies and activities. With these insights, she wants to create member segments for personalized promotions and communications. She rolls out a survey to all the members using a survey platform. The responses are collected and stored in the survey platform’s database.

Eugene then integrates the survey platform with Loyalty Management using an SObject API, in this case, the Loyalty Program Member object. This integration allows for survey response data to be transferred to Loyalty Management.

After the successful transfer of survey responses, Mary uses this data to create member segments based on customer preferences such as hobbies and activities. She can then tailor personalized promotions and communications to specific groups of members.

SObject APIs facilitate integration with other systems by retrieving and synchronizing member data, including contacts, accounts, and custom objects associated with the loyalty program.

You’ve learnt how the different API solutions integrate Loyalty Management with other platforms. For each integration requirement, design the overall architecture of the integration and determine how the loyalty program interacts with external systems. Based on your findings, use the right APIs that facilitate the integration.

When using APIs to integrate external applications into Salesforce, you must also set up an in-between app. In the next unit, you learn how Eugene sets this up to complete the integration process.

Resources

Salesforce ヘルプで Trailhead のフィードバックを共有してください。

Trailhead についての感想をお聞かせください。[Salesforce ヘルプ] サイトから新しいフィードバックフォームにいつでもアクセスできるようになりました。

詳細はこちら フィードバックの共有に進む