NUTRINTG BB Customer / Profile Welcome
Source:
Target:
Functionality | Description | Admin panel configuration |
---|
Welcome | Send Welcome message for Customer from Salesforce Marketing Cloud | instant-message-service |
Profile | Create or edit profile of the customer in the CDP Epsilon | profile-service-to-cdp |
Middleware components:
Component | Functionalities |
---|
Admin Panel | W, P - only configuration |
e-shopify-customer | W, P |
p-shopify-customer | W, P |
p-instant-message-service | W |
p-sfmc-journey-service | W |
s-db-proxy | W,P |
cdd-s-db-proxy-docdb-cluster-prod
| W,P |
p-profile-adapter | P |
e-cdp-proxy | P |
Detail chart:
How to set up new Shopify shop for Brilliant Basic Customer / Profile Integration?
Because of dependencies, the configuration should be performed bottom-up approach, meaning 1. SFMC 2. Middleware 3. Shopify
Shopify Configuration
Setup Shopify Webhook
endpoint:
POST api.cdp-rb.com/shopify/customer
http headers
Content-Type: application/json
X-Shopify-Api-Version: 2023-01
X-Shopify-Hmac-Sha256: ILtusukdp**********QCNviDRq+msml8g=
X-Shopify-Shop-Domain: enfamil-canada.myshopify.com
X-Shopify-Topic: customers/update
X-Shopify-Triggered-At: 2023-10-27T10:26:17.062770459Z
X-Shopify-Webhook-Id: 978b4939-e0bf-4ad2-bc26-80d8c4f61e78
json payload
{
"id": 6393420644388,
"email": "aprilhuang6066@hotmail.com",
"accepts_marketing": false,
"created_at": "2023-10-27T06:26:14-04:00",
"updated_at": "2023-10-27T06:26:17-04:00",
"first_name": "April",
"last_name": "Huang",
"orders_count": 0,
"state": "enabled",
"total_spent": "0.00",
"last_order_id": null,
"note": null,
"verified_email": true,
"multipass_identifier": null,
"tax_exempt": false,
"tags": "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_exemptions": [
],
"email_marketing_consent": {
"state": "not_subscribed",
"opt_in_level": "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
1. Setup routing node for delivery attempts
"routing": [
{
"sink": "middleware-profile-message-cdp-queue",
"routerDeliveryCounter": 1
},
{
"sink": "instant-message-service-queue",
"routerDeliveryCounter": 2
}
],
2. Setup shopify node for shopify-profile-to-cdp integration
"shopify": {
"shopifyToken": "shpat_e850029e********4a87bf9", // get from Shopify
"applicationType": "CUSTOM",
"shopifyCustomer": {
"webhook": [
"customers/create",
"customers/update"
],
"hmacKey": "0f19ab**********8b3c3e2876", // get from Shopify
"domain": "enfamil-canada.myshopify.com", // get from Shopify
"dataSourceCode": "CANENMCASHPF", // needed for CDP Epsilon Profile
"subscriptionId": "3229dca3-1c5f-4bfb-aac3-0554633081e5" // needed for CDP Epsilon Profile
},
"botProtection": false
},
3. Setup instantMessage node for instant-message-service integration
"instantMessage": {
"APIEvent": {
"account_id": "6425438", // get from SFMC
"id": "BB_Welcome_6425438", // get from SFMC
"client_secret": "75Nf***********l92aR", // get from SFMC
"client_id": "nmt95fxy2vy7v56bw2e4zk33" // get from SFMC
},
"entityType": "PROFILE"
}
4. Setup agreements node
"agreements": [
{
"ConsentAcceptedInd": true,
"ConsentDesc": "Terms and conditions official rules for Enfamil Canada",
"CustomName": "Terms and Condition Enfamil Canada",
"MandatoryInd": true,
"BusinessId": "LT-TC-CA-fr-Enfamil-rtfContestOfficiRules",
"RevisionId": "5e6a0932263d2300011dc764"
},
{
"ConsentAcceptedInd": true,
"ConsentDesc": "Terms and Conditions fill the gaps for Enfamil Canada",
"CustomName": "Terms and Condition Enfamil Canada",
"MandatoryInd": true,
"BusinessId": "LT-TC-CA-en-Enfamil-enfagrowFillTheGaps",
"RevisionId": "5e6a08ce50b1830001e8c532"
}
]
5. Setup other nodes:
"owner": "Nutrition",
"brandOrgCode": "MJNCAN", // for CDP Epsilon Profile
"destination": "CDP",
SFMC Configuration
An API Event welcome template must be created on Salesforce Marketing Cloud to match middleware instant-message-service integration configuration
Middleware will send
payload
{
"ContactKey": 1000086060020,
"EventDefinitionKey": "BB_Welcome_6425438",
"Data": {
"EmailAddress": "1990amanpreetkaur@gmail.com",
"sourceAccountNumber": "MJNCAN_6384186884132",
"accountSource": "CAN_SHOPIFY_CUST",
"TierCode": "MJNCANTIER1",
"FirstName": "Amanpreet",
"MiddleName": null,
"LastName": "kaur",
"Gender": null,
"Channel_Source": "EM",
"AddressLine1": null,
"AddressLine2": null,
"AddressLine3": null,
"City": null,
"CountryCode": null,
"StateCode": null,
"PostalCode": null,
"PhoneNumber": null,
"PhoneCountryCode": null,
"Enroll_Channel_Code": null,
"Source_Code": null,
"Brand": "MJNCAN",
"Customer_Note": null,
"Customer_Tags": "DEP_EN",
"sourceAccountNumber": "MJNCAN_6384186884132",
"CompanyName": null,
"CreationTime": "2023-10-19T09:52:42",
"Email_Marketing_Accepted": true,
"SMS_Marketing_Accepted": false,
"Post_Marketing_Accepted": false,
"Terms_Condition": true,
"Privacy_Policy": null,
"INDIVIDUAL_ID": "1000086060020",
"PREFERRED_LANGUAGE_CODE": ""
}
}
Add Comment