FastSpring Connector
Documentation
Version: 1
Documentation

FastSpring Connector - Source Code


<ApiConfig Name="FastSpring" Version="1" 
	Slug="fastspring-connector" 
	Id="06667a9a-51b2-4513-ab2c-3566f7f00f52" 
	EngineVersion="15" 
	Logo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOxAAADsQBlSsOGwAAIpdJREFUeF7tnfm3FMWW7+//+Fa/7r7dijIJKDIIAte+T3G4Dqj3OiuDDDKeeYAzMSMKCCKoKAKiCDjh1D+TGft9v5ERRVRUZFXlOYdBzv6u9V2ZlUMVrLU/Z+8dGZn5F5VKpVKpVCqVSqVSqVQqlUqlUqlUKpVKpVKpVCqVSqVSqVQqlUqlUt1KmW+OSd77qJgrn4rbpFKpKHNko+SbZ0m+6X7JB/6ugKhUlHx/RvLBxwswtj8k+Y6HsT5d8g/XKySqqS1zqlfyrXMl34LMsWP+DROU92aKuXhEIVFNPckv30o++nyRNbbNq4fDe+scybsfUUBUU0vmy92Sd6CMQoZIglEzj5kh+b5XFRLV1FB+8E0EPfqLbSirklAkjCxjzu5TSFR3r8y3H0ne82gBxw424gkQyswepXuJAqK6O2WObiqGb7c8kAagHTOLnNihkKjuHskPX0i+8wk3fPtgOvDbNUuyzkUKiOrukDnVVwQ1M0cq4MfjTdPFfL5LIVH9eSW/XW49fDteb5kt+fDTCojqzylzdq/kHQvaGL4dp3nxEFlJrn2tkKj+XKoN33LEKRXck+VNM1BmDSkgqj+HzKUTkvcuH9/w7XjMC4cH31JAVHe+zLH3Jj58W9X8rZ2PKyCqO1fy45eS71o5OcO3Vex6kLxLh3tVd6jMqf4iSOPZtzfbhMOaI2MPifxyUSFR3TmSX7+TfPQFyTbeN/nDt63s4WCPw4yFMstc/UwBUd0Zyr/cJ9mOBYBjumQ2UBNBfLPswfDeBkA2zxbz3ScKiOr2Kz/wpmQbAMaWOZJte8gCcssgCeHgOu0BuXxKAVHdPpl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NljVFJL5crQomcoA2Y4+ZQuyzIf6EhrVFJU58AogQIbonF8PCLf1Lha5cEjhUE1tmb5HkC0eKCDZgUZ8M7LKvpcUDJWKMt8cQZ8xoyinOuaJOaNPMVSp6sQ+w+x8TPi2W7dJpVKpVCqVSqVSqVQqlUqlUqlUKpVKpVKpVCqVSqVSqVQqlUqlUqlUN1l/+cv/B2qMU82O3XWnAAAAAElFTkSuQmCC"
	>
	
  <VersionHistory>
    <Change Date="2023-12-31" Desc="Initial version" />
  </VersionHistory>
	
  <ServiceUrls>
    <ServiceUrl Name="https://api.fastspring.com" Url="https://api.fastspring.com" />
  </ServiceUrls>
  
  <Auths>
    <Auth Name="Http" Type="Http" ConnStr="CredentialType=Basic;" HelpLink="https://developer.fastspring.com/reference/getting-started-with-your-api#credentials" TestEndPoint="get_product_ids">
      <Params>
        <Param Name="UserName" Label="" />
        <Param Name="Password" Secret="True" />
        <Param Name="RetryMode" Hidden="True" Value="RetryWhenStatusCodeMatch" />
        <Param Name="RetryStatusCodeList" Hidden="True" Value="429" HelpLink="https://developer.fastspring.com/reference/getting-started-with-your-api#rate-limits"/>
        <Param Name="RetryCountMax" Value="5" Hidden="True" />
        <Param Name="RetryMultiplyWaitTime" Value="True" Hidden="True" />		
		
		<Param Name="WebStoreUrl" Label="Your Webstore URL" Value="https://YOUR-STORE.onfastspring.com"  />		
      </Params>
