Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Functionality

Description

Admin panel configuration

WelcomeConfirmation

Send Welcome order confirmation message for to Customer from Salesforce Marketing Cloud

profileinstant-message-service-to-cdp

ProfileOrder

Create or edit profile of the customer order in the CDP Epsilon

instantshopify-order-messageto-servicecdp

Middleware components:

Component

Functionalities

Admin Panel (blue star)

WC, P O - only configuration

e-shopify-customer order (blue star)

WC, PO

p-shopify-customer (blue star) W, Porder (blue star)

C, O

p-middleware-message-router

C, O

p-instant-message-service (blue star)

WC

p-sfmc-journey-service (blue star)

WC

s-db-proxy (blue star)

WC, PO

cdd-s-db-proxy-docdb-cluster-prod (blue star)

WC, PO

p-profileshopify-order-adapter(blue star)

PO

e-cdp-proxy (blue star) Psftp-prod.services.rbcloud.io

O

p-middleware-message-router (blue star)

C, O

Detail chart:

Expand
titleProfile Order Route
Image RemovedImage Added

How to set up new Shopify shop for Brilliant Basic

...

Order Integration?

Because of dependencies, the configuration should be performed bottom-up approach, meaning 1. SFMC 2. Middleware 3. Shopify

Shopify Configuration

  1. Setup Shopify Webhook

endpoint:

Code Block
POST api.cdp-rb.com/shopify/customerorder
Expand
titlehttp headers
Code Block
Content-Type: application/json
X-Shopify-Api-Version: 2023-01
X-Shopify-Hmac-Sha256: ILtusukdpKIYHw2rMrjV*************QCNviDRq+msml8g=
GrhslwPlMFn8ig=
X-Shopify-Order-Id: 5293234553018
X-Shopify-Shop-Domain: enfamilenfashop-canadasg.myshopify.com
X-Shopify-Test: false
X-Shopify-Topic: customersorders/updateupdated
X-Shopify-Triggered-At: 2023-10-27T1024T00:2644:1714.062770459Z161636249Z
X-Shopify-Webhook-Id: 978b493963729c72-e0bf018f-4ad24053-bc26879e-80d8c4f61e78354d7e8dfba7

