RCG Loyalty Management Cloud System System API - Implementation Template

(0 reviews)

home

This API implementation template is a component of the MuleSoft Accelerator for Consumer Goods, which accelerate the implementation of essential integration use cases.

The solution includes pre-built APIs, connectors, and integration templates that help unlock business-critical data from external systems and guide you in adopting best practices synthesized from thousands of customer implementations. Use these assets as is or extend them to meet your company’s unique needs.


Overview

This integration template implements the RCG Loyalty Management System API specification. It can be used to retrieve, create, and update Orders and Customers data.

Getting started

bulb.png The Getting Started with MuleSoft Accelerators guide provides general information on getting started with the accelerator components. This includes instructions on setting up your local workstation for configuring and deploying the applications.

Once your workstation has been set up and the application template imported into Anypoint Studio, proceed with the Prerequisites section.

Prerequisites

This implementation template has the following dependency:
- Custom objects
- Custom fields

Custom objects

  • Store__c
  • fulFillmentLocation__c
  • productPriceAdjustment__c
  • orderProductTax__c

Custom fields

The following fields must be created in the corresponding objects.

Salesforce ObjectField LabelField NameData TypeLengthUnique*ExternalId
Product2Global_Product_Id__cGlobal_Product_Id__cText36YY
OrderGlobal_SalesOrder_Id__cGlobal_SalesOrder_Id__cText36YY
OrderTotal_Tax__cTotal_Tax__cCurrency10NN
OrderShipping__cShipping__cCurrency16NN
OrderOrderTotalAmount__cOrderTotalAmount__cFormulaNN
AccountGlobal_Customer_Id__cGlobal_Customer_Id__cText36YY
Loyalty Member TierImageURL__cImageURL__cURL255NN
Loyalty Member TierDisplay__cDisplay__cText255NN
Store__caddressLine1__caddressLine1__cText255NN
Store__ccityName__ccityName__cText255NN
Store__ccountryName__ccountryName__cText255NN
Store__ccontactPointType__ccontactPointType__cText255NN
Store__cstoreType__cstoreType__cText255NN
Store__cpostalCodeText__cpostalCodeText__cText255NN
Store__cstateProvinceName__cstateProvinceName__cText255NN
Store__cactiveFromDate__cactiveFromDate__cText255NN
Store__corderId__corderId__cLookup(Order)255NN
fulFillmentLocation__caddressLine1__caddressLine1__cText255NN
fulFillmentLocation__ccityName__ccityName__cText100NN
fulFillmentLocation__ccountryName__ccountryName__cText100NN
fulFillmentLocation__ccontactPointType__ccontactPointType__cText100NN
fulFillmentLocation__cstoreType__cstoreType__cText100NN
fulFillmentLocation__cpostalCodeText__cpostalCodeText__cText20NN
fulFillmentLocation__cstateProvinceName__cstateProvinceName__cText100NN
fulFillmentLocation__cactiveFromDate__cactiveFromDate__cText100NN
fulFillmentLocation__corderId__corderId__cLookup(Order)NN
productPriceAdjustment__cadjustment__cadjustment__cText255NN
productPriceAdjustment__creasonCodeType__creasonCodeType__cText255NN
productPriceAdjustment__cprice__cprice__cText100NN
productPriceAdjustment__cdescription__cdescription__cText255NN
productPriceAdjustment__cpriceAdjustmentType__cpriceAdjustmentType__cText255NN
productPriceAdjustment__corderId__corderId__cLookup(Order)NN
orderProductTax__csalesOrderTaxAmount__csalesOrderTaxAmount__cText100NN
orderProductTax__ctaxRatePercent__ctaxRatePercent__cText100NN
orderProductTax__ctaxCode__ctaxCode__cText100NN
orderProductTax__ctaxClass__ctaxClass__cText100NN
orderProductTax__ctaxAmount__ctaxAmount__cText100NN
orderProductTax__ccountry__ccountry__cText100NN
orderProductTax__cdescription__cdescription__cText100NN
orderProductTax__corderId__corderId__cLookup(Order)NN

The following fields in Order object needs to be updated.

Field NameTypeUpdated Values
TypePicklistADD_ON, CANCELLATION, INITIAL, JOURNAL, RENEWAL, RETURN, SUBSCRIPTION, UPGRADE
StatusPicklistCANCELLED, CREATED, CONFIRMED, DELIVERED, IN_CART, IN_TRANSIT, INVOICED, LOST, PARTIALLY_SHIPPED, PICKUP_AVAILABLE, PROCESSING, REJECTED, RETURNED

Create Custom Field manually via Salesforce

To create each of these custom fields and enable visibility for them on page layouts:

  1. Click the Salesforce Setup icon.
  2. Select the Object Manager tab from the Setup home page.
  3. Find and select the target Salesforce object.
  4. Select the Fields & Relationships page.
  5. Click the New button and create the field as specified above.
  6. Once the field has been created, click the Set Field-Level Security button (or do these steps later - see below).
  7. Enable for desired profile, or tick the checkbox next to Visible to enable visibility for the desired profile(s).

Repeat these steps for each custom field in the above list.

Tip: Instead of adjusting permissions for each field as you go, if you are only making them available to one or two profiles it may be more efficient to go to the Users -> Profiles -> {profile} -> Object Settings for each object and adjust the permissions for multiple fields at once.

Deployment

Each Accelerator implementation template in Exchange includes Bash and Windows scripts for building and deploying the APIs to CloudHub. These scripts depend on repositories, global settings, deployment profiles, and associated properties configured in the Maven settings.xml file. In particular, make sure the common properties for your environment have been provided in the CloudHub-DEV profile (e.g., Anypoint Platform client ID and secret).

For additional details, please refer to the Application Deployment section of the Getting Started Guide.

Preparation

Ensure the Maven profile CloudHub-RCG-DEV has been properly configured in your settings.xml file. In particular, make sure the common properties for your environment have been provided (e.g., Anypoint Platform client ID and secret).

Required property overrides

Many templates can also be run from Anypoint Studio without having to customize the Run/Debug profiles. However, some templates make use of hidden deployment properties to protect sensitive information (e.g., passwords and secret keys). These properties must be supplied to the runtime by updating the configuration profile and adding them as VM arguments. At a minimum, the following properties must be customized to reflect the target deployment environment.

Property NameDescription
api.autodiscoveryIDRequired if using API Manager to secure this API
rcg-loyalty-management-system-api.loyalty-cloud.passwordPassword for Loyalty Management Cloud org
rcg-loyalty-management-system-api.loyalty-cloud.consumerKeyConsumer Key of the Connected App
rcg-loyalty-management-system-api.loyalty-cloud.consumerSecretConsumer Secret of the Connected App
rcg-loyalty-management-system-api.loyalty-cloud.securityTokenSecurity Token of the Connected App

Additional resources

  • The Data mappings tab describes how the request and response data structures are mapped between the API interface and Loyalty Management Cloud.
  • Refer to the Accelerators documentation home for more information about the MuleSoft Accelerators.

Reviews

TypeTemplate
OrganizationMulesoft Inc.
Published by
MuleSoft Solutions
Published onApr 9, 2024
Asset overview

Asset versions for 2.1.x

Asset versions
VersionActions
2.1.1
2.1.0