Generating Merge T ags from an Export Definition
So I've been working on my Bee Integration with CRM/BBIS and I've got it working pretty well. The only thing is, I have to hard code the merge tags in a stored procedure, and I do this by opening a BBIS email, going to insert merge tags, and hten copying all the img tags that show up
This works but I have to update the stored procedure that generates the merge tags for the Bee Editor every time I create a new export definition or modify an existing one.
So I started fiddling around with some SQL to generate the appropriate HTML for the merge tags and I'm SO CLOSE!
Here's an example of one that works... my root query is "Constituents" of course and I've aliased the second level node as "Bio"
<img src="/insertField.field?id=CnsBio_BBIS_LASTLOGIN&name=Bio.BBIS Last Login&nmode=0" fieldcat="308930b5-7d65-48c7-a3f4-e42d364240e2" fieldid="CnsBio_BBIS_LASTLOGIN" title="Constituents\\Bio.BBIS Last Login" runat="server" style="cursor: move;">
Here's one a level down, which I've aliased "Contact"
<img src="/insertField.field?id=CnsBioContact_MOBILE_PHONE&name=Contact.Mobile Phone&nmode=0" fieldcat="308930b5-7d65-48c7-a3f4-e42d364240e2" fieldid="CnsBioContact_MOBILE_PHONE" title="Constituents\\Bio\\Contact.Mobile Phone" runat="server" style="cursor: move;">
In this case, the correct field ID is CnsBioCont_MOBILE_PHONE with my Alias being cut to just "Cont" instead of "Contact"
Meanwhile, also at that level, I have a query that returns some giving merge tags, and it generates this:
<img src="/insertField.field?id=CnsBioGiving_FY_AMOUNT&name=Giving.Current FY Giving&nmode=0" fieldcat="308930b5-7d65-48c7-a3f4-e42d364240e2" fieldid="CnsBioGiving_FY_AMOUNT" title="Constituents\\Bio\\Giving.Current FY Giving" runat="server" style="cursor: move;">
Again, this is wrong, but unlike the Contact which was abbreviated with 4 characters, Giving was abbreviated with THREE characters... ie, CnsBioGiv_FY_AMOUNT.
Now, those abbreviations are not defined in the export definition, so I'm struggling to figure out where they're coming from. I need to be able to do this if I'm gonig to successfully generate merge tags for use in the Bee editor.
Thoughts?
This works but I have to update the stored procedure that generates the merge tags for the Bee Editor every time I create a new export definition or modify an existing one.
So I started fiddling around with some SQL to generate the appropriate HTML for the merge tags and I'm SO CLOSE!
Here's an example of one that works... my root query is "Constituents" of course and I've aliased the second level node as "Bio"
<img src="/insertField.field?id=CnsBio_BBIS_LASTLOGIN&name=Bio.BBIS Last Login&nmode=0" fieldcat="308930b5-7d65-48c7-a3f4-e42d364240e2" fieldid="CnsBio_BBIS_LASTLOGIN" title="Constituents\\Bio.BBIS Last Login" runat="server" style="cursor: move;">
Here's one a level down, which I've aliased "Contact"
<img src="/insertField.field?id=CnsBioContact_MOBILE_PHONE&name=Contact.Mobile Phone&nmode=0" fieldcat="308930b5-7d65-48c7-a3f4-e42d364240e2" fieldid="CnsBioContact_MOBILE_PHONE" title="Constituents\\Bio\\Contact.Mobile Phone" runat="server" style="cursor: move;">
In this case, the correct field ID is CnsBioCont_MOBILE_PHONE with my Alias being cut to just "Cont" instead of "Contact"
Meanwhile, also at that level, I have a query that returns some giving merge tags, and it generates this:
<img src="/insertField.field?id=CnsBioGiving_FY_AMOUNT&name=Giving.Current FY Giving&nmode=0" fieldcat="308930b5-7d65-48c7-a3f4-e42d364240e2" fieldid="CnsBioGiving_FY_AMOUNT" title="Constituents\\Bio\\Giving.Current FY Giving" runat="server" style="cursor: move;">
Again, this is wrong, but unlike the Contact which was abbreviated with 4 characters, Giving was abbreviated with THREE characters... ie, CnsBioGiv_FY_AMOUNT.
Now, those abbreviations are not defined in the export definition, so I'm struggling to figure out where they're coming from. I need to be able to do this if I'm gonig to successfully generate merge tags for use in the Bee editor.
Thoughts?
0
Comments
-
Hmm, interesting problem!
I don't know what kind of access you have with the code; or whether SQL allows string manipulation, but is it possible to remove the leading junk and keep only the field name?
Ie. for CnsBioCont_MOBILE_PHONE, you would remove the leading characters; change MobilePhone to CamelCase, and keep anything after the last underscore
CnsBioCont_MobilePhone
Then you could match fields on MobilePhone and ignore the preceding? This is how I clean the headers in my export definitions when I export them from the system0 -
Stewart Bisset:
Hmm, interesting problem!
I don't know what kind of access you have with the code; or whether SQL allows string manipulation, but is it possible to remove the leading junk and keep only the field name?
Ie. for CnsBioCont_MOBILE_PHONE, you would remove the leading characters; change MobilePhone to CamelCase, and keep anything after the last underscore
CnsBioCont_MobilePhone
Then you could match fields on MobilePhone and ignore the preceding? This is how I clean the headers in my export definitions when I export them from the systemUnfortunately , that won't work because the <img> tag that BBIS uses for the merge t ags needs to be exactly as it expects them to be.
0
Categories
- All Categories
- 6 Blackbaud Community Help
- 210 bbcon®
- 1.4K Blackbaud Altru®
- 395 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.5K Blackbaud Financial Edge NXT®
- 649 Blackbaud Grantmaking™
- 567 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 937 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.5K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 247 ResearchPoint™
- 119 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 239 The Tap (Just for Fun)
- 33 Blackbaud Community Challenges
- 31 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Data Health
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 784 Community News
- 2.9K Jobs Board
- 53 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)

