Skip to Content
0
Former Member
Jul 15, 2020 at 03:08 PM

IF Condition does not work

99 Views Last edit Jul 20, 2020 at 03:06 PM 5 rev

Hello !

Business Requirement: Update only empty fields of an Individual Customer in C4C

Steps in CPI:

  1. Get Individual Data from C4C
  2. Store each Field in a Property
  3. Message Mapping using a Script to Get the property value and IF condition
  4. Patch the Individual in C4C

Payload Example of Step 1:

<IndividualCustomerCollection>
<IndividualCustomer>
<GenderCode>1</GenderCode>
<HouseNumber></HouseNumber>
<Email></Email>
<FirstName>Individual</FirstName>
<StateCode></StateCode>
<CustomerID>123456</CustomerID>
<City></City>
<MiddleName></MiddleName>
<County></County>
<Mobile></Mobile>
<StreetPostalCode></StreetPostalCode>
<LanguageCode>EN</LanguageCode>
<MaritalStatusCode></MaritalStatusCode>
<Phone>+33 45656777</Phone>
<TitleCode></TitleCode>
<WebSite></WebSite>
<Street></Street>
<LastName>Last</LastName>
<CountryCode></CountryCode>
<BirthDate/>
</IndividualCustomer>
</IndividualCustomerCollection>

Message Mapping Example for a Field:

This is the Payload after the Message Mapping:

<?xml version="1.0" encoding="UTF-8"?>
<IndividualCustomerCollection>
  <IndividualCustomer>
    <ObjectID>00163E77980F1EDAB1D060334FDA8135</ObjectID>
    <GenderCode>1</GenderCode>
    <LanguageCode>EN</LanguageCode>
    <Phone>+33 45656777</Phone>
  </IndividualCustomer>
</IndividualCustomerCollection>

The Condition in the message mapping is seems to be working only for the false value.

Do you have any idea how to resolve this behaviour? Am I missing anything?

Sriprasad Shivaram Bhat or Morten Wittrock maybe?

Thanks a lot for your answer.

Regards.

Attachments