<Notes>
        <![CDATA[Here is how to obtain API Credentials. You might be able to use your Account Login UserId / Password but we do not reccomend using it. Instead of that use API credentials generated using the following way.
<ol>
	<li>In the FastSpring App, navigate to Developer Tools > APIs > API Credentials.</li>
	<li>Click Create. FastSpring will automatically generate your username and password. Use this on the API connection UI</li>
	<li>Securely store the credentials for future reference.</li>
	<li>If you reset your credentials, update each stored procedure that relies on API access to prevent failed requests.</li>
</ol>
]]>

      </Notes>
	  
    </Auth>
  </Auths>
  
  <Template>

	<Param Name="product" Type="Query" OptionsEndPoint="get_product_ids" OptionsEndPointSortBy="Id"  OptionsEndPointValueColumn="Id" MultiSelect="True" MultiSelectSeparator="," />
	<Param Name="date" Options="2023-12-31;today;yesterday;yearstart-10y;monthstart;monthend;yearstart;yearend;weekstart;weekend;yearstart-1y;yearend-1y;monthstart-1d;monthend+1d;monthend+1d-1y" Desc="The date for which to retrieve the report in YYYYMMDD format. Supported functions now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3days from month start)"
        ValueTemplate="&lt;&lt;{$value$}||yyyy-MM-dd,FUN_TO_DATE&gt;&gt;"  />
	<EndPoint Name="quote_params">
      <Params>
		<Param Name="CreatedBegin" Key="createdBegin" Type="Query" Label="Created Begin Date (yyyy-MM-dd)" Value="yearstart-10y" Template="date" Desc="filters results to include quotes created after the specified begin date (must be at least one day before the specified end date)" />
        <Param Name="CreatedEnd" Key="createdEnd" Type="Query" Label="Created End Date (yyyy-MM-dd)" Value="today+2d" Template="date" Desc="filters results to include quotes created before the specified end date"/>
		<Param Name="CreatedEmail" Key="createdEmail" Type="Query" Label="Created Email" />
		<Param Name="QuoteId" Key="onlyQuoteId" Type="Query"  />
		<Param Name="SearchFor" Key="searchParam" Type="Query"  />
		<Param Name="Statuses" Type="Query" MultiSelect="True" MultiSelectTemplate="statuses={@value}"  Options=";OPEN;COMPLETED;CANCELED;EXPIRED"/>

		<Param Name="expiresBegin" Key="expiresBegin" Type="Query" Label="Expires Begin Date (yyyy-MM-dd)"  Template="date" Desc="filters results to include quotes expiring after the specified begin date (must be at least one day before the specified end date)" />
        <Param Name="expiresEnd" Key="expiresEnd" Type="Query" Label="Expires End Date (yyyy-MM-dd)"  Template="date" Desc="filters results to include quotes expiring before the specified end date"/>
        <Param Name="expiresBefore" Key="expiresEnd" Type="Query" Label="Expires Before Date (yyyy-MM-dd)"  Template="date" Desc="filters results to include quotes expiring before the specified end date"/>
      </Params>		
	</EndPoint>
	
	<EndPoint Name="order_params">
      <Params>
		<Param Name="Days" Key="days" Type="Query" Desc="filters results to include transactions within a certain time frame"/>
		<Param Name="StartDate" Key="begin" Type="Query" Label="Start Date (yyyy-MM-dd)" Value="yearstart-10y" Template="date" Desc="filters results to include transactions after the specified begin date (must be at least one day before the specified end date)" />
        <Param Name="EndDate" Key="end" Type="Query" Label="End Date (yyyy-MM-dd)" Value="today+2d" Template="date" Desc="filters results to include transactions before the specified end date"/>
		<Param Name="Status" Key="status" Type="Query" Label="Order Status" Options=";completed;cancelled;failed" Desc="filters results by transaction status; completed = successful orders, canceled = declined orders, failed = transaction failed to complete (very uncommon)"/>
		<Param Name="Products" Key="products" Type="Query" Template="product" Desc="filters results to include only transactions involving the specified product ID(s) / product path(s)"/>
		<Param Name="Return" Key="returns" Type="Query" Label="Show Returned Only" Options=";true;false" Desc="filters results to include orders with or without returns; response includes returns array with return IDs where applicable"/>
		<Param Name="Rebill" Key="rebill" Type="Query" Label="Rebill Only" Options=";true;false" Desc="filters results to include only subscription rebill transactions or exclude all subscription rebill transactions"/>
		<Param Name="Scope" Key="scope" Type="Query" Label="Scope" Options=";all;live;test" Desc="filters results to include live transactions, test transactions, or both"/>
      </Params>		
	</EndPoint>
	
	<EndPoint Name="pagination">
		<Params>
			<Param Name="PageSize" Key="limit" Value="200" Type="Query" Hidden="True"/>
			<Param Name="NextUrlAttributeOrExpr" Type="Property" Value="$.nextPage" />
			<Param Name="NextUrlEndIndicator" Type="Property" Value="regex=^$" />
			<Param Name="StopIndicatorAttributeOrExpr" Type="Property" Value="$.nextPage" />
			<Param Name="NextUrlSuffix" Type="Property" Value="page=&lt;%nextlink%&gt;" />
		</Params>
	</EndPoint>
	<EndPoint Name="pagination_report">
		<Params>
			<Param Name="PageSize" Value="1000" DataType="DT_I4" Hidden="True"/>			
			<Param Name="PagingMode" Type="Property" Value="ByPostData" />
			<Param Name="PagingByUrlCurrentPage" Type="Property" Value="0" />
			<Param Name="PagingByUrlAttributeName" Type="Property" Value="{%page%}" />			
			
			<Param Name="StartDate" Value="monthstart" Template="date" Type="Placeholder"/>
			<Param Name="EndDate" Value="today+2d" Template="date" Type="Placeholder"/>
			<Param Name="SyncDate" Template="date" Type="Placeholder"/>
			
			<Param Name="Country" Label="Country" MultiSelect="True" MultiSelectSeparator="," MultiSelectTemplate="&quot;{@value}&quot;" ValueTemplate="[{$value$}]" Options="Albania=AL;Argentina=AR;Aruba=AW;Australia=AU;Austria=AT;Azerbaijan=AZ;Belgium=BE;Brazil=BR;British Virgin Islands=VG;Bulgaria=BG;Canada=CA;CANADA=CANADA;Chile=CL;China=CN;Colombia=CO;Costa Rica=CR;Croatia=HR;CW=CW;Cyprus=CY;Czech Republic=CZ;Denmark=DK;Dominican Republic=DO;Ecuador=EC;Egypt=EG;Estonia=EE;Finland=FI;FINLAND=FINLAND;France=FR;French Polynesia=PF;Germany=DE;Gibraltar=GI;Greece=GR;Guatemala=GT;Honduras=HN;Hong Kong, SAR China=HK;Hungary=HU;Iceland=IS;India=IN;Indonesia=ID;Ireland=IE;Isle of Man=IM;Israel=IL;Italy=IT;Jamaica=JM;Japan=JP;Korea (South)=KR;Latvia=LV;Lithuania=LT;Luxembourg=LU;Malaysia=MY;Malta=Malta;Malta=MT;Mauritius=MU;Mexico=MX;Netherlands=NL;New Zealand=NZ;Nigeria=NG;Norway=NO;Peru=PE;Philippines=PH;Poland=PL;Poland=Poland;Portugal=PT;Puerto Rico=PR;Qatar=QA;Romania=RO;Russian Federation=RU;Saudi Arabia=SA;Singapore=SG;Slovakia=SK;Slovenia=SI;South Africa=ZA;Spain=ES;Sri Lanka=LK;Sweden=SE;Switzerland=CH;Switzerland=Switzerland;Thailand=TH;Trinidad and Tobago=TT;Turkey=TR;Ukraine=UA;United Arab Emirates=AE;United Kingdom=GB;United States of America=US;USA=USA;Viet Nam=VN" />
			<Param Name="ProductPaths" Type="Placeholder" OptionsEndPointSortBy="Id" MultiSelect="True" MultiSelectSeparator="," MultiSelectTemplate="&quot;{@value}&quot;" ValueTemplate="[{$value$}]" OptionsEndPoint="get_product_ids" OptionsEndPointValueColumn="Id"/>
			<Param Name="ProductNames" />
			<Param Name="NotificationEmails" Lable="NotificationEmails (e.g. [&quot;a@company.comquot;, &quot;b@company.comquot;]" />
			
			<Param Name="DateParseHandling" Type="Property" Value="None" />
			<Param Name="DateFormatString" Type="Property" Value="yyyy-MM-dd" />
			
		</Params>
	</EndPoint>

	
	<EndPoint Name="subscription_params">
      <Params>
		<Param Name="AccountId" Key="accountId" Type="Query" Desc="Account Id"/>
		<Param Name="Products" Key="products" Type="Query" Template="product" Desc="filters results to include only transactions involving the specified product ID(s) / product path(s)"/>
		<Param Name="StartDate" Key="begin" Type="Query" Label="Start Date (yyyy-MM-dd)" Value="yearstart-10y" Template="date" Desc="filters results to include transactions after the specified begin date (must be at least one day before the specified end date)" />
        <Param Name="EndDate" Key="end" Type="Query" Label="End Date (yyyy-MM-dd)" Value="today+2d" Template="date" Desc="filters results to include transactions before the specified end date"/>
		<Param Name="Event" Key="event" Type="Query" Desc="Event"/>		
      </Params>		
	</EndPoint>
	
	<EndPoint Name="account_params">
      <Params>
		<Param Name="Email" Key="email" Type="Query" Desc="Account email"/>
		<Param Name="CustomKey" Key="custom" Type="Query" Label="Account custom key" />
		<Param Name="GlobalKey" Key="global" Type="Query" Label="Account global key" />
		<Param Name="OrderID" Key="orderID" Type="Query" Label="Account orderID" />
		<Param Name="OrderReference" Key="orderReference" Type="Query" Label="Account orderReference" />
		<Param Name="SubscriptionId" Key="subscriptionId" Type="Query" Label="Account subscriptionId" />
		
		<Param Name="Products" Key="products" Type="Query" Template="product" Desc="filters results to include only transactions involving the specified product ID(s) / product path(s)"/>
		<Param Name="Refunds" Key="refunds" Type="Query" Label="Show Returned Only" Options=";true;false" Desc="filters results to include orders with or without returns; response includes returns array with return IDs where applicable"/>
		<Param Name="SubscriptionStatus" Key="subscriptions" Type="Query" Label="Subscription Status" Options=";active;ended;canceled;started" Desc="'active', 'ended', 'canceled', 'started' will return accounts with subscriptions in the corresponding state"/>
		
		<Param Name="ContineOnErrorForStatusCode" Type="Property" Value="True" />
		<Param Name="ErrorStatusCodeToMatch" Type="Property" Value="400" />		
		
      </Params>		
	</EndPoint>
	
	<EndPoint Name="quote_output">
		<OutputColumns>
			<Column Name="id" Label="Id" DataType="DT_WSTR" Length="100" />
			<Column Name="name" Label="Name" DataType="DT_WSTR" Length="128" />
			<Column Name="status" Label="Status" DataType="DT_WSTR" Length="100" />
			<Column Name="orderReference" Label="OrderReference" DataType="DT_WSTR" Length="100" />
			<Column Name="created" Label="Created" DataType="DT_DBTIMESTAMP" />
			<Column Name="currency" Label="Currency" DataType="DT_WSTR" Length="12" />
			<Column Name="totalInPayoutCurrency" Label="TotalInPayoutCurrency" DataType="DT_R8" />
			<Column Name="subtotalInPayoutCurrency" Label="SubtotalInPayoutCurrency" DataType="DT_R8" />
			<Column Name="items" Label="Item_1" DataType="DT_WSTR" Length="100" Desc="First item from this quote" ValueTemplate="&lt;&lt;{$value$}|~|$.data[0].product,FUN_JSON_TO_TEXT&gt;&gt;" />
			<Column Name="items" Label="Item_2" DataType="DT_WSTR" Length="100" Desc="Second item from this quote" ValueTemplate="&lt;&lt;{$value$}|~|$.data[1].product,FUN_JSON_TO_TEXT&gt;&gt;" />
			<Column Name="items" Label="Item_3" DataType="DT_WSTR" Length="100" Desc="Third item from this quote" ValueTemplate="&lt;&lt;{$value$}|~|$.data[2].product,FUN_JSON_TO_TEXT&gt;&gt;" />
			
			<Column Name="invoiceId" Label="InvoiceId" DataType="DT_WSTR" Length="100" />
			<Column Name="coupon" Label="Coupon" DataType="DT_WSTR" Length="100" />
			<Column Name="subtotal" Label="Subtotal" DataType="DT_R8" />
			<Column Name="subtotalDisplay" Label="SubtotalDisplay" DataType="DT_WSTR" Length="100" />
			
			<Column Name="subtotalInPayoutCurrencyDisplay" Label="SubtotalInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="100" />
			<Column Name="tags" Label="Tags" DataType="DT_WSTR" Length="4000" />
			<Column Name="tax" Label="Tax" DataType="DT_R8" />
			<Column Name="taxRate" Label="TaxRate" DataType="DT_R8" />
			<Column Name="taxType" Label="TaxType" DataType="DT_WSTR" Length="100" />
			<Column Name="total" Label="Total" DataType="DT_R8" />
			<Column Name="totalDisplay" Label="TotalDisplay" DataType="DT_WSTR" Length="100" />
			
			<Column Name="totalInPayoutCurrencyDisplay" Label="TotalInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="100" />
			<Column Name="updated" Label="Updated" DataType="DT_DBTIMESTAMP" />
			<Column Name="taxId" Label="TaxId" DataType="DT_WSTR" Length="100" />
			<Column Name="recipient.company" Label="RecipientCompany" DataType="DT_WSTR" Length="100" />
			<Column Name="recipient.email" Label="RecipientEmail" DataType="DT_WSTR" Length="255" />
			<Column Name="recipient.first" Label="RecipientFirst" DataType="DT_WSTR" Length="100" />
			<Column Name="recipient.last" Label="RecipientLast" DataType="DT_WSTR" Length="100" />
			<Column Name="recipient.phone" Label="RecipientPhone" DataType="DT_WSTR" Length="100" />
			<Column Name="recipient.userId" Label="RecipientUserId" DataType="DT_WSTR" Length="100" />
			<Column Name="recipientAddress.addressLine1" Label="RecipientAddressAddressLine1" DataType="DT_WSTR" Length="100" />
			<Column Name="recipientAddress.addressLine2" Label="RecipientAddressAddressLine2" DataType="DT_WSTR" Length="100" />
			<Column Name="recipientAddress.city" Label="RecipientAddressCity" DataType="DT_WSTR" Length="100" />
			<Column Name="recipientAddress.country" Label="RecipientAddressCountry" DataType="DT_WSTR" Length="100" />
			<Column Name="recipientAddress.postalCode" Label="RecipientAddressPostalCode" DataType="DT_WSTR" Length="100" />
			<Column Name="recipientAddress.region" Label="RecipientAddressRegion" DataType="DT_WSTR" Length="100" />
			
			
			<Column Name="createdBy.company" Label="CreatedByCompany" DataType="DT_WSTR" Length="100" />
			<Column Name="createdBy.email" Label="CreatedByEmail" DataType="DT_WSTR" Length="100" />
			<Column Name="createdBy.first" Label="CreatedByFirst" DataType="DT_WSTR" Length="100" />
			<Column Name="createdBy.last" Label="CreatedByLast" DataType="DT_WSTR" Length="100" />
			<Column Name="createdBy.phone" Label="CreatedByPhone" DataType="DT_WSTR" Length="100" />
			<Column Name="createdBy.userId" Label="CreatedByUserId" DataType="DT_WSTR" Length="100" />
			<Column Name="discount" Label="Discount" DataType="DT_R8" />
			<Column Name="discountDisplay" Label="DiscountDisplay" DataType="DT_WSTR" Length="100" />
			<Column Name="discountInPayoutCurrency" Label="DiscountInPayoutCurrency" DataType="DT_R8" />
			<Column Name="discountInPayoutCurrencyDisplay" Label="DiscountInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="100" />
			<Column Name="expires" Label="Expires" DataType="DT_DBTIMESTAMP" />
			<Column Name="expirationDateDays" Label="ExpirationDateDays" DataType="DT_I8" />
			<Column Name="fulfillmentTerm" Label="FulfillmentTerm" DataType="DT_WSTR" Length="100" />
			<Column Name="buyerGenerated" Label="BuyerGenerated" DataType="DT_BOOL" />
			<Column Name="copyNotesToInvoice" Label="CopyNotesToInvoice" DataType="DT_BOOL" />
			
			<Column Name="items" Label="Items" DataType="DT_NTEXT" />
			
			<Column Name="notes" Label="Notes" DataType="DT_WSTR" Length="4000" />
			<Column Name="netTermsDays" Label="NetTermsDays" DataType="DT_I8" />
			<Column Name="quoteUrl" Label="QuoteUrl" DataType="DT_WSTR" Length="448" />

			<Column Name="siteId" Label="SiteId" DataType="DT_WSTR" Length="100" />
			
			<Column Name="statusHistory" Label="StatusHistory" DataType="DT_WSTR" Length="4000" />

			<Column Name="source" Label="Source" DataType="DT_WSTR" Length="100" />
			<Column Name="sourceIP" Label="SourceIP" DataType="DT_WSTR" Length="100" />
			
			<Column Name="isGrossTax" Label="IsGrossTax" DataType="DT_BOOL" />

		</OutputColumns>	
	</EndPoint>
	
	<EndPoint Name="subscription_output">
      <OutputColumns>
        <Column Name="id" Label="Id" DataType="DT_WSTR" Length="100" />
        <Column Name="quote" Label="QuoteId" DataType="DT_WSTR" Length="1020" />
        <Column Name="account" Label="AccountId" DataType="DT_WSTR" Length="100" />
        <Column Name="product" Label="ProductId" DataType="DT_WSTR" Length="100" />
		
        <Column Name="active" Label="Active" DataType="DT_BOOL" />
        <Column Name="state" Label="State" DataType="DT_WSTR" Length="24" />
        <Column Name="sku" Label="Sku" DataType="DT_WSTR" Length="1020" />
        <Column Name="display" Label="Display" DataType="DT_WSTR" Length="1000" />
        <Column Name="quantity" Label="Quantity" DataType="DT_I8" />
        <Column Name="autoRenew" Label="AutoRenew" DataType="DT_BOOL" />
        <Column Name="isSubscriptionEligibleForPauseByBuyer" Label="IsSubscriptionEligibleForPauseByBuyer" DataType="DT_BOOL" />

        <Column Name="isPauseScheduled" Label="IsPauseScheduled" DataType="DT_BOOL" />
		<Column Name="changedDisplayISO8601" Label="ChangedDate" DataType="DT_DBDATE" />
		<Column Name="beginDisplayISO8601" Label="BeginDate" DataType="DT_DBDATE" />
		<Column Name="nextDisplayISO8601" Label="NextDate" DataType="DT_DBDATE" />
        <Column Name="endDisplayISO8601" Label="EndDate" DataType="DT_DBDATE" />
		<Column Name="canceledDateDisplayISO8601" Label="CanceledDate" DataType="DT_DBDATE" />
		<Column Name="deactivationDateDisplayISO8601" Label="DeactivationDate" DataType="DT_DBDATE" />
		<Column Name="nextChargeDateDisplayISO8601" Label="NextChargeDate" DataType="DT_DBDATE" />

        <Column Name="initialOrderId" Label="InitialOrderId" DataType="DT_WSTR" Length="88" />
        <Column Name="initialOrderReference" Label="InitialOrderReference" DataType="DT_WSTR" Length="80" />
		<Column Name="importIdentifier" Label="ImportIdentifier" DataType="DT_WSTR" Length="80" />
		<Column Name="customReferenceId" Label="CustomReferenceId" DataType="DT_WSTR" Length="80" />
		<Column Name="migratedFromSubscriptionId" Label="MigratedFromSubscriptionId" DataType="DT_WSTR" Length="80" />
		<Column Name="migratedFromSubscriptionReference" Label="MigratedFromSubscriptionReference" DataType="DT_WSTR" Length="80" />
		<Column Name="migratedIntoSubscriptionId" Label="MigratedIntoSubscriptionId" DataType="DT_WSTR" Length="80" />
		<Column Name="migratedIntoSubscriptionReference" Label="MigratedIntoSubscriptionReference" DataType="DT_WSTR" Length="80" />
		
        <Column Name="adhoc" Label="Adhoc" DataType="DT_BOOL" />
		
        <Column Name="changed" Label="Changed" DataType="DT_I8" />
        <Column Name="changedValue" Label="ChangedValue" DataType="DT_I8" />
        <Column Name="changedInSeconds" Label="ChangedInSeconds" DataType="DT_I8" />
        <Column Name="changedDisplay" Label="ChangedDisplay" DataType="DT_WSTR" Length="32" />
        
        <Column Name="changedDisplayEmailEnhancements" Label="ChangedDisplayEmailEnhancements" DataType="DT_WSTR" Length="48" />
        <Column Name="changedDisplayEmailEnhancementsWithTime" Label="ChangedDisplayEmailEnhancementsWithTime" DataType="DT_WSTR" Length="96" />
        <Column Name="live" Label="Live" DataType="DT_BOOL" />
        <Column Name="currency" Label="Currency" DataType="DT_WSTR" Length="12" />

        <Column Name="price" Label="Price" DataType="DT_R8" />
        <Column Name="priceDisplay" Label="PriceDisplay" DataType="DT_WSTR" Length="36" />
        <Column Name="priceInPayoutCurrency" Label="PriceInPayoutCurrency" DataType="DT_R8" />
        <Column Name="priceInPayoutCurrencyDisplay" Label="PriceInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="36" />
        <Column Name="discount" Label="Discount" DataType="DT_R8" />
        <Column Name="discountDisplay" Label="DiscountDisplay" DataType="DT_WSTR" Length="20" />
        <Column Name="discountInPayoutCurrency" Label="DiscountInPayoutCurrency" DataType="DT_R8" />
        <Column Name="discountInPayoutCurrencyDisplay" Label="DiscountInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="20" />
        <Column Name="subtotal" Label="Subtotal" DataType="DT_R8" />
        <Column Name="subtotalDisplay" Label="SubtotalDisplay" DataType="DT_WSTR" Length="36" />
        <Column Name="subtotalInPayoutCurrency" Label="SubtotalInPayoutCurrency" DataType="DT_R8" />
        <Column Name="subtotalInPayoutCurrencyDisplay" Label="SubtotalInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="36" />
        <Column Name="attributes.migratedProductId" Label="AttributesMigratedProductId" DataType="DT_WSTR" Length="88" />
        <Column Name="attributes.classicProduct" Label="AttributesClassicProduct" DataType="DT_WSTR" Length="984" />
        <Column Name="next" Label="Next" DataType="DT_I8" />
        <Column Name="nextValue" Label="NextValue" DataType="DT_I8" />
        <Column Name="nextInSeconds" Label="NextInSeconds" DataType="DT_I8" />
        <Column Name="nextDisplay" Label="NextDisplay" DataType="DT_WSTR" Length="32" />
        
        <Column Name="end" Label="End" DataType="DT_WSTR" Length="1020" />
        <Column Name="endValue" Label="EndValue" DataType="DT_WSTR" Length="1020" />
        <Column Name="endInSeconds" Label="EndInSeconds" DataType="DT_WSTR" Length="1020" />
        <Column Name="endDisplay" Label="EndDisplay" DataType="DT_WSTR" Length="1020" />
		
        <Column Name="canceledDateValue" Label="CanceledDateValue" DataType="DT_WSTR" Length="1020" />
        <Column Name="canceledDateInSeconds" Label="CanceledDateInSeconds" DataType="DT_WSTR" Length="1020" />
        <Column Name="canceledDateDisplay" Label="CanceledDateDisplay" DataType="DT_WSTR" Length="1020" />
        
        <Column Name="deactivationDate" Label="DeactivationDateNum" DataType="DT_I8" Length="1020" />
        <Column Name="deactivationDateValue" Label="DeactivationDateValue" DataType="DT_WSTR" Length="1020" />
        <Column Name="deactivationDateInSeconds" Label="DeactivationDateInSeconds" DataType="DT_WSTR" Length="1020" />
        <Column Name="deactivationDateDisplay" Label="DeactivationDateDisplay" DataType="DT_WSTR" Length="1020" />
        
        <Column Name="sequence" Label="Sequence" DataType="DT_I8" />
        <Column Name="periods" Label="Periods" DataType="DT_WSTR" Length="1020" />
        <Column Name="remainingPeriods" Label="RemainingPeriods" DataType="DT_WSTR" Length="1020" />
        <Column Name="begin" Label="Begin" DataType="DT_I8" />
        <Column Name="beginValue" Label="BeginValue" DataType="DT_I8" />
        <Column Name="beginInSeconds" Label="BeginInSeconds" DataType="DT_I8" />
        <Column Name="beginDisplay" Label="BeginDisplay" DataType="DT_WSTR" Length="32" />
        
        <Column Name="beginDisplayEmailEnhancements" Label="BeginDisplayEmailEnhancements" DataType="DT_WSTR" Length="48" />
        <Column Name="beginDisplayEmailEnhancementsWithTime" Label="BeginDisplayEmailEnhancementsWithTime" DataType="DT_WSTR" Length="96" />
        <Column Name="nextDisplayEmailEnhancements" Label="NextDisplayEmailEnhancements" DataType="DT_WSTR" Length="48" />
        <Column Name="nextDisplayEmailEnhancementsWithTime" Label="NextDisplayEmailEnhancementsWithTime" DataType="DT_WSTR" Length="96" />
        <Column Name="intervalUnit" Label="IntervalUnit" DataType="DT_WSTR" Length="16" />
        <Column Name="intervalUnitAbbreviation" Label="IntervalUnitAbbreviation" DataType="DT_WSTR" Length="8" />
        <Column Name="intervalLength" Label="IntervalLength" DataType="DT_I8" />
        <Column Name="intervalLengthGtOne" Label="IntervalLengthGtOne" DataType="DT_BOOL" />
        <Column Name="nextChargeCurrency" Label="NextChargeCurrency" DataType="DT_WSTR" Length="12" />
        <Column Name="nextChargeDate" Label="NextChargeDateNum" DataType="DT_I8" />
        <Column Name="nextChargeDateValue" Label="NextChargeDateValue" DataType="DT_I8" />
        <Column Name="nextChargeDateInSeconds" Label="NextChargeDateInSeconds" DataType="DT_I8" />
        <Column Name="nextChargeDateDisplay" Label="NextChargeDateDisplay" DataType="DT_WSTR" Length="32" />

        <Column Name="nextChargePreTax" Label="NextChargePreTax" DataType="DT_R8" />
        <Column Name="nextChargePreTaxDisplay" Label="NextChargePreTaxDisplay" DataType="DT_WSTR" Length="36" />
        <Column Name="nextChargePreTaxInPayoutCurrency" Label="NextChargePreTaxInPayoutCurrency" DataType="DT_R8" />
        <Column Name="nextChargePreTaxInPayoutCurrencyDisplay" Label="NextChargePreTaxInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="36" />
        <Column Name="nextChargeTotal" Label="NextChargeTotal" DataType="DT_R8" />
        <Column Name="nextChargeTotalDisplay" Label="NextChargeTotalDisplay" DataType="DT_WSTR" Length="36" />
        <Column Name="nextChargeTotalInPayoutCurrency" Label="NextChargeTotalInPayoutCurrency" DataType="DT_R8" />
        <Column Name="nextChargeTotalInPayoutCurrencyDisplay" Label="NextChargeTotalInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="36" />
        <Column Name="cancellationSetting.cancellation" Label="CancellationSettingCancellation" DataType="DT_WSTR" Length="84" />
        <Column Name="cancellationSetting.intervalUnit" Label="CancellationSettingIntervalUnit" DataType="DT_WSTR" Length="16" />
        <Column Name="cancellationSetting.intervalLength" Label="CancellationSettingIntervalLength" DataType="DT_I8" />
        <Column Name="instructions" Label="Instructions" DataType="DT_NTEXT" />
		<Column Name="expiry" Label="Expiry" DataType="DT_WSTR" Length="10" />
		<Column Name="declineReason" Label="DeclineReason" DataType="DT_WSTR" Length="1000" />
		<Column Name="cardType" Label="CardType" DataType="DT_WSTR" Length="100" />
		<Column Name="cardEnding" Label="CardEnding" DataType="DT_WSTR" Length="20" />
      </OutputColumns>	
	</EndPoint>
	<EndPoint Name="charge_output" IncludeParentColumns="True">
      <OutputColumns>
        <Column Name="P_account" Label="AccountId" DataType="DT_WSTR" Length="100" />
		<Column Name="timestampDisplayISO8601" Label="ChargeDate" DataType="DT_DBDATE" />
        <Column Name="total" Label="Total" DataType="DT_R8" />
		<Column Name="currency" Label="Currency" DataType="DT_WSTR" Length="12" />
        <Column Name="payoutCurrency" Label="PayoutCurrency" DataType="DT_WSTR" Length="12" />
        <Column Name="totalInPayoutCurrency" Label="TotalInPayoutCurrency" DataType="DT_R8" />
        <Column Name="status" Label="Status" DataType="DT_WSTR" Length="50" />
        <Column Name="order" Label="OrderId" DataType="DT_WSTR" Length="100" />
        <Column Name="orderReference" Label="OrderReference" DataType="DT_WSTR" Length="100" />
        <Column Name="subscription" Label="SubscriptionId" DataType="DT_WSTR" Length="100" />
        <Column Name="timestamp" Label="Timestamp" DataType="DT_I8" />
        <Column Name="timestampValue" Label="TimestampValue" DataType="DT_I8" />
        <Column Name="timestampInSeconds" Label="TimestampInSeconds" DataType="DT_I8" />
        <Column Name="timestampDisplay" Label="TimestampDisplay" DataType="DT_WSTR" Length="100" />
      </OutputColumns>		
	</EndPoint>	
	
	<EndPoint Name="account_output">
	   <OutputColumns>
			<Column Name="id" Label="Id" DataType="DT_WSTR" Length="50" />
			<Column Name="contact.first" Label="ContactFirst" DataType="DT_WSTR" Length="255" />
			<Column Name="contact.last" Label="ContactLast" DataType="DT_WSTR" Length="255" />
			<Column Name="contact.email" Label="ContactEmail" DataType="DT_WSTR" Length="255" />
			<Column Name="contact.company" Label="ContactCompany" DataType="DT_WSTR" Length="255" />
			<Column Name="contact.phone" Label="ContactPhone" DataType="DT_WSTR" Length="255" />
			<Column Name="contact.subscribed" Label="ContactSubscribed" DataType="DT_BOOL" />
			<Column Name="address.addressLine1" Label="AddressLine1" DataType="DT_WSTR" Length="255" />
			<Column Name="address.addressLine2" Label="AddressLine2" DataType="DT_WSTR" Length="255" />
			<Column Name="address.city" Label="City" DataType="DT_WSTR" Length="255" />
			<Column Name="address.region" Label="Region" DataType="DT_WSTR" Length="255" />
			<Column Name="address.regionCustom" Label="RegionCustom" DataType="DT_WSTR" Length="255" />
			<Column Name="address.postalCode" Label="PostalCode" DataType="DT_WSTR" Length="255" />
			<Column Name="address.company" Label="AddressCompany" DataType="DT_WSTR" Length="255" />
			<Column Name="language" Label="Language" DataType="DT_WSTR" Length="255" />
			<Column Name="country" Label="Country" DataType="DT_WSTR" Length="255" />
			<Column Name="lookup.global" Label="LookupGlobal" DataType="DT_WSTR" Length="255" />
			<Column Name="url" Label="Url" DataType="DT_WSTR" Length="255" />
			<Column Name="payment.methods" Label="PaymentMethods" DataType="DT_I8" />
			<Column Name="payment.active" Label="PaymentActive" DataType="DT_I8" />
			<Column Name="orders" Label="Orders" DataType="DT_NTEXT" />
			<Column Name="subscriptions" Label="Subscriptions" DataType="DT_NTEXT" />
			<Column Name="charges" Label="Charges" DataType="DT_NTEXT" />
			<Column Name="subscribed" Label="Subscribed" DataType="DT_BOOL" />
			<Column Name="taxExemptionData" Label="TaxExemptionData" DataType="DT_WSTR" Length="4000" />
		  </OutputColumns>	
	</EndPoint>
	<EndPoint Name="order_output">	
		<OutputColumns>
			<Column Name="id" Label="Id" DataType="DT_WSTR" Length="50" />
			<Column Name="reference" Label="Reference" DataType="DT_WSTR" Length="50" />
			<Column Name="items" Label="Item_1" DataType="DT_WSTR" Length="100" Desc="First item from this order" ValueTemplate="&lt;&lt;{$value$}|~|$.data[0].product,FUN_JSON_TO_TEXT&gt;&gt;" />
			<Column Name="items" Label="Item_2" DataType="DT_WSTR" Length="100" Desc="First item from this order" ValueTemplate="&lt;&lt;{$value$}|~|$.data[1].product,FUN_JSON_TO_TEXT&gt;&gt;" />
			<Column Name="changedDisplayISO8601" Label="OrderDate" DataType="DT_DBDATE" />
			<Column Name="subtotalInPayoutCurrency" Label="SubtotalInPayoutCurrency" DataType="DT_R8" />
			<Column Name="taxInPayoutCurrency" Label="TaxInPayoutCurrency" DataType="DT_R8" />
			<Column Name="totalInPayoutCurrency" Label="TotalInPayoutCurrency" DataType="DT_R8" />
			<Column Name="discountInPayoutCurrency" Label="DiscountInPayoutCurrency" DataType="DT_R8" />
			<Column Name="proratedTotalInPayoutCurrency" Label="ProratedTotalInPayoutCurrency" DataType="DT_R8" />
			<Column Name="currency" Label="Currency" DataType="DT_WSTR" Length="10" />
			
			<Column Name="subtotalDisplay" Label="SubtotalDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="taxDisplay" Label="TaxDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="totalDisplay" Label="TotalDisplay" DataType="DT_WSTR" Length="50" />
			
			<Column Name="customer.company" Label="CustomerCompany" DataType="DT_WSTR" Length="255" />
			<Column Name="customer.email" Label="CustomerEmail" DataType="DT_WSTR" Length="255" />
			<Column Name="customer.first" Label="CustomerFirst" DataType="DT_WSTR" Length="255" />
			<Column Name="customer.last" Label="CustomerLast" DataType="DT_WSTR" Length="255" />			
			<Column Name="customer.phone" Label="CustomerPhone" DataType="DT_WSTR" Length="255" />
			<Column Name="customer.subscribed" Label="CustomerSubscribed" DataType="DT_BOOL" />

			<Column Name="address.addressLine1" Label="AddressLine1" DataType="DT_WSTR" Length="255" />
			<Column Name="address.addressLine2" Label="AddressLine2" DataType="DT_WSTR" Length="255" />
			<Column Name="address.city" Label="AddressCity" DataType="DT_WSTR" Length="255" />
			<Column Name="address.country" Label="AddressCountry" DataType="DT_WSTR" Length="255" />
			<Column Name="address.display" Label="AddressDisplay" DataType="DT_WSTR" Length="255" />
			<Column Name="address.postalCode" Label="AddressPostalCode" DataType="DT_WSTR" Length="20" />
			<Column Name="address.regionCode" Label="AddressRegionCode" DataType="DT_WSTR" Length="20" />
			<Column Name="address.region" Label="AddressRegion" DataType="DT_WSTR" Length="20" />		
			<Column Name="address.regionDisplay" Label="AddressRegionDisplay" DataType="DT_WSTR" Length="20" />

			
			<Column Name="buyerReference" Label="BuyerReference" DataType="DT_WSTR" Length="50" />
			<Column Name="ipAddress" Label="IpAddress" DataType="DT_WSTR" Length="50" />
			<Column Name="completed" Label="Completed" DataType="DT_BOOL" />
			
			<Column Name="changed" Label="Changed" DataType="DT_I8" />
			<Column Name="changedValue" Label="ChangedValue" DataType="DT_I8" />
			<Column Name="changedInSeconds" Label="ChangedInSeconds" DataType="DT_I8" />
			<Column Name="changedDisplay" Label="ChangedDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="changedDisplayEmailEnhancements" Label="ChangedDisplayEmailEnhancements" DataType="DT_WSTR" Length="50" />
			<Column Name="changedDisplayEmailEnhancementsWithTime" Label="ChangedDisplayEmailEnhancementsWithTime" DataType="DT_WSTR" Length="50" />
			
			<Column Name="language" Label="Language" DataType="DT_WSTR" Length="10" />
			<Column Name="live" Label="Live" DataType="DT_BOOL" />
			<Column Name="payoutCurrency" Label="PayoutCurrency" DataType="DT_WSTR" Length="10" />
			<Column Name="quote" Label="QuoteId" DataType="DT_WSTR" Length="500" />
			<Column Name="invoiceUrl" Label="InvoiceUrl" DataType="DT_WSTR" Length="500" />
			<Column Name="siteId" Label="SiteId" DataType="DT_WSTR" Length="50" />
			<Column Name="account" Label="AccountId" DataType="DT_WSTR" Length="50" />
			
			<Column Name="total" Label="Total" DataType="DT_R8" />
			
			
			<Column Name="totalInPayoutCurrencyDisplay" Label="TotalInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="50" />
			
			<Column Name="tax" Label="Tax" DataType="DT_R8" />
			
			
			<Column Name="taxInPayoutCurrencyDisplay" Label="TaxInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="50" />
			
			<Column Name="subtotal" Label="Subtotal" DataType="DT_R8" />
						
			<Column Name="subtotalInPayoutCurrencyDisplay" Label="SubtotalInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="50" />
			
			<Column Name="discount" Label="Discount" DataType="DT_R8" />
			<Column Name="discountDisplay" Label="DiscountDisplay" DataType="DT_WSTR" Length="50" />
			
			<Column Name="discountInPayoutCurrencyDisplay" Label="DiscountInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="discountWithTax" Label="DiscountWithTax" DataType="DT_R8" />
			<Column Name="discountWithTaxDisplay" Label="DiscountWithTaxDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="discountWithTaxInPayoutCurrency" Label="DiscountWithTaxInPayoutCurrency" DataType="DT_R8" />
			<Column Name="discountWithTaxInPayoutCurrencyDisplay" Label="DiscountWithTaxInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="50" />
			
			<Column Name="billDescriptor" Label="BillDescriptor" DataType="DT_WSTR" Length="50" />
			
			<Column Name="payment.type" Label="PaymentType" DataType="DT_WSTR" Length="50" />
			<Column Name="payment.cardEnding" Label="PaymentCardEnding" DataType="DT_WSTR" Length="8" />
			<Column Name="payment.bank" Label="PaymentBank" DataType="DT_WSTR" Length="100" />
			<Column Name="paymentMethodType" Label="PaymentMethodType" DataType="DT_WSTR" Length="50" />
								
			<Column Name="recipients" Label="Recipients" DataType="DT_WSTR" Length="2000" />
			<Column Name="notes" Label="Notes" DataType="DT_WSTR" Length="4000" />

			<Column Name="acquisitionTransactionType" Label="AcquisitionTransactionType" DataType="DT_WSTR" Length="100" />
			<Column Name="taxExemptionData" Label="TaxExemptionData" DataType="DT_WSTR" Length="2000" />
			
			<Column Name="proratedCreditTotal" Label="ProratedCreditTotal" DataType="DT_R8" />
			<Column Name="proratedCreditTotalDisplay" Label="ProratedCreditTotalDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="proratedCreditTotalInPayoutCurrency" Label="ProratedCreditTotalInPayoutCurrency" DataType="DT_R8" />
			<Column Name="proratedCreditTotalInPayoutCurrencyDisplay" Label="ProratedCreditTotalInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="proratedDebitTotal" Label="ProratedDebitTotal" DataType="DT_R8" />
			<Column Name="proratedDebitTotalDisplay" Label="ProratedDebitTotalDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="proratedDebitTotalInPayoutCurrency" Label="ProratedDebitTotalInPayoutCurrency" DataType="DT_R8" />
			<Column Name="proratedDebitTotalInPayoutCurrencyDisplay" Label="ProratedDebitTotalInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="proratedTotal" Label="ProratedTotal" DataType="DT_R8" />
			<Column Name="proratedTotalDisplay" Label="ProratedTotalDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="proratedTotalInPayoutCurrencyDisplay" Label="ProratedTotalInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="50" />
			
			<Column Name="isScsProratedOrder" Label="IsScsProratedOrder" DataType="DT_BOOL" />
			<Column Name="isScsProratedOrderUpgrade" Label="IsScsProratedOrderUpgrade" DataType="DT_BOOL" />
			<Column Name="lastFourDigits" Label="LastFourDigits" DataType="DT_WSTR" Length="50" />
			
			<Column Name="previousOrderReference" Label="PreviousOrderReference" DataType="DT_WSTR" Length="50" />
			<Column Name="previousOrderInvoiceUrl" Label="PreviousOrderInvoiceUrl" DataType="DT_WSTR" Length="500" />
			
			<Column Name="returns" Label="ReturnId_1" DataType="DT_WSTR" Length="50" Desc="First return in this order" ValueTemplate="&lt;&lt;{$value$}|~|$.data[0].return,FUN_JSON_TO_TEXT&gt;&gt;" />
			<Column Name="returns" Label="ReturnAmount_1" DataType="DT_R8" Desc="First return amount in local currency for this order"  ValueTemplate="&lt;&lt;{$value$}|~|$.data[0].amount,FUN_JSON_TO_TEXT&gt;&gt;" />
			<Column Name="returns" Label="ReturnAmountUSD_1" DataType="DT_R8" Desc="First return amount in USD for this order" ValueTemplate="&lt;&lt;{$value$}|~|$.data[0].amountInPayoutCurrency,FUN_JSON_TO_TEXT&gt;&gt;" />
			
			<Column Name="items" Label="SubscriptionId_1" DataType="DT_WSTR" Length="50" Desc="First subscription in this order" ValueTemplate="&lt;&lt;{$value$}|~|$.data[0].subscription,FUN_JSON_TO_TEXT&gt;&gt;" />
			<Column Name="items" Label="SubscriptionId_2" DataType="DT_WSTR" Length="50" Desc="Second subscription in this order" ValueTemplate="&lt;&lt;{$value$}|~|$.data[1].subscription,FUN_JSON_TO_TEXT&gt;&gt;" />
			<Column Name="items" Label="SubscriptionId_3" DataType="DT_WSTR" Length="50" Desc="Third subscription in this order" ValueTemplate="&lt;&lt;{$value$}|~|$.data[2].subscription,FUN_JSON_TO_TEXT&gt;&gt;" />
			<Column Name="orders" Label="Tags" DataType="DT_WSTR" Length="4000" Desc="" ValueTemplate="&lt;&lt;{$value$}|~|\&quot;tags\&quot;\s*\:\s*(\{[^}]+(.*)\}){{0,1}},FUN_REGEX_EXTRACT&gt;&gt;" />
			
		</OutputColumns>
	</EndPoint>
	 
	<EndPoint Name="order_items_output" IncludeParentColumns="True">
		<OutputColumns>
			<Column Name="P_orders_id" Label="OrderId" DataType="DT_WSTR" Length="100" />

			<Column Name="product" Label="ProductId" DataType="DT_WSTR" Length="255" />
			<Column Name="quantity" Label="Quantity" DataType="DT_I8" />
			<Column Name="display" Label="Display" DataType="DT_WSTR" Length="4000" />
			<Column Name="sku" Label="Sku" DataType="DT_WSTR" Length="255" />
			<Column Name="shortDisplay" Label="ShortDisplay" DataType="DT_WSTR" Length="1000" />
			<Column Name="subscription" Label="SubscriptionId" DataType="DT_WSTR" Length="88" />
			<Column Name="imageUrl" Label="ImageUrl" DataType="DT_WSTR" Length="1000" />
			<Column Name="subtotalDisplay" Label="SubtotalDisplay" DataType="DT_WSTR" Length="52" />
			<Column Name="subtotal" Label="Subtotal" DataType="DT_R8" />			
			<Column Name="subtotalInPayoutCurrency" Label="SubtotalInPayoutCurrency" DataType="DT_R8" />
			<Column Name="subtotalInPayoutCurrencyDisplay" Label="SubtotalInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="48" />
			<Column Name="attributes.pathFrom" Label="AttributesPathFrom" DataType="DT_WSTR" Length="60" />
			<Column Name="attributes.pathTo" Label="AttributesPathTo" DataType="DT_WSTR" Length="60" />
			<Column Name="attributes.quantityFrom" Label="AttributesQuantityFrom" DataType="DT_I8" />
			<Column Name="attributes.quantityTo" Label="AttributesQuantityTo" DataType="DT_I8" />
			<Column Name="attributes.display" Label="AttributesDisplay" DataType="DT_WSTR" Length="2048" />
			<Column Name="attributes.totalChange" Label="AttributesTotalChange" DataType="DT_R8" />
			<Column Name="attributes.totalProratedCharge" Label="AttributesTotalProratedCharge" DataType="DT_R8" />
			<Column Name="attributes.totalProratedCredit" Label="AttributesTotalProratedCredit" DataType="DT_R8" />
			<Column Name="attributes.totalNetCharge" Label="AttributesTotalNetCharge" DataType="DT_R8" />
			<Column Name="attributes.previousCharge" Label="AttributesPreviousCharge" DataType="DT_R8" />
			<Column Name="attributes.upcomingCharge" Label="AttributesUpcomingCharge" DataType="DT_R8" />
			<Column Name="attributes.utilizedPrevious" Label="AttributesUtilizedPrevious" DataType="DT_R8" />
			<Column Name="attributes.lapsedPrevious" Label="AttributesLapsedPrevious" DataType="DT_R8" />
			<Column Name="discount" Label="Discount" DataType="DT_R8" />
			<Column Name="discountDisplay" Label="DiscountDisplay" DataType="DT_WSTR" Length="36" />
			<Column Name="discountInPayoutCurrency" Label="DiscountInPayoutCurrency" DataType="DT_R8" />
			<Column Name="discountInPayoutCurrencyDisplay" Label="DiscountInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="36" />
			<Column Name="isSubscription" Label="IsSubscription" DataType="DT_BOOL" />
			<Column Name="changeQuantity" Label="ChangeQuantity" DataType="DT_BOOL" />
			
			<Column Name="withholdings.taxWithholdings" Label="WithholdingsTaxWithholdings" DataType="DT_BOOL" />
			<Column Name="proratedItemChangeAmount" Label="ProratedItemChangeAmount" DataType="DT_R8" />
			<Column Name="proratedItemChangeAmountDisplay" Label="ProratedItemChangeAmountDisplay" DataType="DT_WSTR" Length="28" />
			<Column Name="proratedItemChangeAmountInPayoutCurrency" Label="ProratedItemChangeAmountInPayoutCurrency" DataType="DT_R8" />
			<Column Name="proratedItemChangeAmountInPayoutCurrencyDisplay" Label="ProratedItemChangeAmountInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="32" />
			<Column Name="proratedItemProratedCharge" Label="ProratedItemProratedCharge" DataType="DT_R8" />
			<Column Name="proratedItemProratedChargeDisplay" Label="ProratedItemProratedChargeDisplay" DataType="DT_WSTR" Length="36" />
			<Column Name="proratedItemProratedChargeInPayoutCurrency" Label="ProratedItemProratedChargeInPayoutCurrency" DataType="DT_R8" />
			<Column Name="proratedItemProratedChargeInPayoutCurrencyDisplay" Label="ProratedItemProratedChargeInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="36" />
			<Column Name="proratedItemCreditAmount" Label="ProratedItemCreditAmount" DataType="DT_R8" />
			<Column Name="proratedItemCreditAmountDisplay" Label="ProratedItemCreditAmountDisplay" DataType="DT_WSTR" Length="36" />
			<Column Name="proratedItemCreditAmountInPayoutCurrency" Label="ProratedItemCreditAmountInPayoutCurrency" DataType="DT_R8" />
			<Column Name="proratedItemCreditAmountInPayoutCurrencyDisplay" Label="ProratedItemCreditAmountInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="36" />
			<Column Name="proratedItemTaxAmount" Label="ProratedItemTaxAmount" DataType="DT_R8" />
			<Column Name="proratedItemTaxAmountDisplay" Label="ProratedItemTaxAmountDisplay" DataType="DT_WSTR" Length="24" />
			<Column Name="proratedItemTaxAmountInPayoutCurrency" Label="ProratedItemTaxAmountInPayoutCurrency" DataType="DT_R8" />
			<Column Name="proratedItemTaxAmountInPayoutCurrencyDisplay" Label="ProratedItemTaxAmountInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="32" />
			<Column Name="proratedItemTotal" Label="ProratedItemTotal" DataType="DT_R8" />
			<Column Name="proratedItemTotalDisplay" Label="ProratedItemTotalDisplay" DataType="DT_WSTR" Length="28" />
			<Column Name="proratedItemTotalInPayoutCurrency" Label="ProratedItemTotalInPayoutCurrency" DataType="DT_R8" />
			<Column Name="proratedItemTotalInPayoutCurrencyDisplay" Label="ProratedItemTotalInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="32" />
			<Column Name="attributes.migratedProductId" Label="AttributesMigratedProductId" DataType="DT_WSTR" Length="88" />
			<Column Name="attributes.classicProduct" Label="AttributesClassicProduct" DataType="DT_WSTR" Length="1068" />
			<Column Name="isAddon" Label="IsAddon" DataType="DT_BOOL" />		
			
			<Column Name="P_orders_reference" Label="Reference" DataType="DT_WSTR" Length="100" />
			<Column Name="P_orders_buyerReference" Label="BuyerReference" DataType="DT_WSTR" Length="100" />
			<Column Name="P_orders_ipAddress" Label="IpAddress" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_completed" Label="Completed" DataType="DT_BOOL" />
			<Column Name="P_orders_changed" Label="Changed" DataType="DT_I8" />
			<Column Name="P_orders_changedValue" Label="ChangedValue" DataType="DT_I8" />
			<Column Name="P_orders_changedInSeconds" Label="ChangedInSeconds" DataType="DT_I8" />
			<Column Name="P_orders_changedDisplay" Label="ChangedDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_changedDisplayISO8601" Label="OrderDate" DataType="DT_DBDATE"  />

			<Column Name="P_orders_changedDisplayEmailEnhancements" Label="ChangedDisplayEmailEnhancements" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_changedDisplayEmailEnhancementsWithTime" Label="ChangedDisplayEmailEnhancementsWithTime" DataType="DT_WSTR" Length="96" />
			<Column Name="P_orders_language" Label="Language" DataType="DT_WSTR" Length="8" />
			<Column Name="P_orders_live" Label="Live" DataType="DT_BOOL" />
			<Column Name="P_orders_currency" Label="Currency" DataType="DT_WSTR" Length="12" />
			<Column Name="P_orders_payoutCurrency" Label="PayoutCurrency" DataType="DT_WSTR" Length="12" />
			<Column Name="P_orders_quote" Label="QuoteId" DataType="DT_WSTR" Length="1020" />
			<Column Name="P_orders_invoiceUrl" Label="InvoiceUrl" DataType="DT_WSTR" Length="440" />
			<Column Name="P_orders_siteId" Label="SiteId" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_account" Label="AccountId" DataType="DT_WSTR" Length="88" />
			<Column Name="P_orders_total" Label="Total" DataType="DT_R8" />
			<Column Name="P_orders_totalDisplay" Label="TotalDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_totalInPayoutCurrency" Label="TotalInPayoutCurrency" DataType="DT_R8" />
			<Column Name="P_orders_totalInPayoutCurrencyDisplay" Label="TotalInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_tax" Label="Tax" DataType="DT_R8" />
			<Column Name="P_orders_taxDisplay" Label="TaxDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_taxInPayoutCurrency" Label="TaxInPayoutCurrency" DataType="DT_R8" />
			<Column Name="P_orders_taxInPayoutCurrencyDisplay" Label="TaxInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_subtotal" Label="OrderSubtotal" DataType="DT_R8" />
			<Column Name="P_orders_subtotalDisplay" Label="OrderSubtotalDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_subtotalInPayoutCurrency" Label="OrderSubtotalInPayoutCurrency" DataType="DT_R8" />
			<Column Name="P_orders_subtotalInPayoutCurrencyDisplay" Label="OrderSubtotalInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_discount" Label="OrderDiscount" DataType="DT_R8" />
			<Column Name="P_orders_discountDisplay" Label="OrderDiscountDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_discountInPayoutCurrency" Label="OrderDiscountInPayoutCurrency" DataType="DT_R8" />
			<Column Name="P_orders_discountInPayoutCurrencyDisplay" Label="OrderDiscountInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_discountWithTax" Label="OrderDiscountWithTax" DataType="DT_R8" />
			<Column Name="P_orders_discountWithTaxDisplay" Label="OrderDiscountWithTaxDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_discountWithTaxInPayoutCurrency" Label="OrderDiscountWithTaxInPayoutCurrency" DataType="DT_R8" />
			<Column Name="P_orders_discountWithTaxInPayoutCurrencyDisplay" Label="OrderDiscountWithTaxInPayoutCurrencyDisplay" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_billDescriptor" Label="BillDescriptor" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_payment_type" Label="PaymentType" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_payment_cardEnding" Label="PaymentCardEnding" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_customer_first" Label="CustomerFirst" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_customer_last" Label="CustomerLast" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_customer_email" Label="CustomerEmail" DataType="DT_WSTR" Length="255" />
			<Column Name="P_orders_customer_company" Label="CustomerCompany" DataType="DT_WSTR" Length="255" />
			<Column Name="P_orders_customer_phone" Label="CustomerPhone" DataType="DT_WSTR" Length="100" />
			<Column Name="P_orders_customer_subscribed" Label="CustomerSubscribed" DataType="DT_BOOL" />
			<Column Name="P_orders_address_city" Label="AddressCity" DataType="DT_WSTR" Length="255" />
			<Column Name="P_orders_address_regionCode" Label="AddressRegionCode" DataType="DT_WSTR" Length="10" />
			<Column Name="P_orders_address_regionDisplay" Label="AddressRegionDisplay" DataType="DT_WSTR" Length="255" />
			<Column Name="P_orders_address_region" Label="AddressRegion" DataType="DT_WSTR" Length="50" />
			<Column Name="P_orders_address_postalCode" Label="AddressPostalCode" DataType="DT_WSTR" Length="20" />
			<Column Name="P_orders_address_country" Label="AddressCountry" DataType="DT_WSTR" Length="255" />
			<Column Name="P_orders_address_display" Label="AddressDisplay" DataType="DT_WSTR" Length="128" />			
			
		</OutputColumns>
	</EndPoint> 
	 
	<EndPoint Name="error_output">
        <Params>
		  <Param Name="ContineOnErrorForStatusCode" Value="True" Type="Property" />		
		  <Param Name="ErrorStatusCodeToMatchRegex" Value="400" Type="Property" Desc="Pipe delimited status codes e.g. 400|403"/>			
		  <Param Name="ConsumeResponseOnError" Value="True" Type="Property" />			
		  
        </Params>	 		
		<OutputColumns>
			<Column Name="result" Label="Result" DataType="DT_WSTR" Length="100" />
			<Column Name="action" Label="ResultAction" DataType="DT_WSTR" Length="100"  />
			<Column Name="errors" Label="ResultErrors" DataType="DT_WSTR" Length="4000" 
			  ValueTemplate="&lt;&lt;{$value$}|~|$.data[*],FUN_JSON_TO_TEXT&gt;&gt;" />
			<Column Name="action" Label="ResultMessage" DataType="DT_WSTR" Length="4000"  
			  ValueTemplate="&lt;&lt;product=[$parent.error.product$] &#xA; display=[$parent.error.display$] &#xA; summary=[$parent.error.description.summary.en$] &#xA; description=[$parent.error.description.full.en$] &#xA; action=[$parent.error.description.action.en$] &#xA; format=[$parent.error.format$] &#xA; sku=[$parent.error.sku$] &#xA; taxcode=[$parent.error.taxcode$] &#xA; image=[$parent.error.image$] &#xA; pricingrenew=[$parent.error.pricing.renew$] &#xA; pricinginterval=[$parent.error.pricing.interval$] &#xA; pricingintervalLength=[$parent.error.intervalLength$] &#xA; pricingintervalCount=[$parent.error.pricing.intervalCount$] &#xA; pricingquantityBehavior=[$parent.error.pricing.quantityBehavior$] &#xA; pricingquantityDefault=[$parent.error.pricing.quantityDefault$] &#xA; pricingtrial=[$parent.error.pricing.trial$] &#xA; pricingpaymentCollected=[$parent.error.pricing.paymentCollected$] &#xA; pricingtrialPrice=[$parent.error.trialPrice$] &#xA; pricingprice=[$parent.error.pricing.price$] &#xA; cancellationinterval=[$parent.error.pricing.cancellation.interval$] &#xA; cancellationintervalLength=[$parent.error.pricing.cancellation.intervalLength$] &#xA; attributes=[$parent.error.attributes$] &#xA; fulfillments=[$parent.error.fulfillments$] &#xA; priceUSD=[$parent.error.pricing.USD$] |~|\w+=\s+|~|,FUN_REGEX_REPLACE&gt;&gt; " />
		</OutputColumns>
	</EndPoint>	
	
	<EndPoint Name="product_input" Method="POST" DotAsPath="True" JsonRowFormat="Multicontent" ContentType="ApplicationJson" Url="/products" Filter="$.products[*]" Body="{$rows$}" BatchSize="100">
		<InputColumns>
			<Column Name="products[].product" Label="Id" DataType="DT_WSTR" Length="255" Key="True" />
			<Column Name="products[].display" Label="Display" DataType="DT_WSTR" Length="4000" />			
			<Column Name="products[].description.summary.en" Label="Summary" DataType="DT_WSTR" Length="4000" />						
			<Column Name="products[].description.full.en" Label="Description" DataType="DT_WSTR" Length="4000" />						
			<Column Name="products[].description.action.en" Label="Action" DataType="DT_WSTR" Length="1000" />						
			<Column Name="products[].format" Label="Format" DataType="DT_WSTR" Length="50" Example="digital OR physical OR digital-and-physical"/>		
			<Column Name="products[].sku" Label="Sku" DataType="DT_WSTR" Length="255" />					
			<Column Name="products[].taxcode" Label="TaxCode" DataType="DT_WSTR" Length="50" />
			<Column Name="products[].image" Label="Image" DataType="DT_WSTR" Length="500" />
		
			<Column Name="products[].pricing.renew" Label="Renew" DataType="DT_WSTR" Length="10" />			
			<Column Name="products[].pricing.interval" Label="Interval" DataType="DT_WSTR" Length="10" />
			<Column Name="products[].pricing.intervalLength" Label="IntervalLength" DataType="DT_I8" />
			<Column Name="products[].pricing.intervalCount" Label="IntervalCount" DataType="DT_I4" />
			<Column Name="products[].pricing.quantityBehavior" Label="QuantityBehavior" DataType="DT_WSTR" Length="10" Example="allow Or lock Or hide"/>
			<Column Name="products[].pricing.quantityDefault" Label="QuantityDefault" DataType="DT_I8" />
			
			<Column Name="products[].pricing.price.USD" Label="PriceUSD" DataType="DT_R8" />
			<Column Name="products[].pricing.price.EUR" Label="PriceEUR" DataType="DT_R8" />
			<Column Name="products[].pricing.price.GBP" Label="PriceGBP" DataType="DT_R8" />
			<Column Name="products[].pricing.price.CAD" Label="PriceCAD" DataType="DT_R8" />
			<Column Name="products[].pricing.price.NZD" Label="PriceNZD" DataType="DT_R8" />
			<Column Name="products[].pricing.price.CHF" Label="PriceCHF" DataType="DT_R8" />
			<Column Name="products[].pricing.price.SEK" Label="PriceSEK" DataType="DT_R8" />
			<Column Name="products[].pricing.price.CZK" Label="PriceCZK" DataType="DT_R8" />
			<Column Name="products[].pricing.price.DKK" Label="PriceDKK" DataType="DT_R8" />
			<Column Name="products[].pricing.price.PLN" Label="PricePLN" DataType="DT_R8" />
			<Column Name="products[].pricing.price.SGD" Label="PriceSGD" DataType="DT_R8" />
			<Column Name="products[].pricing.price.JPY" Label="PriceJPY" DataType="DT_R8" />
			<Column Name="products[].pricing.price.CNY" Label="PriceCNY" DataType="DT_R8" />
			<Column Name="products[].pricing.price.HKD" Label="PriceHKD" DataType="DT_R8" />
			<Column Name="products[].pricing.price.INR" Label="PriceINR" DataType="DT_R8" />
			<Column Name="products[].pricing.price.BRL" Label="PriceBRL" DataType="DT_R8" />
			<Column Name="products[].pricing.price.AUD" Label="PriceAUD" DataType="DT_R8" />
			
			<Column Name="products[].pricing.trial" Label="Trial" DataType="DT_I4"  />
			<Column Name="products[].pricing.paymentCollected" Label="PaymentCollected" DataType="DT_BOOL"  />
			<Column Name="products[].pricing.paidTrial" Label="PaidTrial" DataType="DT_BOOL"  />			
			<Column Name="products[].fulfillment.instructions.en" Label="FulfillmentInstructions" DataType="DT_WSTR" Length="4000"  />			
			
			<Column Name="products[].pricing.dateLimitsEnabled" Label="DateLimitsEnabled" DataType="DT_BOOL" />
			<Column Name="products[].pricing.cancellation.interval" Label="CancellationInterval" DataType="DT_WSTR" Length="4" />
			<Column Name="products[].pricing.cancellation.intervalLength" Label="CancellationIntervalLength" DataType="DT_I8" />
		    <Column Name="products[].pricing.setupFee.title" Label="SetupFeeTitle" DataType="DT_WSTR" Length="500" />
			<Column Name="products[].pricing.setupFee.price.USD" Label="SetupFeePriceUSD" DataType="DT_R8" />
			<Column Name="products[].pricing.setupFee.price.EUR" Label="SetupFeePriceEUR" DataType="DT_R8" />
			<Column Name="products[].pricing.setupFee.price.GBP" Label="SetupFeePriceGBP" DataType="DT_R8" />
			
			<Column Name="products[].pricing.trialPrice.USD" Label="TrialPriceUSD" DataType="DT_R8" />
			<Column Name="products[].pricing.trialPrice.EUR" Label="TrialPriceEUR" DataType="DT_R8" />
			<Column Name="products[].pricing.trialPrice.GBP" Label="TrialPriceGBP" DataType="DT_R8" />			
			
			<Column Name="products[].badge" Label="Badge" DataType="DT_WSTR" Length="50" />
			<Column Name="products[].rank" Label="Rank" DataType="DT_I4" />
			
			<Column Name="products[].parent" Label="Parent" DataType="DT_WSTR" Length="255" />
			<Column Name="products[].attributes" Label="Attributes" DataType="DT_WSTR" Length="4000" Raw="True" />
			<Column Name="products[].fulfillments" Label="Fulfillments" DataType="DT_WSTR" Length="4000" Raw="True" />
			
		</InputColumns>
	</EndPoint>

	<EndPoint Name="product_output">
		<OutputColumns>
			<Column Name="product" Label="Id" DataType="DT_WSTR" Length="255" />
			<Column Name="display.en" Label="Display" DataType="DT_WSTR" Length="1000" />
			<Column Name="description.summary.en" Label="Summary" DataType="DT_WSTR" Length="1000" />			
			<Column Name="description.full.en" Label="Description" DataType="DT_WSTR" Length="4000" />			
			<Column Name="description.action.en" Label="Action" DataType="DT_WSTR" Length="4000" />			
			<Column Name="image" Label="Image" DataType="DT_WSTR" Length="500" />
			<Column Name="format" Label="Format" DataType="DT_WSTR" Length="50" />
			<Column Name="sku" Label="Sku" DataType="DT_WSTR" Length="255" />			
			<Column Name="pricing.renew" Label="Renew" DataType="DT_WSTR" Length="10" />			
			<Column Name="pricing.interval" Label="Interval" DataType="DT_WSTR" Length="10" />
			<Column Name="pricing.intervalLength" Label="IntervalLength" DataType="DT_I8" />
			<Column Name="pricing.intervalCount" Label="IntervalCount" DataType="DT_I4" />
			<Column Name="pricing.quantityBehavior" Label="QuantityBehavior" DataType="DT_WSTR" Length="10" />
			<Column Name="pricing.quantityDefault" Label="QuantityDefault" DataType="DT_I8" />

			<Column Name="pricing.price.USD" Label="PriceUSD" DataType="DT_R8" />
			<Column Name="pricing.price.EUR" Label="PriceEUR" DataType="DT_R8" />
			<Column Name="pricing.price.GBP" Label="PriceGBP" DataType="DT_R8" />
			<Column Name="pricing.price.CAD" Label="PriceCAD" DataType="DT_R8" />
			<Column Name="pricing.price.NZD" Label="PriceNZD" DataType="DT_R8" />
			<Column Name="pricing.price.CHF" Label="PriceCHF" DataType="DT_R8" />
			<Column Name="pricing.price.SEK" Label="PriceSEK" DataType="DT_R8" />
			<Column Name="pricing.price.CZK" Label="PriceCZK" DataType="DT_R8" />
			<Column Name="pricing.price.DKK" Label="PriceDKK" DataType="DT_R8" />
			<Column Name="pricing.price.PLN" Label="PricePLN" DataType="DT_R8" />
			<Column Name="pricing.price.SGD" Label="PriceSGD" DataType="DT_R8" />
			<Column Name="pricing.price.JPY" Label="PriceJPY" DataType="DT_R8" />
			<Column Name="pricing.price.CNY" Label="PriceCNY" DataType="DT_R8" />
			<Column Name="pricing.price.HKD" Label="PriceHKD" DataType="DT_R8" />
			<Column Name="pricing.price.INR" Label="PriceINR" DataType="DT_R8" />
			<Column Name="pricing.price.BRL" Label="PriceBRL" DataType="DT_R8" />
			<Column Name="pricing.price.AUD" Label="PriceAUD" DataType="DT_R8" />

			<Column Name="pricing.trial" Label="Trial" DataType="DT_I4"  />
			<Column Name="pricing.paymentCollected" Label="PaymentCollected" DataType="DT_BOOL"  />
			<Column Name="pricing.paidTrial" Label="PaidTrial" DataType="DT_BOOL"  />
			<Column Name="fulfillments.instructions.en" Label="FulfillmentInstructions" DataType="DT_WSTR" Length="4000"  />			
			
			<Column Name="badge.en" Label="Badge" DataType="DT_WSTR" Length="50" />
			<Column Name="rank" Label="Rank" DataType="DT_I4" />

			<Column Name="pricing.dateLimitsEnabled" Label="DateLimitsEnabled" DataType="DT_BOOL" />
			<Column Name="pricing.cancellation.interval" Label="CancellationInterval" DataType="DT_WSTR" Length="4" />
			<Column Name="pricing.cancellation.intervalLength" Label="CancellationIntervalLength" DataType="DT_I8" />
			
			<Column Name="taxcode" Label="TaxCode" DataType="DT_WSTR" Length="50" />
			<Column Name="taxcodeDescription" Label="TaxCodeDescription" DataType="DT_WSTR" Length="500" />
			<Column Name="visibility" Label="Visibility" DataType="DT_WSTR" Length="255" />
			<Column Name="productAppReference" Label="ProductAppReference" DataType="DT_WSTR" Length="255" />			
			<Column Name="parent" Label="Parent" DataType="DT_WSTR" Length="255" />
			<Column Name="attributes.migratedProductId" Label="MigratedProductId" DataType="DT_WSTR" Length="50" />
			<Column Name="attributes.classicProduct" Label="ClassicProduct" DataType="DT_WSTR" Length="4000" />
			
		    <Column Name="pricing.setupFee.title" Label="SetupFeeTitle" DataType="DT_WSTR" Length="500" />
			<Column Name="pricing.setupFee.price.USD" Label="SetupFeePriceUSD" DataType="DT_R8" />
			<Column Name="pricing.setupFee.price.EUR" Label="SetupFeePriceEUR" DataType="DT_R8" />
			<Column Name="pricing.setupFee.price.GBP" Label="SetupFeePriceGBP" DataType="DT_R8" />
			
			<Column Name="pricing.trialPrice.USD" Label="TrialPriceUSD" DataType="DT_R8" />
			<Column Name="pricing.trialPrice.EUR" Label="TrialPriceEUR" DataType="DT_R8" />
			<Column Name="pricing.trialPrice.GBP" Label="TrialPriceGBP" DataType="DT_R8" />

			
		</OutputColumns>	
	
	</EndPoint>
	
  </Template>
  
  <EndPoints>
	 <EndPoint Name="get_product_ids" Label="Get Product IDs" Desc="" Url="/products" Filter="$.products[*]">
	    <OutputColumns>
			<Column Name="products" Label="Id" DataType="DT_WSTR" Length="255" />
		</OutputColumns>
	 </EndPoint>
	 
	 <EndPoint Name="get_products" Label="Get Products" Desc="" Url="/products" Filter="$.products[*]" Template="product_output">
		<EndPoint Name="child_get_product" Url="/products/[$parent.products$]" Filter="$.products[*]">
		</EndPoint>	 
	 </EndPoint>	 
	 
	 <EndPoint Name="get_products_visibility" Label="Get Products Publish Status" Desc="" Url="/products" Filter="$.products[*]" OutputHeaders="StatusCode">
		<EndPoint Name="child_get_product_page" Url="[$WebStoreUrl$]/[$parent.products$]" OutputHeaders="StatusCode">
			<Params>
			  <Param Name="RawOutputDataRowTemplate" Value="{}" ValueTemplate="{Status:'Done'}" Type="Property" />
			  <Param Name="EnableRawOutputModeSingleRow" Value="True"  Type="Property" />
			  <Param Name="ContineOnErrorForStatusCode" Value="True" Type="Property" />		
			  <Param Name="ErrorStatusCodeToMatchRegex" Value="404|405" Type="Property" />						
			</Params>		
		</EndPoint>	

		<OutputColumns>
			<Column Name="p1_products" Label="Id" DataType="DT_WSTR" />	
			<Column Name="ResponseHeaders_StatusCode" Label="StatusCode" DataType="DT_I4" />	
		</OutputColumns>

	 </EndPoint>
	 
	 <EndPoint Name="get_product" Label="Get Product" Desc="" Url="/products/[$Id$]" Filter="$.products[*]" Template="product_output">
      <Params>
		<Param Name="Id" Label="Product Id" IsKey="True" />
      </Params>	 
	 </EndPoint>
	 
	 <EndPoint Name="post_product" Label="Create Product" Desc="" Template="product_input,product_output,error_output" >
	 </EndPoint>
	 
	 <EndPoint Name="put_product" Label="Update Product" Desc="" Template="product_input,product_output,error_output" >
	 </EndPoint>	 

	<EndPoint Name="get_product_prices" Label="Get Product Prices" Desc="" Url="/products/price" Filter="$.products[*].pricing"
		Template="pagination">
      <Params>
		<Param Name="Country" Key="country" Label="Country Code" Type="Query" />
		<Param Name="Currency" Key="currency" Label="Currency Code" Type="Query" />
        <Param Name="EnablePivot" Type="Property" Value="True" />
	  </Params>
      <OutputColumns>
        <Column Name="P_products_product" Label="Product" DataType="DT_WSTR" Length="200" />
        <Column Name="Pivot_Name" Label="Country" DataType="DT_WSTR" Length="8" />
        <Column Name="Pivot_Value.currency" Label="Currency" DataType="DT_WSTR" Length="12" />
        <Column Name="Pivot_Value.price" Label="Price" DataType="DT_R8" />
        <Column Name="Pivot_Value.display" Label="PriceDisplay" DataType="DT_WSTR" Length="50" />
        <Column Name="Pivot_Value.quantityDiscount.2.discountPercent" Label="Discount2DiscountPercent" DataType="DT_R8" />
        <Column Name="Pivot_Value.quantityDiscount.2.discountValue" Label="Discount2DiscountValue" DataType="DT_R8" />
        <Column Name="Pivot_Value.quantityDiscount.2.discountValueDisplay" Label="Discount2DiscountValueDisplay" DataType="DT_WSTR" Length="50" />
        <Column Name="Pivot_Value.quantityDiscount.2.unitPrice" Label="Discount2UnitPrice" DataType="DT_R8" />
        <Column Name="Pivot_Value.quantityDiscount.2.unitPriceDisplay" Label="Discount2UnitPriceDisplay" DataType="DT_WSTR" Length="50" />
        <Column Name="Pivot_Value.quantityDiscount.3.discountPercent" Label="Discount3DiscountPercent" DataType="DT_R8" />
        <Column Name="Pivot_Value.quantityDiscount.3.discountValue" Label="Discount3DiscountValue" DataType="DT_R8" />
        <Column Name="Pivot_Value.quantityDiscount.3.discountValueDisplay" Label="Discount3DiscountValueDisplay" DataType="DT_WSTR" Length="50" />
        <Column Name="Pivot_Value.quantityDiscount.3.unitPrice" Label="Discount3UnitPrice" DataType="DT_R8" />
        <Column Name="Pivot_Value.quantityDiscount.3.unitPriceDisplay" Label="Discount3UnitPriceDisplay" DataType="DT_WSTR" Length="50" />
        <Column Name="Pivot_Value.quantityDiscount.4.discountPercent" Label="Discount4DiscountPercent" DataType="DT_R8" />
        <Column Name="Pivot_Value.quantityDiscount.4.discountValue" Label="Discount4DiscountValue" DataType="DT_R8" />
        <Column Name="Pivot_Value.quantityDiscount.4.discountValueDisplay" Label="Discount4DiscountValueDisplay" DataType="DT_WSTR" Length="50" />
        <Column Name="Pivot_Value.quantityDiscount.4.unitPrice" Label="Discount4UnitPrice" DataType="DT_R8" />
        <Column Name="Pivot_Value.quantityDiscount.4.unitPriceDisplay" Label="Discount4UnitPriceDisplay" DataType="DT_WSTR" Length="50" />
        <Column Name="Pivot_Value.quantityDiscount.5.discountPercent" Label="Discount5DiscountPercent" DataType="DT_R8" />
        <Column Name="Pivot_Value.quantityDiscount.5.discountValue" Label="Discount5DiscountValue" DataType="DT_R8" />
        <Column Name="Pivot_Value.quantityDiscount.5.discountValueDisplay" Label="Discount5DiscountValueDisplay" DataType="DT_WSTR" Length="50" />
        <Column Name="Pivot_Value.quantityDiscount.5.unitPrice" Label="Discount5UnitPrice" DataType="DT_R8" />
        <Column Name="Pivot_Value.quantityDiscount.5.unitPriceDisplay" Label="Discount5UnitPriceDisplay" DataType="DT_WSTR" Length="50" />
		
        <Column Name="Pivot_Value.discountReason.en" Label="DiscountReason" DataType="DT_WSTR" Length="64" />
        <Column Name="Pivot_Value.discountPeriodCount" Label="DiscountPeriodCount" DataType="DT_WSTR" />
        <Column Name="Pivot_Value.available.start" Label="AvailableStart" DataType="DT_DBDATE"  />
        <Column Name="Pivot_Value.available.end" Label="AvailableEnd" DataType="DT_DBDATE"  />
        <Column Name="Pivot_Value.setupFeePrice" Label="SetupFeePrice" DataType="DT_R8" />
        <Column Name="Pivot_Value.setupFeePriceDisplay" Label="SetupFeePriceDisplay" DataType="DT_WSTR" Length="50" />
        <Column Name="Pivot_Value.setupFeeReason.en" Label="SetupFeeReason" DataType="DT_WSTR" Length="100" />
      </OutputColumns>
	  	  
    </EndPoint>	
		 
	 
    <EndPoint Name="get_order_items" Label="Get Order Items" Desc="" Url="/orders" Filter="$.orders[*].items[*]"
		Template="pagination, order_params, order_items_output"  >
    </EndPoint>
    <EndPoint Name="get_order_item" Label="Get Order Items by OrderId" Desc="" Url="/orders/[$OrderId$]" Filter="$.orders[*].items[*]"
		Template="order_items_output" >
      <Params>
		<Param Name="OrderId" Label="Order Id" IsKey="True" />
      </Params>
    </EndPoint>	
	
    <EndPoint Name="get_orders" Label="Get Orders" Desc="" Url="/orders" Filter="$.orders[*]"
		Template="pagination, order_output, order_params">
    </EndPoint>
	<EndPoint Name="get_order" Label="Get Order by Id" Desc="" Url="/orders/[$Id$]" Filter=""
		Template="order_output">
      <Params>
		<Param Name="Id" Label="Order Id" IsKey="True" />
      </Params>
    </EndPoint>

	<!-- returns account ids  if no search param passed else returns account objects-->
    <EndPoint Name="get_accounts" Label="Get Accounts" Desc="" Url="/accounts" Filter="$.accounts[*]"
		Template="pagination, account_output, account_params">
		<EndPoint Name="child_get_product" Url="/accounts/&lt;&lt;[$parent.account$]|~|StartsWith|~|[|~|[$parent.accounts$]|~|[$parent.account$],FUN_IF&gt;&gt;" Filter="$.accounts[*]">
			<Params>
				<Param Name="ContineOnErrorForStatusCode" Type="Property" Value="True" />
				<Param Name="ErrorStatusCodeToMatch" Type="Property" Value="400" />					
			</Params>		
		</EndPoint>		
    </EndPoint>

	<!-- returns account ids  if no search param passed else returns account objects-->
    <EndPoint Name="get_account_orders" Label="Get Account Orders" Desc="" Url="/accounts" Filter="$.accounts[*]"
		Template="pagination, order_output, account_params">
		<EndPoint Name="child_get_account" Url="/accounts/&lt;&lt;[$parent.account$]|~|StartsWith|~|[|~|[$parent.accounts$]|~|[$parent.account$],FUN_IF&gt;&gt;" Filter="$.accounts[*].orders[*]">
			<Params>
				<Param Name="ContineOnErrorForStatusCode" Type="Property" Value="True" />
				<Param Name="ErrorStatusCodeToMatch" Type="Property" Value="400" />					
			</Params>		
			<EndPoint Name="child_get_order" Url="/orders/[$parent.orders$]" Filter="$.orders[*]">
				<Params>
					<Param Name="ContineOnErrorForStatusCode" Type="Property" Value="True" />
					<Param Name="ErrorStatusCodeToMatch" Type="Property" Value="400" />					
				</Params>		
			</EndPoint>			
		</EndPoint>	
    </EndPoint>
	
    <EndPoint Name="get_account_charges" Label="Get Account Charges" Desc="" Url="/accounts" Filter="$.accounts[*]"
		Template="pagination, charge_output, account_params" >
		<EndPoint Name="child_get_account_charges" IncludeParentColumns="True" Url="/accounts/&lt;&lt;[$parent.account$]|~|StartsWith|~|[|~|[$parent.accounts$]|~|[$parent.account$],FUN_IF&gt;&gt;" Filter="$.accounts[*].charges[*]">
			<Params>
				<Param Name="ContineOnErrorForStatusCode" Type="Property" Value="True" />
				<Param Name="ErrorStatusCodeToMatch" Type="Property" Value="400" />					
			</Params>			
		</EndPoint>				
    </EndPoint>
	
    <EndPoint Name="get_account_orders_by_id" Label="Get Account Orders" Desc="" Url="/accounts/[$AccountId$]" Filter="$.accounts[*].orders[*]"
		Template="order_output">
		<EndPoint Name="child_get_order" Url="/orders/[$parent.orders$]" Filter="$.orders[*]">
		</EndPoint>	
		 <Params>
			<Param Name="AccountId" Label="Account Id" IsKey="True" />
		  </Params>		
    </EndPoint>
	
    <EndPoint Name="get_account_charges_by_id" Label="Get Account Charges by Id" Desc="" Url="/accounts/[$AccountId$]" Filter="$.accounts[*].charges[*]"
		Template="charge_output" >		
		 <Params>
			<Param Name="AccountId" Label="Account Id" IsKey="True" />
		  </Params>		
    </EndPoint>
	
	<EndPoint Name="get_account" Label="Get Account By Id" Desc="" Url="/accounts/[$Id$]" Filter=""
		Template="account_output">
      <Params>
		<Param Name="Id" Label="Account Id" IsKey="True" />
      </Params>
    </EndPoint>
    <EndPoint Name="get_subscription_ids" Label="Get Subscriptions Ids" Desc="" Url="/subscriptions" Filter="$.subscriptions[*]"
		Template="pagination, subscription_params">
	   <OutputColumns>
		    <Column Name="subscriptions" Label="Id" DataType="DT_WSTR" Length="100" />
      </OutputColumns>
    </EndPoint>	
    <EndPoint Name="get_subscriptions" Label="Get Subscriptions" Desc="" Url="/subscriptions" Filter="$.subscriptions[*]"
		Template="pagination, subscription_output, subscription_params">
		<EndPoint Name="child_get_subscription" Url="/subscriptions/[$parent.subscriptions$]" Filter="$.subscriptions[*]">
		</EndPoint>			
    </EndPoint>
    <EndPoint Name="get_subscription" Label="Get Subscription By Id" Desc="" Url="/subscriptions/[$Id$]" Filter="$.subscriptions[*]"
		Template="subscription_output">
      <Params>
		<Param Name="Id" Label="Subscription Id" IsKey="True" />
      </Params>
    </EndPoint>

	<EndPoint Name="get_quote" Label="Get Quote By Id" Desc="" Url="/quotes/[$Id$]" Filter=""
		Template="quote_output">
      <Params>
		<Param Name="Id" Label="Quote Id" IsKey="True" />
      </Params>
    </EndPoint>
    <EndPoint Name="get_quotes" Label="Get Quotes" Desc="" Url="/quotes" Filter="$._embedded.quotes[*]"
		Template="pagination, quote_output, quote_params">
    </EndPoint>	
	
    <EndPoint Name="get_subscription_report" Label="Get Subscription Report" Desc="" Url="/data/v1/subscription" Filter="$.report[*]"
		Method="POST" CachedTtl="30" AllowParamBindForLayoutMap="True" Body="{$rows$}"
		JsonRowFormat="Multicontent"
		ContentType="ApplicationJson"
		Template="pagination_report"
		>
		<Params>
			<Param Name="ReportColumns" Value="transaction_year~transaction_month~transaction_date~subscriptions~new_subscribers"
				Options="activations;arr;average_mrr;buyer_email;buyer_id;cancellations;chargeback_true_false;company_id;company_name;country_iso;country_name;coupon;customer_churn;discount;driving_offer_type;driving_product_path;item_id;lifetime_value;mrr;mrr_decrease;mrr_downgrade;mrr_growth_rate;mrr_increase;mrr_paused;mrr_resumed;mrr_upgrade;new_subscribers;occurred_date;order_id;product_display_name;product_id;product_name;product_path;purchase_type;return_true_false;revenue_churn;store_id;store_name;subscriber_loss;subscribers;subscription_period;subscription_period_end;subscription_period_start;subscription_start_date;subscription_status;subscription_true_false;subscriptions;sync_date;transaction_currency;transaction_date;transaction_month;transaction_type;transaction_year"
				MultiSelect="True" MultiSelectSeparator="," MultiSelectTemplate="&quot;{@value}&quot;" ValueTemplate="[{$value$}]"/>
			<Param Name="GroupByColumns" Value="transaction_year~transaction_month~transaction_date" 
				Options="buyer_email;buyer_id;chargeback_true_false;company_id;company_name;country_iso;country_name;coupon;discount;driving_offer_type;driving_product_path;item_id;occurred_date;order_id;product_display_name;product_id;product_name;product_path;purchase_type;return_true_false;store_id;store_name;subscription_period;subscription_period_end;subscription_period_start;subscription_start_date;subscription_status;subscription_true_false;sync_date;transaction_currency;transaction_date;transaction_month;transaction_type;transaction_year"
				MultiSelect="True" MultiSelectSeparator="," MultiSelectTemplate="&quot;{@value}&quot;" ValueTemplate="[{$value$}]"/>

		</Params>	
		<LayoutMap>
