<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.method.me/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results by user ID 6221</title><link>http://forums.method.me/cs/search/SearchResults.aspx?o=DateDescending&amp;u=6221</link><description>Search results by user ID 6221</description><dc:language>en-US</dc:language><generator>CommunityServer 2007.1 SP2 (Build: 31113.47)</generator><item><title>Re: Is there any db schema documentation?</title><link>http://forums.method.me/cs/forums/p/5353/20384.aspx#20384</link><pubDate>Thu, 26 Dec 2013 22:20:27 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:20384</guid><dc:creator>aaronglamb</dc:creator><description>&lt;p&gt;&lt;span id="mce_0_start" style="overflow:hidden;"&gt;So, that&amp;#39;s *slightly* helpful, thank you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Really, a little documentation would go a long way here; or are you determined to be one of the most diffcult APIs to integrate with on the market?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s where I&amp;#39;m stuck now: inserting new contacts for existing customers.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s my workflow:&lt;/p&gt;
&lt;p&gt;IF Contact &lt;span id="mce_4_start" style="overflow:hidden;"&gt;does not&amp;nbsp;&lt;/span&gt;exists&lt;span id="mce_2_start" style="overflow:hidden;"&gt;&amp;nbsp;in Method&lt;/span&gt;&amp;nbsp;for a given Email&lt;span id="mce_3_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span style="overflow:hidden;"&gt;IF Customer&lt;span id="mce_7_start" style="overflow:hidden;"&gt; does not&lt;/span&gt; exist&amp;nbsp;in Method for given Name&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:60px;"&gt;&lt;span style="overflow:hidden;"&gt;&lt;span id="mce_6_start" style="overflow:hidden;"&gt;&lt;span id="mce_9_start" style="overflow:hidden;"&gt;INSERT new Customer in Method&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span style="overflow:hidden;"&gt;&lt;span id="mce_6_start" style="overflow:hidden;"&gt;&lt;span id="mce_9_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/span&gt;ELSE&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:60px;"&gt;&lt;span id="mce_10_start" style="overflow:hidden;"&gt;SELECT RecordID of Customer from Method&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span id="mce_10_start" style="overflow:hidden;"&gt;&lt;/span&gt;INSERT new Contact in Method with Entity&lt;span id="mce_21_start" style="overflow:hidden;"&gt;_&lt;/span&gt;RecordID = CustomerRecordID&lt;span id="mce_11_start" style="overflow:hidden;"&gt;&lt;span id="mce_15_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span style="overflow:hidden;"&gt;&lt;span style="overflow:hidden;"&gt;UPDATE Contact (to populate all those re&lt;span id="mce_20_start" style="overflow:hidden;"&gt;&lt;/span&gt;ad only fields)&lt;span id="mce_16_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;ELSE Update &lt;span id="mce_14_start" style="overflow:hidden;"&gt;Contact&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;span id="mce_19_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If I end up creating a Customer record, there is no problem. However, if I create a Contact, I don&amp;#39;t see anything new show up in the Method UI, although I do have a db insert id for the Contact record.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My confusion stems from the Contact / Customer / Entity relationship:&amp;nbsp;&lt;span id="mce_22_start" style="overflow:hidden;"&gt;I understand that the Customer table is a view on the Entity table with EntityType = Customer. I understand that the records in the Contacts table use the RecordID of the Entity table as a foreign key, either on the field EntityRecordID or the field Entity_RecordID (see where some documentation might be helpful - what fields are PK, FK, and to what do the FK reference?). Why then, when I insert a new Contact do I not see a result in the UI? What am I missing?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;Thanks again,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Aaron&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;span id="mce_17_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Is there any db schema documentation?</title><link>http://forums.method.me/cs/forums/p/5353/20348.aspx#20348</link><pubDate>Thu, 19 Dec 2013 18:26:18 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:20348</guid><dc:creator>aaronglamb</dc:creator><description>&lt;p&gt;I&amp;#39;m having a very difficult time understanding how the db is organized. Quite simply, I&amp;#39;m trying to add Contacts via the MethodAPIInsertV2 call, and running into multiple issues.&lt;/p&gt;
&lt;p&gt;It seems to me that data is duplicated between Customer, Contact and Entity records, and I&amp;#39;m not sure where the data should go. Furthermore, I understand that a Customer supposedly references one to many Contacts, but I&amp;#39;m finding strange behavior when adding Contacts where the CustomerName seems to be a random Customer in the db, not the one passed. Finally, I&amp;#39;m frustrated that so many fields on the Contact table do not support Insert, but do support Edit.&lt;/p&gt;
&lt;p&gt;What is the proper path forward here? A little documentation would, I feel, go a long way here.&lt;/p&gt;
&lt;p&gt;Thanks for any help or light you can shed.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Aaron.&lt;/p&gt;</description></item></channel></rss>