Link a table with two different keys | Community
Skip to main content
Level 4
October 10, 2024
Solved

Link a table with two different keys

  • October 10, 2024
  • 1 reply
  • 1080 views

Hello,

 

I've a table that i need to link with Recipient-table. The table is already linked with the SSN for B2C customers and I need to include B2B too and link them to the Recipient table. I've tried several solutions but nothing seems to work.
Here is the current link that works for B2C customers:


<element integrity="neutral" label="Recipient" name="recipientLink" pkgStatus="never"
revCardinality="single" revLink="XXXCampaignLink" target="nms:recipient"
type="link">
<join xpath-dst="@SSN" xpath-src="@SSN"/>
</element>

I changed it to this:

<element integrity="neutral" label="Recipient" name="recipientLink" pkgStatus="never"
revCardinality="single" revLink="XXXCampaignLink" target="nms:recipient"
type="link">
<join xpath-dst="@SSN" xpath-src="@SSN"/>

<join xpath-dst="@SSNb2b" xpath-src="@SSNb2b"/>
</element>

 

But it does not work. I have both attributes in the recipient table of course and they are named the same.

Any clues?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by A_B_SE

Hello @a_b_se,

I'll need more info to see if it is possible to include both in the same link.
Should the fields SSNb2b and SSN (whether in the recipient schema or the SSN schema) be filled out exclusively?

In other words, if one of the fields is filled in for a row, does that mean the other field must necessarily remain empty?

If that's the case, there is a way to find a solution.

Br,


Hello Amine,

 

Yes exactly. either is the first one populated with data or the other one is. Anyway I solved it creating a third attribute and using that instead.

Please share with me your solution anyway since I'm interested to learn more about it.

1 reply

Amine_Abedour
Community Advisor
Community Advisor
October 11, 2024

Hello @a_b_se ,

If I understand correctly, you have a table with B2C records and other B2B records. And your need is to also link the B2B records to the recipient table. If that's the case, you should create a separate second link for B2B like this:

 

<!-- this is the old link, don't modify it --> <element integrity="neutral" label="Recipient" name="recipientLink" pkgStatus="never" revCardinality="single" revLink="XXXCampaignLink" target="nms:recipient" type="link"> <join xpath-dst="@SSN" xpath-src="@SSN" /> </element> <!-- this is the new link --> <element integrity="neutral" label="Recipient_B2B" name="recipientLink_B2B" pkgStatus="never" revCardinality="single" revLink="XXXCampaignLink_B2B" target="nms:recipient" type="link"> <join xpath-dst="@SSNb2b" xpath-src="@SSNb2b" /> </element>

 

After that, in the campaigns and workflows, you need to be careful to choose the right link based on the type of your campaign (B2C or B2B).

 

Br,

 

Amine ABEDOUR
A_B_SEAuthor
Level 4
October 11, 2024

I see, do you know if it is possible to include both links in the same element? It would be best for us. 

Sukrity_Wadhwa
Community Manager
Community Manager
October 28, 2024

Hi @amine_abedour
Could you please confirm @a_b_se's further query?
Thanks!

Sukrity Wadhwa