<![CDATA[<?xml version="1.0" encoding="utf-8"?>
<settings>
  <dataset id="root" readfrominput="True" />
  <map name="async" value="false"/>	
  <map name="pageCount" src="PageSize"/>	
  <map name="pageNumber" value="{%page%}"/>	
  
  <map name="reportColumns" src="ReportColumns" fragment="True" />
  <map name="groupBy" src="GroupByColumns" fragment="True" />
 
  <map name="filter">
      <map name="startDate" src="StartDate" />
	  <map name="endDate" src="EndDate" />
	  <map name="syncDate" src="SyncDate" />
	  <map name="countryISO" src="Country"  fragment="True" />	  
	  <map name="productNames" src="ProductNames"  fragment="True" />
	  <map name="productPaths" src="ProductPaths"  fragment="True" />
	  <map name="notificationEmails" src="NotificationEmails"  fragment="True" />
  </map>  
</settings>
]]>
		</LayoutMap>

    </EndPoint>	
	
<EndPoint Name="get_revenue_report" Label="Get Revenue Report" Desc="" Url="/data/v1/revenue" Filter="$.report[*]"
		Method="POST" CachedTtl="30" AllowParamBindForLayoutMap="True" Body="{$rows$}"
		JsonRowFormat="Multicontent"
		ContentType="ApplicationJson"
		Template="pagination_report"
		>
		<Params>
			<Param Name="ReportColumns" Value="Transaction_Year~Transaction_Month~Transaction_Date~Company_Name~Product_Path~Product_Units~Tax_in_USD~Transaction_Amount_in_USD~Grand_Total_In_USD"
				Options="Buyer_Email;Buyer_ID;Chargeback_True_False;Company_ID;Company_Name;Country_ISO;Country_Name;CouponDigital_Backup_Fulfillment_Fee;Digital_Backup_Fulfillment_Fee_in_USD;Digital_Fulfillment_Fee;Digital_Fulfillment_Fee_in_USD;Discount;Driving_Offer_TypeDriving_Product_Path;Fixed_FeeFixed_Fee_in_USDIncomeIncome_in_USDItem_ID;Order_ID;Physical_Backup_Fulfillment_Fee;Physical_Backup_Fulfillment_Fee_in_USD;Product_Display_Name;Product_ID;Product_Name;Product_Path;Purchase_Type;Return_Fee;Return_Fee_in_USD;Return_True_False;SegmentStore_Chargeback_Fee;Store_ID;Store_Name;Subscription_Period;Subscription_Period_End;Subscription_Period_Start;Subscription_Start_Date;Subscription_Status;Subscription_True_False;Tax;Tax_Fee;Tax_Fee_in_USD;Tax_in_USD;Transaction_Amount;Transaction_Amount_in_USD;Transaction_Currency;Transaction_Date;Transaction_Fee;Transaction_Fee_in_USD;Transaction_Item_Count;Transaction_Month;Transaction_Rate;Transaction_Time_UTC;Transaction_Type;Transaction_Year;Grand_Total_In_USD;syncDatecountryISO;Product_Count;Product_Units"
				MultiSelect="True" MultiSelectSeparator="," MultiSelectTemplate="&quot;{@value}&quot;" ValueTemplate="[{$value$}]"/>
			<Param Name="GroupByColumns" Value="" 
				Options="Buyer_Email;Buyer_ID;Chargeback_True_False;Company_ID;Company_Name;Country_ISO;Country_Name;Coupon;Discount;Driving_Offer_Type;Driving_Product_Path;Income;Item_ID;Order_ID;Product_Display_Name;Product_ID;Product_Name;Product_Path;Purchase_Type;Return_True_False;Segment;Store_ID;Store_Name;Subscription_Period;Subscription_Status;Subscription_True_False;Transaction_Currency;Transaction_Date;Transaction_Month;Transaction_Type;Transaction_Year;countryISO"
				MultiSelect="True" MultiSelectSeparator="," MultiSelectTemplate="&quot;{@value}&quot;" ValueTemplate="[{$value$}]"/>
		</Params>	
		<LayoutMap>
