cancel
Showing results for 
Search instead for 
Did you mean: 

External Pricing for Prospect (C4C Sales Quote)- PI custom mapping

Former Member
0 Kudos

Hi All,

We are requesting external pricing for Prospect in C4C Sales Quote. Since Prospect won't replicated to ERP, thus order to achieve this, we added some custom mapping in PI Message Mapping: COD_ERP_ExternalSalesDocumentDataQuerySync_req.

Workaround:

1. Add extension field, say "IsProspcet" into SalesQuote and related service;

2. Add custom mapping for BuyID, BuyParty->RecipientID, Item->ShipToParty->RecipientID; and assign fixed value (real Customer in ERP) into it once flag "IsProspect" equals "true".

However, after applied this in PI, and we found this doesn't work:

Scenario1: for real customer(IsProspect == false)

Result: error:

However, there is no issue before applying the enhancements. And i am confused since that it should go with "Else" as defined in PI MM which is standard mapping, why it raised mapping exception?

Scenario2: for Prospect (IsProspect == true)

Result: No customer master record existes for customer 100001.


However, the customer 100001 exist in ERP and can be requested successfully before applying the custom mapping.

Does anyone knows why and how to solve it?

Thanks & Regards,

Qiang

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

, do you have any thoughts about this?

-Qiang

0 Kudos

Regarding the first issue: I guess your flag is not always in the payload. Subsequently you'll get an issue with the context handling because your flag determines the context changes. You have to check the queue for this field. If there are some suppress statements, this might be the root cause. You can try with mapWithDefault.

Regards,

Sascha

Former Member
0 Kudos

Yes Sascha. this func works for both Customer and Prospect after added mapwithDefault. But it need to refresh the cache.

So the solution is:

1. adding leadingzero to the dummy customer ID;

2. use mapWithDefault;

Regards,

Qiang

Answers (1)

Answers (1)

Former Member
0 Kudos

Update:

it works for Prospect after added leadingzero for dummy customer. here it is 0000100001.

However, for the real customer, it still not work. system mentioned the exception mapping.

but i am confused why it mentioned this as for the real cusotmer, the mapping is going for standard one.

It seems to that the "If-Else" funtion has problem in the PI?

Does anybody knows this why.