Expand
titlejson payload
Code Block
{
  "id": 63934206443885293234553018,
  "emailadmin_graphql_api_id": "aprilhuang6066@hotmail.comgid://shopify/Order/5293234553018",
  "acceptsapp_marketingid": false580111,
  "createdbrowser_atip": "2023-10-27T06:26:14-04:00138.75.3.200",
  "updatedbuyer_accepts_atmarketing": "2023-10-27T06:26:17-04:00"false,
  "cancel_reason": null,
  "firstcancelled_nameat": "April"null,
  "lastcart_nametoken": "Huang6b30c4ae9e3993a7f1e5c4703c9fae27",
  "orderscheckout_countid": 032343507959994,
  "state": "enabled",
  "total_spentcheckout_token": "0.00c08876c875843a2508fd55d7f04105a5",
  "lastclient_order_iddetails": null,
  "note": null,{
    "verifiedaccept_emaillanguage": true,
"en-SG,en-GB;q=0.9,en;q=0.8",
    "browser_height": 659,
    "multipassbrowser_identifierip": null,"138.75.3.200",
    "taxbrowser_exemptwidth": false393,
    "tagssession_hash": null,
    "DEP_EN",
  "last_order_name": null,
  "currency": "CAD",
  "phone": null,
  "addresses": [
    
  ],
  "accepts_marketing_updated_at": "2023-10-27T06:26:14-04:00",
  "marketing_opt_in_level": null,
  "tax_exemptionsuser_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0.1 Mobile/15E148 Safari/604.1"
  },
  "closed_at": null,
  "company": null,
  "confirmed": true,
  "contact_email": "tingting_09@hotmail.com",
  "created_at": "2023-10-24T08:44:13+08:00",
  "currency": "SGD",
  "current_subtotal_price": "233.04",
  "current_subtotal_price_set": {
    "shop_money": {
      "amount": "233.04",
      "currency_code": "SGD"
    },
    "presentment_money": {
      "amount": "233.04",
      "currency_code": "SGD"
    }
  },
  "current_total_discounts": "31.77",
  "current_total_discounts_set": {
    "shop_money": {
      "amount": "31.77",
      "currency_code": "SGD"
    },
    "presentment_money": {
      "amount": "31.77",
      "currency_code": "SGD"
    }
  },
  "current_total_duties_set": null,
  "current_total_price": "233.04",
  "current_total_price_set": {
    "shop_money": {
      "amount": "233.04",
      "currency_code": "SGD"
    },
    "presentment_money": {
      "amount": "233.04",
      "currency_code": "SGD"
    }
  },
  "current_total_tax": "17.26",
  "current_total_tax_set": {
    "shop_money": {
      "amount": "17.26",
      "currency_code": "SGD"
    },
    "presentment_money": {
      "amount": "17.26",
      "currency_code": "SGD"
    }
  },
  "customer_locale": "en-SG",
  "device_id": null,
  "discount_codes": [
    {
      "code": "12PEBP23",
      "amount": "31.77",
      "type": "percentage"
    }
  ],
  "email": "tingting_09@hotmail.com",
  "estimated_taxes": false,
  "financial_status": "paid",
  "fulfillment_status": null,
  "gateway": "shopify_payments",
  "landing_site": "/",
  "landing_site_ref": null,
  "location_id": null,
  "merchant_of_record_app_id": null,
  "name": "ENFASHOPSG29892",
  "note": "",
  "note_attributes": [
    
  ],
  "number": 28892,
  "order_number": 29892,
  "order_status_url": "https://shop.enfagrow.com.sg/2719318074/orders/26e9244a0dd7f55d30cff91d2df66bcf/authenticate?key=d0ebe4c128509e70cfc6ef15199ca733",
  "original_total_duties_set": null,
  "payment_gateway_names": [
    "shopify_payments"
  ],
  "phone": null,
  "presentment_currency": "SGD",
  "processed_at": "2023-10-24T08:44:12+08:00",
  "processing_method": "direct",
  "reference": null,
  "referring_site": "",
  "source_identifier": null,
  "source_name": "web",
  "source_url": null,
  "subtotal_price": "233.04",
  "subtotal_price_set": {
    "shop_money": {
      "amount": "233.04",
      "currency_code": "SGD"
    },
    "presentment_money": {
      "amount": "233.04",
      "currency_code": "SGD"
    }
  },
  "tags": "",
  "tax_lines": [
    {
      "price": "17.26",
      "rate": 0.08,
      "title": "GST",
      "price_set": {
        "shop_money": {
          "amount": "17.26",
          "currency_code": "SGD"
        },
        "presentment_money": {
          "amount": "17.26",
          "currency_code": "SGD"
        }
      },
      "channel_liable": false
    }
  ],
  "taxes_included": true,
  "test": false,
  "token": "26e9244a0dd7f55d30cff91d2df66bcf",
  "total_discounts": "31.77",
  "total_discounts_set": {
    "shop_money": {
      "amount": "31.77",
      "currency_code": "SGD"
    },
    "presentment_money": {
      "amount": "31.77",
      "currency_code": "SGD"
    }
  },
  "total_line_items_price": "264.81",
  "total_line_items_price_set": {
    "shop_money": {
      "amount": "264.81",
      "currency_code": "SGD"
    },
    "presentment_money": {
      "amount": "264.81",
      "currency_code": "SGD"
    }
  },
  "total_outstanding": "0.00",
  "total_price": "233.04",
  "total_price_set": {
    "shop_money": {
      "amount": "233.04",
      "currency_code": "SGD"
    },
    "presentment_money": {
      "amount": "233.04",
      "currency_code": "SGD"
    }
  },
  "total_shipping_price_set": {
    "shop_money": {
      "amount": "0.00",
      "currency_code": "SGD"
    },
    "presentment_money": {
      "amount": "0.00",
      "currency_code": "SGD"
    }
  },
  "total_tax": "17.26",
  "total_tax_set": {
    "shop_money": {
      "amount": "17.26",
      "currency_code": "SGD"
    },
    "presentment_money": {
      "amount": "17.26",
      "currency_code": "SGD"
    }
  },
  "total_tip_received": "0.00",
  "total_weight": 7700,
  "updated_at": "2023-10-24T08:44:16+08:00",
  "user_id": null,
  "billing_address": {
    "first_name": "Jas",
    "address1": "6 Balmoral Crescent",
    "phone": "91098052",
    "city": "Singapore",
    "zip": "259896",
    "province": null,
    "country": "Singapore",
    "last_name": "Neo",
    "address2": "#03-01",
    "company": null,
    "latitude": 1.3145677,
    "longitude": 103.8346119,
    "name": "Jas Neo",
    "country_code": "SG",
    "province_code": null
  },
  "customer": {
    "id": 1251662463034,
    "email": "tingting_09@hotmail.com",
    "accepts_marketing": true,
    "created_at": "2018-11-28T21:50:30+08:00",
    "updated_at": "2023-10-24T08:44:14+08:00",
    "first_name": "Jas",
    "last_name": "Neo",
    "state": "enabled",
    "note": "1984-11-26T00:00:00.000000Z",
    "verified_email": true,
    "multipass_identifier": null,
    "tax_exempt": false,
    "phone": "+6591098052",
    "email_marketing_consent": {
      "state": "subscribed",
      "opt_in_level": null,
      "consent_updated_at": "2019-02-14T01:58:02+08:00"
    },
    "sms_marketing_consent": {
      "state": "not_subscribed",
      "opt_in_level": "single_opt_in",
      "consent_updated_at": null,
      "consent_collected_from": "SHOPIFY"
    },
    "tags": "20_OFF_CAP_30_NEXT",
    "currency": "SGD",
    "accepts_marketing_updated_at": "2019-02-14T01:58:02+08:00",
    "marketing_opt_in_level": "single_opt_in",
    "tax_exemptions": [
      
    ],
    "admin_graphql_api_id": "gid://shopify/Customer/1251662463034",
    "default_address": {
      "id": 7567245869242,
      "customer_id": 1251662463034,
      "first_name": "Jas",
      "last_name": "Neo",
      "company": null,
      "address1": "6 Balmoral Crescent",
      "address2": "#03-01",
      "city": "Singapore",
      "province": null,
      "country": "Singapore",
      "zip": "259896",
      "phone": "91098052",
      "name": "Jas Neo",
      "province_code": null,
      "country_code": "SG",
      "country_name": "Singapore",
      "default": true
    }
  },
  "discount_applications": [
    {
      "target_type": "line_item",
      "type": "discount_code",
      "value": "12.0",
      "value_type": "percentage",
      "allocation_method": "across",
      "target_selection": "entitled",
      "code": "12PEBP23"
    }
  ],
  "fulfillments": [
    
  ],
  "line_items": [
    {
      "id": 12878062125242,
      "admin_graphql_api_id": "gid://shopify/LineItem/12878062125242",
      "fulfillable_quantity": 1,
      "fulfillment_service": "manual",
      "fulfillment_status": null,
      "gift_card": false,
      "grams": 2750,
      "name": "myFirst Camera 2 Blue",
      "pre_tax_price": "0.00",
      "pre_tax_price_set": {
        "shop_money": {
          "amount": "0.00",
          "currency_code": "SGD"
        },
        "presentment_money": {
          "amount": "0.00",
          "currency_code": "SGD"
        }
      },
      "price": "0.00",
      "price_set": {
        "shop_money": {
          "amount": "0.00",
          "currency_code": "SGD"
        },
        "presentment_money": {
          "amount": "0.00",
          "currency_code": "SGD"
        }
      },
      "product_exists": true,
      "product_id": 7289457213626,
      "properties": [
        
      ],
      "quantity": 1,
      "requires_shipping": true,
      "sku": "400117195",
      "taxable": true,
      "title": "myFirst Camera 2 Blue",
      "total_discount": "0.00",
      "total_discount_set": {
        "shop_money": {
          "amount": "0.00",
          "currency_code": "SGD"
        },
        "presentment_money": {
          "amount": "0.00",
          "currency_code": "SGD"
        }
      },
      "variant_id": 42048765821114,
      "variant_inventory_management": "shopify",
      "variant_title": "",
      "vendor": "Enfagrow Official Flagship Store",
      "tax_lines": [
        {
          "channel_liable": false,
          "price": "0.00",
          "price_set": {
            "shop_money": {
              "amount": "0.00",
              "currency_code": "SGD"
            },
            "presentment_money": {
              "amount": "0.00",
              "currency_code": "SGD"
            }
          },
          "rate": 0.08,
          "title": "GST"
        }
      ],
      "duties": [
        
      ],
      "discount_allocations": [
        
      ]
    },
    {
      "id": 12878062158010,
      "admin_graphql_api_id": "gid://shopify/LineItem/12878062158010",
      "fulfillable_quantity": 1,
      "fulfillment_service": "manual",
      "fulfillment_status": null,
      "gift_card": false,
      "grams": 4950,
      "name": "Bundle of 3: Enfagrow Pro A+ Stage 4, Original,  1.65kg x 3",
      "pre_tax_price": "215.78",
      "pre_tax_price_set": {
        "shop_money": {
          "amount": "215.78",
          "currency_code": "SGD"
        },
        "presentment_money": {
          "amount": "215.78",
          "currency_code": "SGD"
        }
      },
      "price": "264.81",
      "price_set": {
        "shop_money": {
          "amount": "264.81",
          "currency_code": "SGD"
        },
        "presentment_money": {
          "amount": "264.81",
          "currency_code": "SGD"
        }
      },
      "product_exists": true,
      "product_id": 7271902052538,
      "properties": [
        
      ],
      "quantity": 1,
      "requires_shipping": true,
      "sku": "540024224",
      "taxable": true,
      "title": "Bundle of 3: Enfagrow Pro A+ Stage 4, Original,  1.65kg x 3",
      "total_discount": "0.00",
      "total_discount_set": {
        "shop_money": {
          "amount": "0.00",
          "currency_code": "SGD"
        },
        "presentment_money": {
          "amount": "0.00",
          "currency_code": "SGD"
        }
      },
      "variant_id": 42013232824506,
      "variant_inventory_management": "shopify",
      "variant_title": "",
      "vendor": "Enfagrow Official Flagship Store",
      "tax_lines": [
        {
          "channel_liable": false,
          "price": "17.26",
          "price_set": {
            "shop_money": {
              "amount": "17.26",
              "currency_code": "SGD"
            },
            "presentment_money": {
              "amount": "17.26",
              "currency_code": "SGD"
            }
          },
          "rate": 0.08,
          "title": "GST"
        }
      ],
      "duties": [
        
      ],
      "discount_allocations": [
        {
          "amount": "31.77",
          "amount_set": {
            "shop_money": {
              "amount": "31.77",
              "currency_code": "SGD"
            },
            "presentment_money": {
              "amount": "31.77",
              "currency_code": "SGD"
            }
          },
          "discount_application_index": 0
        }
      ]
    }
  ],
  "payment_details": {
    "credit_card_bin": "542089",
    "avs_result_code": null,
    "cvv_result_code": "M",
    "credit_card_number": "•••• •••• •••• 5913",
    "credit_card_company": "Mastercard",
    "buyer_action_info": null,
    "credit_card_name": "Jas Neo ",
    "credit_card_wallet": null,
    "credit_card_expiration_month": 6,
    "credit_card_expiration_year": 2026
  },
  "payment_terms": null,
  "refunds": [
    
  ],
  "shipping_address": {
    "first_name": "Jas",
    "address1": "6 Balmoral Crescent",
    "phone": "91098052",
    "city": "Singapore",
    "zip": "259896",
    "province": null,
    "country": "Singapore",
    "last_name": "Neo",
    "address2": "#03-01",
    "company": null,
    "latitude": 1.3145677,
    "longitude": 103.8346119,
    "name": "Jas Neo",
    "country_code": "SG",
    "province_code": null
  },
  "shipping_lines": [
    {
      "id": 4233698181306,
      "carrier_identifier": null,
      "code": "Standard: 1-2 Working days, 09:00-12:00",
      "delivery_category": null,
      "discounted_price": "0.00",
      "discounted_price_set": {
        "shop_money": {
          "amount": "0.00",
          "currency_code": "SGD"
        },
        "presentment_money": {
          "amount": "0.00",
          "currency_code": "SGD"
        }
      },
      "phone": null,
      "price": "0.00",
      "price_set": {
        "shop_money": {
          "amount": "0.00",
          "currency_code": "SGD"
        },
        "presentment_money": {
          "amount": "0.00",
          "currency_code": "SGD"
        }
      },
      "requested_fulfillment_service_id": null,
      "source": "shopify",
      "title": "Standard: 1-2 Working days, 09:00-12:00",
      "tax_lines": [
       ], 
 "email_marketing_consent": {    ],
"state": "not_subscribed",     "optdiscount_in_levelallocations": "single_opt_in", [
        
 "consent_updated_at": null   }, ]
 "sms_marketing_consent": null,   "admin_graphql_api_id": "gid://shopify/Customer/6393420644388"}
  ]
}