<![CDATA[<?xml version="1.0" encoding="utf-8"?>
<settings>
  <dataset id="root" readfrominput="True" />
  <map name="async" value="false"/>	
  <map name="pageCount" src="PageSize"/>	
  <map name="pageNumber" value="{%page%}"/>	
  
  <map name="reportColumns" src="ReportColumns" fragment="True" />
  <map name="groupBy" src="GroupByColumns" fragment="True" />
 
  <map name="filter">
      <map name="startDate" src="StartDate" />
	  <map name="endDate" src="EndDate" />
	  <map name="syncDate" src="SyncDate" />
	  <map name="countryISO" src="Country"  fragment="True" />	  
	  <map name="productNames" src="ProductNames"  fragment="True" />
	  <map name="productPaths" src="ProductPaths"  fragment="True" />
	  <map name="notificationEmails" src="NotificationEmails"  fragment="True" />
	  
  </map>  
</settings>
]]>
		</LayoutMap>

    </EndPoint>		
	
  </EndPoints>
  
  <Tables>
	<Table Name="Products" SelectEndPoint="get_products" LookupEndPoint="get_product" UpdateEndPoint="put_product" InsertEndPoint="post_product" UpsertEndPoint="post_product" />
	<Table Name="ProductPrices" SelectEndPoint="get_product_prices"  />	
	<Table Name="Orders" SelectEndPoint="get_orders" LookupEndPoint="get_order" />
	<Table Name="OrderItems" SelectEndPoint="get_order_items" LookupEndPoint="get_order_item" />
	<Table Name="Subscriptions" SelectEndPoint="get_subscriptions" LookupEndPoint="get_subscription" />
	
	
	<Table Name="Accounts" SelectEndPoint="get_accounts" LookupEndPoint="get_account" />
	<Table Name="AccountOrders" SelectEndPoint="get_account_orders" LookupEndPoint="get_account_orders_by_id"  />
	<Table Name="AccountCharges" SelectEndPoint="get_account_charges" LookupEndPoint="get_account_charges_by_id"  />
	<Table Name="Quotes" SelectEndPoint="get_quotes" LookupEndPoint="get_quote" />
  </Tables>
  
  <Examples>
     <Example Name="Read orders" Desc="Read all orders" Code="SELECT * FROM Orders" Default="True" />
    <Example Name="Read a single order by id" Desc="Read a single order by id" Code="SELECT * FROM Orders Where Id='zzzzzzzzzz'" Default="True" />	
	<Example Name="Read orders with date range" Desc="Read all orders within specific date range" Code="SELECT * FROM Orders WITH(StartDate='2020-01-01', EndDate='2021-12-31' ) --use function like today, yesterday, yearstart, monthstart, yearstart-1y" />
	<Example Name="Read orders placed in last 30 days" Default="True" Desc="Read all orders placed in last 30 days. This hows how to use function like today, yesterday, yearstart, monthstart, yearstart-1y etc for date parameters">
		<Code>
