Skip to content

Commit

Permalink
Merge pull request #155 from MilanSFDC/Issue/Promotions-Coupons-Not-W…
Browse files Browse the repository at this point in the history
…orking-for-NonRegisteredCustomer

#154 Promotions and Coupon Codes not showing for non-registered customer
  • Loading branch information
jbachelet authored Mar 31, 2022
2 parents 58a5966 + c3dfb0b commit 655a2c1
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 3 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,14 @@ The build scripts in this repository leverage B2C Commerce's [sfcc-ci](https://g
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/promotions/({ids})",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
}
]
}
Expand Down Expand Up @@ -555,6 +563,14 @@ The build scripts in this repository leverage B2C Commerce's [sfcc-ci](https://g
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/sites/*/cartridges"
},
{
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/sites/*/coupons/{coupon_id}/codes"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<inputParameters>
<name>customerId</name>
<value>
<elementReference>selectedCustomerId</elementReference>
<elementReference>getCustomerProfileCustomerId</elementReference>
</value>
</inputParameters>
<inputParameters>
Expand Down Expand Up @@ -282,6 +282,9 @@
<assignmentItems>
<assignToReference>selectedOOBOCustomerId</assignToReference>
<operator>Assign</operator>
<value>
<elementReference>loop_iterateB2CSites.OOBO_Customer_ID__c</elementReference>
</value>
</assignmentItems>
<connector>
<targetReference>loop_iterateB2CSites</targetReference>
Expand Down Expand Up @@ -314,7 +317,7 @@
<name>Assign_OOBO_Customer_ID_and_BM_Access_Token</name>
<label>Assign OOBO Customer ID and BM Access Token</label>
<locationX>578</locationX>
<locationY>1910</locationY>
<locationY>2030</locationY>
<assignmentItems>
<assignToReference>getCustomerProfileAccessToken</assignToReference>
<operator>Assign</operator>
Expand All @@ -329,6 +332,13 @@
<elementReference>selectedOOBOCustomerId</elementReference>
</value>
</assignmentItems>
<assignmentItems>
<assignToReference>recordId</assignToReference>
<operator>Assign</operator>
<value>
<elementReference>recGet_ooboCustomerContactRecord.Id</elementReference>
</value>
</assignmentItems>
<connector>
<targetReference>Get_the_Customer_Shopper_profile</targetReference>
</connector>
Expand Down Expand Up @@ -587,7 +597,7 @@
</rightValue>
</conditions>
<connector>
<targetReference>Assign_OOBO_Customer_ID_and_BM_Access_Token</targetReference>
<targetReference>recGet_ooboCustomerContactRecord</targetReference>
</connector>
<label>YES OOBO Customer ID configured</label>
</rules>
Expand Down Expand Up @@ -827,6 +837,28 @@
<queriedFields>Email</queriedFields>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<recordLookups>
<name>recGet_ooboCustomerContactRecord</name>
<label>Get OOBO Customer Contact Record</label>
<locationX>578</locationX>
<locationY>1910</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Assign_OOBO_Customer_ID_and_BM_Access_Token</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>B2C_Customer_ID__c</field>
<operator>EqualTo</operator>
<value>
<elementReference>selectedOOBOCustomerId</elementReference>
</value>
</filters>
<getFirstRecordOnly>true</getFirstRecordOnly>
<object>Contact</object>
<queriedFields>Id</queriedFields>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<screens>
<name>Render_Active_Customer_Promotions</name>
<label>Render Active Customer Promotions</label>
Expand All @@ -836,6 +868,7 @@
<allowFinish>true</allowFinish>
<allowPause>false</allowPause>
<connector>
<isGoTo>true</isGoTo>
<targetReference>dec_wasOnlyOneSiteFound</targetReference>
</connector>
<fields>
Expand Down

0 comments on commit 655a2c1

Please sign in to comment.