Middleware Configuration

All configurations can be achieved by Admin Panel

Expand
title1. Setup routing node for delivery attempts
Expand
Code Block
    "routing": [
      {
        "sink": "middleware-profileorder-message-cdp-queue",
        "routerDeliveryCounter": 1
      },
      {
        "sink": "instant-message-service-queue",
        "routerDeliveryCounter": 2
      }
    ],

Expand
title2. Setup shopify node for shopify-

...

order-to-cdp integration

...

Code Block
    "shopify": {
      "shopifyToken": "shpat_

...

cf175f************

...

806f51e5d",  // get from Shopify
      "applicationType": "CUSTOM",
      "

...

botProtection": false,
      "shopifyOrder": {
        "isOrderAdapter": true,
        "webhook": [

...


          "

...

orders/create",
          "

...

orders/

...

updated"
        ],
        "hmacKey": "

...

74cbf31**************

...

f7e060a0c1d1",

...

 // get from Shopify
        "

...

vendor": "

...

SHOPIFY-SGP", 
        "

...

bbFulfillment": 

...

false,
        "

...

domain": "

...

enfashop-sg.myshopify.com", // 

...

get from 

...

Shopify

...

 

...

 

...

      

...

"txnSrcCode": "SHOPIFY_SGP_EN",
        "

...

filesConfig": 

...

{  // for 

...

  1. Setup instantMessage node for instant-message-service integration

...

CDP Order
   

...

 

...

      "inputFilenamePattern": "

...

.*[pgp|md5]$",  
          "

...

outputPathPattern": "

...

incoming/Shopify/${marketCode}",

...


...

 

...

 

...

        

...

"

...

fileNamePrefix": "

...

RB_EN_ORDER_MJNSGP_SHOPIFY",
          "

...

archivePathPattern": "

...

",

...


...

 

...

         "

...

inputPathPattern": "

...

${workingDir}/${host}"

...

 

...

 

...

 

...

     

...

}

...


     

...

 }
    },