<![CDATA[
SELECT * FROM Orders 
--WHERE Currency='USD' and TotalInPayoutCurrency>=1599
WITH(StartDate='today-30day', EndDate='today') --try today, yesterday, yearstart, yearend, monthstart, monthend, yearstart-1y so on
]]>
		</Code>
	</Example>
	
    <Example Name="Read product ids" Desc="Read all orders" Code="SELECT * FROM get_product_ids"  />
	<Example Name="Read product details" Desc="Read all products" Code="SELECT * FROM Products"  />	
	<Example Name="Read a single product by id" Desc="Read a single product by id" Code="SELECT * FROM Products Where Id='some-product-id'"  />	

	<Example Name="Read product prices" Desc="List product prices for specified currency or country. If you do not pass Country or Currency Parameter then all prices for all countries listed">
		<Code>
<![CDATA[
SELECT 
 Product,
 Country,
 Currency,
 Price,
 PriceDisplay,
 
 Discount2DiscountPercent,
 Discount2DiscountValue,
 Discount2DiscountValueDisplay,
 Discount2UnitPrice,
 Discount2UnitPriceDisplay,
 
 Discount3DiscountPercent,
 Discount3DiscountValue,
 Discount3DiscountValueDisplay,
 Discount3UnitPrice,
 Discount3UnitPriceDisplay,
 
 Discount4DiscountPercent,
 Discount4DiscountValue,
 Discount4DiscountValueDisplay,
 Discount4UnitPrice,
 Discount4UnitPriceDisplay,
 
 Discount5DiscountPercent,
 Discount5DiscountValue,
 Discount5DiscountValueDisplay,
 Discount5UnitPrice,
 Discount5UnitPriceDisplay,
 
 DiscountReasonEn,
 DiscountPeriodCount,

 AvailableStart,
 AvailableEnd,
 SetupFeePrice,
 SetupFeePriceDisplay,
 SetupFeeReasonEn
 
FROM ProductPrices 
--WITH(Country='US') --//get prices for a specific country
--WITH(Currency='USD') --//get proces for a specific currency

]]>
		</Code>
	</Example>
	<Example Name="Update Product" Desc="Update product attributes by its ID">
		<Code>