Expand
title3. Setup

...

instantMessage node for instant-message-service integration
Code Block
    "

...

instantMessage":

...

 

...

{
      

...

"

...

dataExtensionKey": 

...

{
        "

...

account_id": "

...

6425437",
        "

...

id": "

...

0E2EF36F-09B7-4642-8F9A-53DF6AB7F57F_6425437",
        "

...

client_secret": 

...

"75Nf***********9hvl92aR",
        "

...

client_id": "

...

nmt95fxy2vy7v56bw2e4zk33"
      },
      "

...

APIEvent": 

...

{
      

...

  "account_id": "6425437",
   

...

     

...

"id": "BB_Order_Confirmation_6425437",
        "

...

client_secret": "

...

75N*************92aR",
        "

...

client_id": "

...

nmt95fxy2vy7v56bw2e4zk33"
 

...

 

...

 

...

 

...

  },
      "

...

entityType": 

...

"ORDER"
    }

Expand
title4. Setup other nodes:
Code Block
    "

...

owner": "

...

Other",

...


    

...

"

...

2LetterLanguageCode": "

...

EN",
    "brandOrgCode": "MJNSGP",

...

    

...

  1. Setup other nodes:

...

"accountSourceCodeCustomer": "SGP_SHOPIFY_CUST",
    "

...

countryCode": "

...

SGP",
    "

...

destination": "

...

CDP",
 

...

 

...

 

...

 

...

"accountSource": "

...

SGP_SHOPIFY_SHIPTO",

SFMC Configuration

An API Event welcome order confirmation template must be created on Salesforce Marketing Cloud to match middleware instant-message-service integration configuration

...

Expand
Code Block
{
  "ContactKey": 1000053220746,
  "EventDefinitionKey": "BB_Order_Confirmation_6425437",
  "Data": 1000086060020, {
    "OrderID": 5286303269050,
    "CreatedAt": "2023-10-20T15:44:05+08:00",
    "EventDefinitionKeyTotalPrice": "BB_Welcome_6425438717.19",
    "DataTotalTax": {"53.12",
    "EmailAddressCurrency": "1990amanpreetkaur@gmail.comSGD",
    "sourceAccountNumberFinancialStatus": "MJNCAN_6384186884132paid",
    "accountSourceTotalDiscounts": "CAN_SHOPIFY_CUST126.56",
    "TierCodeDiscountCode": "MJNCANTIER1THXAUG23",
    "BA_FirstName": "AmanpreetLIU",
    "MiddleNameBA_LastName": null"WEIGUO",
    "LastNameBA_City": "kaurSingapore",
    "GenderBA_Zip": null"368355",
    "ChannelBA_SourceCountry": "EMSingapore",
    "AddressLine1BillingAddress_1": null,"126 Joo Seng   "AddressLine2": nullRoad",
    "AddressLine3BillingAddress_2": null"#09-13",
    "CitySA_FirstName": null"LIU",
    "CountryCodeSA_LastName": null"WEIGUO",
    "StateCodeSA_City": null"Singapore",
    "PostalCodeSA_Zip": null"368355",
    "PhoneNumberSA_Country": null"Singapore",
    "PhoneCountryCodeShippingAddress_1": null,
    "Enroll_Channel_Code": null"126 Joo Seng Road",
    "SourceShippingAddress_Code2": null"#09-13",
    "BrandFirstName": "MJNCANLiu",
    "Customer_NoteLastName": null"Weiguo",
    "Customer_TagsEmailAddress": "DEP_ENweiguo87@hotmail.com",
    "sourceAccountNumberTotalShippingAmount": "MJNCAN_63841868841320.00",
    "CompanyNameTotalShippingCurrencyCode": null"SGD",
    "CreationTimeINDIVIDUAL_ID": "2023-10-19T09:52:421000053220746",
    "Email_Marketing_AcceptedTags": true"09:00-12:00, Reseller, Standard: 1-2  "SMS_Marketing_Accepted": falseWorking days",
    "PostPREFERRED_MarketingLANGUAGE_AcceptedCODE": false"",
    "Termssource_Conditionname": true"web",
    "PrivacyOrder_PolicyName": null"ENFASHOPSG29848",
    "INDIVIDUAL_IDDateAdd": "10000860600202023-10-24T17:42:04+08:00",
    "PREFERREDPayment_LANGUAGE_CODEmethod": "American Express"
  }
}