<![CDATA[
UPDATE Products
SET 
  Display='Product ABCD'
, Sku='PRD-ABCD-01'
, Summary='Product Abcd **STD**'
, Description='This product can be used to call **API** supports markdown syntax'
, Action='**Action** supports markdown'
, TaxCode='DC010500'
, Image='https://zappysys.com/api/images/ZappySys-icon.png'
, FulfillmentInstructions='Thank you for shopping. **Activate** license by using our License App'
, Format='digital'
, PriceUSD='101.5'
, PriceEUR='102.5'
, PriceGBP='103.5'
, PriceCAD='104.5'
, PriceNZD='105.5'
, PriceCHF='106.5'
, PriceSEK='107.5'
, PriceCZK='108.5'
, PriceDKK='109.5'
, PricePLN='101.5'
, PriceSGD='102.5'
, PriceJPY='103.5'
, PriceCNY='104.5'
, PriceHKD='105.5'
, PriceINR='106.5'
, PriceBRL='107.5'
, PriceAUD='108.5'

, Badge='Badge-1'
, Rank=1
, Trial=14 --how many trial days
, TrialPriceUSD=10.5 

--, Renew=1 --not allowed for update : Only for create (enable subscription)
, Interval='year' --allowed values: adhoc, day, week, year, only needed if you are creating a subscription
, IntervalLength=1
, IntervalCount=0

, QuantityBehavior='allow' --allowed values: allow, lock, hide
, QuantityDefault=1
, Attributes = '{"mykey-1" : "some-value-1", "mykey-2" : "some-value-2"}'
--, Fulfillments='[ { fullfillment }, { fullfillment } ... ]' --JSON fragment 	
Where Id='abcd' 
]]>
		</Code>
	</Example>

	<Example Name="Update multiple Products (read from CSV file)" Desc="Update multiple products from CSV file or other external source (e.g. Microsoft SQL Server, MySQL, Postgresql, ODBC)">
		<Code>
<![CDATA[
UPDATE Products
SOURCE('ODBC',

--File input example (use as to match Column name allowed in Products Table to write)
--'Driver={ZappySys CSV Driver};DataPath=c:\data\products.csv',
--'select P_ID as Id,P_TAXCODE as TaxCode From $'

--Direct input example
'Driver={ZappySys CSV Driver}',
'select ''abcd'' as Id, ''DC010500'' as TaxCode UNION
 select ''xyz'' as Id, ''DC010500'' as TaxCode UNION
 select ''zzz'' as Id, ''DC010500'' as TaxCode 
'
)
]]>
		</Code>
	</Example>	
	
<Example Name="Create or Update Product (Upsert)" Desc="Create or Update product (Upsert)">
		<Code>
<![CDATA[
--Insert or Update
--UPSERT INTO Products 

--Insert or Update
UPSERT INTO Products
(     [Id]	, [Display]	, [Summary]
	, [Description]	, [Action]	, [Format]
	, [Sku]	, [TaxCode]	, [Image]
	, [Renew]	, [Interval]	, [IntervalLength]
	, [IntervalCount]	, [QuantityBehavior]	, [QuantityDefault]
	, [PriceUSD]	, [PriceEUR]	, [PriceGBP]
	, [PriceCAD]	, [PriceNZD]	, [PriceCHF]
	, [PriceSEK]	, [PriceCZK]	, [PriceDKK]
	, [PricePLN]	, [PriceSGD]	, [PriceJPY]
	, [PriceCNY]	, [PriceHKD]	, [PriceINR]	, [PriceBRL]	, [PriceAUD]
	, [Trial]	
	, [TrialPriceUSD]	, [TrialPriceEUR]	, [TrialPriceGBP]
	, [PaymentCollected]	, [PaidTrial]
	, [FulfillmentInstructions]
	, [DateLimitsEnabled]	, [CancellationInterval]	, [CancellationIntervalLength]	
	, [SetupFeeTitle]	
	, [SetupFeePriceUSD]	, [SetupFeePriceEUR]	, [SetupFeePriceGBP]	
	, [Badge]	, [Rank]	
	, [Attributes]		
	)
VALUES('test-std-id'
	, '3Year **standard** subscription edition'
	, 'summary **standard edition** _some italic_ ' -- markdown syntax allowed
	
	, 'long description **test STD** and many more lines' --markdown syntax allowed
	, 'action text with **markdown** '
	, 'digital' -- e.g. digital OR physical OR digital-and-physical
	
	, 'TEST-STD-001'
	, 'DC010500'
	, 'https://zappysys.com/api/images/ZappySys-icon.png'
	
	, true	, 'year'	, 1
	, 1 	, 'allow' -- e.g. allow Or lock Or hide
	, 3	--stop renewal after 3 periods
	, 10.12	, 11.12	, 12.12	
	, 13.12	, 14.12	, 15.12	
	, 16.12	, 17.12	, 18.12	
	, 19.12	, 20.12	, 21.12	
	, 22.12	, 23.12	, 24.12	, 25.12	, 26.12	
    , 14 --how many days trial allowed
    , 10.12	, 11.12	, 12.12	
    , 'true', true
	, 'Thank you for shopping, **here are** license instructions' --markdown supported
	, false, 'day', 5
	, 'Setup title'	
	--setup fees in common currencies
	, 10.50	, 11.50	, 12.50	
	, 'badge-1'	, 1
	, '{"mykey-1" : "some-value-1", "mykey-2" : "some-value-2"}' --JSON fragment 
	--, '[... fullfillments.. ]' --JSON fragment 	
) 
]]>
		</Code>
	</Example>

	<Example Name="List / Search Quotes" Desc="List or Search quotes. This example lists Open and Completed Quotes">
		<Code>
<![CDATA[
SELECT * FROM Quotes 
WITH(
	  Statuses='OPEN~COMPLETED',
	  --SearchFor='Test' --quote contains word "Test" in Name or blling information
	  -- query more status like below
	  --Statuses='OPEN~COMPLETED~CANCELED~EXPIRED',
	  
)]]>
		</Code>
	</Example>
	
	<Example Name="List Product Publish Status - Public=200, Private=404" Desc="List product publish status (200=Published, 404=Private)">
		<Code>
<![CDATA[select * from get_products_visibility ]]>
		</Code>
	</Example>
	<Example Name="List all orders for a specific subscription" Desc="List all orders for a specific subscription">
		<Code>
<![CDATA[SELECT * FROM Orders 
WHERE SubscriptionId_1='iBPfMFS6TZSxrLzSOrq8PQ' 
	OR SubscriptionId_2='iBPfMFS6TZSxrLzSOrq8PQ'
	OR SubscriptionId_3='iBPfMFS6TZSxrLzSOrq8PQ' 
ORDER BY OrderDate		]]>
		</Code>
	</Example>	
	<Example Name="Generate Subscription Report by Date, Product, Group By" Desc="Generate subscription report for selected group by columns, date range, products and more">
		<Code>
<![CDATA[SELECT *
FROM get_subscription_report
Order by transaction_date
WITH(
	  Country='AL~UA~US'
	, ProductPaths='odbc-pp-ent-sub~odbc-pp-pro-sub~odbc-pp-std~ssis-pp-pro-sub~ssis-pp-std-sub~ssis-pp-ent-sub'
	, StartDate='monthstart-1m' --or  2022-01-01
	, EndDateDate='monthend+2d' --or  2022-01-01
	, ReportColumns='transaction_date~transaction_month~transaction_year~activations~average_mrr~cancellations~mrr~new_subscribers~subscriptions'
	, GroupByColumns='transaction_date~transaction_month~transaction_year'
)
	]]>
		</Code>
	</Example>	
	<Example Name="Generate Revenue Report by Date, Product, Group By" Desc="Generate revenue report for selected group by columns, date range, products and more">
		<Code>
<![CDATA[SELECT *
FROM get_revenue_report
Order by transaction_date
WITH(
	  Country='AL~UA~US'
	, ProductPaths='odbc-pp-ent-sub~odbc-pp-pro-sub~odbc-pp-std~ssis-pp-pro-sub~ssis-pp-std-sub~ssis-pp-ent-sub'
	, StartDate='monthstart-1m' --or  2022-01-01
	, EndDateDate='monthend+2d' --or  2022-01-01
	, ReportColumns='Transaction_Year~Transaction_Month~Transaction_Date~Company_Name~Product_Path~Product_Units~Tax_in_USD~Transaction_Amount_in_USD~Grand_Total_In_USD'
	, GroupByColumns='transaction_date~transaction_month~transaction_year'
)
		
	]]>
		</Code>
	</Example>	
	<Example Name="Get all accounts" Desc="Get all accounts for your store">
		<Code>
<![CDATA[SELECT *
FROM Accounts	

SELECT "Id"
	, "ContactFirst"
	, "ContactLast"
	, "ContactEmail"
	, "ContactCompany"
	, "ContactPhone"
	, "ContactSubscribed"
	, "AddressLine1"
	, "AddressLine2"
	, "City"
	, "Region"
	, "RegionCustom"
	, "PostalCode"
	, "AddressCompany"
	, "Language"
	, "Country"
	, "LookupGlobal"
	, "Url"
	, "PaymentMethods"
	, "PaymentActive"
	, "Orders"
	, "Subscriptions"
	, "Charges"
	, "Subscribed"
	, "TaxExemptionData"
FROM Accounts

--Use WITH clause --OR-- Key column(s) in WHERE clause
--WHERE [Id] = 'abcd'

--search by one or more parameters below
/*
WITH(
	  Email='X'
	, CustomKey='X'
	, GlobalKey='X'
	, OrderID='X'
	, OrderReference='X'
	, SubscriptionId='X'
	, Products='PROD-1,PROD-2,PROD-3'
	, Refunds='true'
	, SubscriptionStatus='active'
)
*/
	]]>
		</Code>
	</Example>		
	<Example Name="Get all accounts with specific product orders" Desc="Use below query to search accounts who placed orders for specific products">
		<Code>
<![CDATA[SELECT * from Accounts WITH(Products='ssis-pp-pro,ssis-pp-pro-sub,ssis-pp-ent,ssis-pp-ent-sub')]]>
		</Code>
	</Example>			

	<Example Name="Get account charges" Desc="Use below query to search account charges">
		<Code>
<![CDATA[SELECT * from AccountCharges 

--search by one or more parameters below
/*
WITH(
	  Email='X'
	, CustomKey='X'
	, GlobalKey='X'
	, OrderID='X'
	, OrderReference='X'
	, SubscriptionId='X'
	, Products='PROD-1,PROD-2,PROD-3'
	, Refunds='true'
	, SubscriptionStatus='active'
)
*/

]]>
		</Code>
	</Example>		
<Example Name="Get account orders by email id" Desc="Use below query to search for accounts and orders with search criteria">
		<Code>
<![CDATA[SELECT * from AccountOrders
WITH(
	  Email='bob@abc.com'
)
	  
--search by one or more parameters below
/*
WITH(
	  Email='X'
	, CustomKey='X'
	, GlobalKey='X'
	, OrderID='X'
	, OrderReference='X'
	, SubscriptionId='X'
	, Products='PROD-1,PROD-2,PROD-3'
	, Refunds='true'
	, SubscriptionStatus='active'
)
*/

]]>
		</Code>
	</Example>		
	
	<Example Name="Get specific order by reference number (rather than Id)" Desc="Search by Order by reference (fast way). If you have less rows then use Select * FROM Orders where Reference='BIX-123' it can be faster than below appproach">
		<Code>
<![CDATA[SELECT * from AccountOrders WHERE Reference='BIN240202-9666-28133' WITH(OrderReference='BIN240202-9666-28133')	
--or for handful rows use below way
--SELECT * from Orders WHERE Reference='BIN240202-9666-28133'
	]]>
		</Code>
	</Example>			
	
  </Examples>
</ApiConfig>