Zendesk Connector
Zendesk Connector Help
Version 8
ZappySys Logo File Version: v8
Supported Engine: 7

Zendesk Connector - Source Code


<?xml version="1.0" encoding="utf-8"?>
<ApiConfig Name="Zendesk" Id="085A7D73-DB03-49A7-BEAA-027DF769784B"
	EngineVersion="7"
  Version="8"
	Slug="zendesk-connector"
	Desc="Zendesk Connector can be used to integrate Zendesk REST API in your App / BI Tools. You can read/write data about Tickets, Activity, Users, Organizations and more."
	HelpLink="https://developer.zendesk.com/rest_api/docs/zendesk-apis/resources"
	Logo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAqsSURBVHhe7Z15cFfVFcc7U7EVbXFpaW1rq9NWZ9pq63RRNCxhSVhCYrCylGXAVAQMxRCw4BjAQNUSCjgwA7Kow+oC1ZaKUFkEEaIgkhCIEMJuAyELSYTsnP7O602boSfJ+/1+79x37+93vjOff8hb7nnvE/KW++790pd/0xkEwWtELIEFEUtgQcQSWBCxBBZELIEFEUtgQcQSWBCxBBZELIEFEUtgQcQSWBCxBBZELIEFEUtgQcQSWBCxBBZELIEFEUtgQcQSWBCxBBZELIEFEUtgQcQSWBCxBBZELIEFEUtgQcQSWBCxBBZELIEFEUtgQcQSWBCxBBZELIEFEUtgQYtYWz7aayWrNm6G6x6IJWtCktKnkOvZwMR5C8iavEKLWKUVFWBjjp05C9c92J2sCXniz39RS9qVvYfzyXq8RItYRSWlqiS7cvBYIVlPEzaKdb60DL6fMICsx0u0iHXo+AlVll3ZsHMXWU8TNorVfcx4shav0SLWhzm5qiy78tL6t8l6mrBJrLr6ehg+LZOsgwMtYuFFsI3pn/YUWU8TtojV2HgFFgd+Sa65rwtZBwdaxEqc+EdVoj0pLitv80TYItbfdnygVSpEi1jtA3dWlZcuqTLtyPpt75O1NMcGsQ4VHodvxSWQ7edEi1jIyo2bVKl2JHX2XLKO5pguVnllFdw1YDDZdm60iZU8eaoq1/zU1zfAHUmPkHU0x2Sxauvq4SePDCXbrQNtYrWP6Q7nSu14njVz2atkDVdjslgT5swn26wLbWIhnUaNhpq6OlW6mamurYXv9X2IbP/VmCrWnJVryPbqRKtYX+nUDT7KO6zKNzPTX1pOtp3CRLH25X8GHbrFke3ViVaxkHuHjoKaWjP/18o/cRLa3d+VbDeFaWJ9dvIUXB/Tg2yrbrSLhYwz8De99GIF/Gp4CtneljBJLHwHeM+QEWQ7/cAXsZCsFWvgypUr6rD4n+RJU8l2toYpYtU3NEBC2mSyjX7hm1jYHeXw8ZPq0PgXlHvs81lkG9vCBLGw/UMzniXb5ye+iYV8vWuc84Tbz6TPXxDUdVVzTBBrxTubnJsiqn1+4qtYyFcfiIXZK1arw6QvZRWVMHBKBtkmt/gt1ta9+8h2mYDvYjUxaGoGVGl4n4h/Ok4WFcFdD4f/qsNPsU4VnYdbeyeS7TIBY8RCvtMnCdZufk8dOp6kz1sAN3fvQ+4/WPwSq6GhEe4ePJxskykYJVYTMSljnGsvvNvxIpeqqyFz6ctwR+Jvyf1R4HXLi2vfhJtie5M/R/wQq7qmBnqNe5Jsj0kYKVYTvx6RAvPXvgG5xwqDfqj6rwslsOtALmQsWgrfdfmKpjkzliyH82Vlrf7vplushsZGmLXc3XtMvzFarCawk9pNsfGB67BpsGjdW3D09Bl1qP+XC+XlsOOTTyFr5RqIfTzVudO7htiWG/CiHq/FTBPr1Q0byXaYiBViUXytSy/oGJfg4OXt9s8GDYeyykrnRJokFv7v69W1oQ6sFYsDvAY7e75YnUpzxDp97jx8O74/2QZTEbEU+CYg+2CeOpX/iQliVdfUwo+TB5H7NxkRS7Hq3f//ksgEsUZMn0nu23SiXqx293eBZxYtce64ro6fYuEnW9guar82EPVixaemtfi8zE+x3t2d7bzuovZrA1Et1r1DRzofHbQUv8TKPngIrg3xxbgpRK1Y3+jRx+kx2lr8EOvz4gvww6SB5P5sIirFah/TA3YdyFGnsuXoFgvHV4j5/VhyX7YRdWLhE/mFb6xXp7L16BSrMXDzEBe43qP2YyNRJ9bYF+aoU9l2dIo1f83r2sdX4CSqxEpMe8r5c+M2usTCrkLU9m0masS6NT4RikpK1Kl0Fx1iFZw5C9/s2Y/cvs1EhVjYgRC7IgcbbrHwZfcP+j9Mbtt2Il4sfMi4YeeH6lQGF06xqi5fhpiUyLgDpIh4sRa+vk6dyuDDJRZ2LcabCGqbkUJEi5WS+bw6laGFS6zMZa+Q24skIlaszo+Nc7qchBMOsd7L3ut0UqS2F0lEpFj3DB4B5VVV6lSGHq/FwmEbb+jSk9xWpBFxYt3QuSfkHD2mTmV48VKskosX4fb+7r8Ssp2IEgtf12zak61OZfjxUqze4yeS24hUIkYs7GaStWK100HOq3ghFj7pf2zWC+T6kUzEiDVyxp/UqfQuXoi1cuNm6/tWhUJEiPVgyhho8Oir6eYJV6xNu7NDHsnGdqwXq2OvfnCq6Jw6ld4mHLFw2Mbb+iaT60UDVouFJx1v4bkSqlhVly7DTwcOI9eJFqwV69pOXeGv23aoU8mTUMTCDzPwa2pq+WjCWrFwkH/uhCLWtMVLyWWjDevEwl6Wo2bM8myIo9YSrFg4dRu1XDRinVg4P4yumcRwiGu3YuUWFMKNsfHkcqGAn/x36BoH7SztrmyVWD96aKBzYawrbsUqPPs5dOgWulQ46D9+Sr/s7Q2wbut2OFtcDOdKSp2hmfBzsE/yjzj/PnXhYrjdko6B1oiFcx7iUD4640asi1VV8Mthj5I/b437Ro4OXCe+Ajv2H4AvLrv/ZcGvefBRBvaTx3G8ru9sxkwUV2ONWG9u2aYOrb60Jdbjz82GQU9PI39GgU/gcfaLd3btVnsIP9jGRzOfC7Sz5SEt/cAKsaYvWa4Oo960JVYw4MRJGz4IrYu0m5RWVELfCZOM+YTMeLGS0qdAo09To3ghFr7SmTR/wX9HCeQM/pnck5tnxDDdRouF8xtWfuHfXNLhioU9Reeueo0cIokzeYXHQ7ru8xJjxboxcJdVQAxiqzPhiHVLjz6e9g0LNjgfdK8n0nz702ikWPibnnO0QB0i/xKqWPjJGU5I6XdwNtvuY8aTbeTGOLFwBGQcdtqEKedCEQsfbK7dvEVtwf/gh7o4DhjVVk6MEwtn4zIloYg1+cWFam1z8umRo9CxVwLZXi6MEisu9UnnzsaUBCvWsIxnjWp/8+zcf0Dr9HPGiHXngCFwofyiOgxmJFixDhzx/7qwpdTXN2gd1M0IsW7rlwynz/H0Ag0nwYg15Onpai1zg3fZ+Hkc1X6v8V0svIP6Z/bHqnSz4lYsHIboUnWNWsvsDH1GzzS/vouFky6ZGrdi4bs6E+5i3QQnuKJq8BrfxMJ+Rn/ImueMvGJq3Ip1qPCEWsOO6Hi25ZtY3UanQm1dcHMQ6o4bse4cMFgtbU9waCeqFi/xRay7B48IeyQYHXEj1vjZc9XS9mR//hGyFi/RLhb2lswt8GbQDu64Eeut7bxfCnGkuraWfdQbrWLhHeDWj/ep8syPG7GwW7KN6TMhnazHK7SJhW/Z565+TZVlR9yIVVxWppa2K9wzi2kTK2VmeMM2+hE3Ytmal//+D7Ier9AiVvz4tFZn2TI1bYn1i9+NVEval/f37Sdr8gotYm0PFIEP5mxjz8E8p8MhVRPy84BY1Ho2kBO4gaJq8gqtF+9C9CBiCSyIWAILIpbAgoglsCBiCSyIWAILIpbAgoglsCBiCSyIWAILIpbAgoglsCBiCSyIWAILIpbAgoglsCBiCSyIWAILIpbAgoglsCBiCSyIWAILIpbAgoglsCBiCSyIWAILIpbAgoglsCBiCSyIWAILIpbAgoglsCBiCSyIWAILIpbAgoglMNAZ/g1YXwWYJuDnmQAAAABJRU5ErkJggg=="
	>
  <VersionHistory>
	<Change Date="2024-01-08" Type="New">Added CRUD operations (Insert, Update, Delete and Upsert) for Users and Organizations table. For Users table you can do Upsert in Bulk mode.</Change>
    <Change Date="2023-11-15" Type="Modified">Added API call delay property NextUrlWaitInMs to avoid error 429 (too many requests) during Pagination</Change>
    <Change Date="2023-10-30" Type="Modified">Change Domain Label to Sub Domain to avoid confusion</Change>
    <Change Date="2022-11-22" Type="Fix">Added MaxRows=1000 for get_search endpoint to avoid error when more than 1000 rows returned in search</Change>
    <Change Date="2022-10-27" Type="New">Updated Read Tickets (Incremental) endpoint to support functions in Start Time Parameter. Now you can use date time function (i.e. yesterday, monthstart etc) along with static date (i.e. 2021-01-01 or 2021-01-01 23:59:59) to set incremental extract date.</Change>
    <Change Date="2022-10-27" Type="New">Added support for separate columns for custom_fields (Previous approach was limited to 5 fields only)</Change>
    <Change Date="2022-08-16" Type="New">Added comment feature on existing ticket along with html body (e.g. Update Tickets SET comment_body='Closing this ticket' where Id=1234 - you can also set comment_body_html, comment_author_id, comment_public)</Change>
    <Change Date="2022-02-15" Type="Fix">Tickets (Incremental) endpoint doesnt stop pagination</Change>
    <Change Date="2022-02-15" Type="New">Added Retry for API Limit errors (status code 429)</Change>
    <Change Date="2022-01-31">BREAKING: renamed some parameters, Added support for adding - removing tags in Bulk UPDATE operation using additional_tags, remove_tags input property</Change>
    <Change Date="2022-01-31">BREAKING: Added support for Updating, Creating, Deleting Single Ticket without using Bulk mode (faster)</Change>
    <Change Date="2021-03-25">Added new endpoint get_ticket_attachments, updated many ticket endpoints to use static columns</Change>
    <Change Date="2020-12-01">Initial version</Change>
  </VersionHistory>

  <ServiceUrls>
    <ServiceUrl Name="Zendesk API" Url="https://[$Domain$].zendesk.com/api/v2"/>
  </ServiceUrls>


  <!-- https://developer.zendesk.com/rest_api/docs/support/introduction -->
  <Auths>

    <Auth Type="HTTP" Name="token" Label="Token Authentication" Desc="Authenticate using Static Token instead of userid / password ([Token Access] option must be enabled under Admin Console &gt; Channel &gt; API &gt; Settings and then Click [ADD API Token] to generate new token. These settings typically found here https://YOUR-SUB-DOMAIN.zendesk.com/agent/admin/api/settings " HelpLink="https://developer.zendesk.com/rest_api/docs/support/introduction#api-token"
          ConnStr="CredentialType=Basic;UserName=[$UserId$]/token;Password=[$Password$];"  TestEndPoint="get_groups">
      <Params>
        <Param Name="Domain" Label="Sub Domain (e.g. mycompany)" Required="True" />
        <Param Name="UserId" Required="True"/>
        <Param Name="Password" Label="Token" Secret="True" Required="True"/>
      
        <!--below not exposed as root level property in HTTP Connection so use as placeholder-->
        <Param Name="RetryMode" Value="RetryWhenStatusCodeMatch" Options="None;RetryAny;RetryWhenStatusCodeMatch;" Hidden="True" />
        <Param Name="RetryStatusCodeList" Value="429" Hidden="True" />
        <Param Name="RetryCountMax" Value="5" Hidden="True" />
        <Param Name="RetryMultiplyWaitTime" Value="True" Hidden="True" />      
      </Params>
    </Auth>

    <Auth Type="OAuth" Name="oauth" Label="OAuth Authentication" Desc="OAuth App must be created under Admin Console &gt; Channel &gt; API &gt; Settings. These settings typically found here https://YOUR-SUB-DOMAIN.zendesk.com/agent/admin/api/oauth_clients "
      HelpLink="https://developer.zendesk.com/rest_api/docs/support/introduction#oauth-access-token"
      ConnStr="Provider=Custom;OAuthVersion=OAuth2;ScopeSeparator={space};ReturnUrl=[$RedirectUrl$];AuthUrl=https://[$Domain$].zendesk.com/oauth/authorizations/new;TokenUrl=https://[$Domain$].zendesk.com/oauth/tokens;ClientId=[$ClientId$];ClientSecret=[$ClientSecret$];Scope=[$Permissions$];ContentType=application/json"
      TestEndPoint="get_groups">
      <Params>
        <Param Name="Domain" Label="Sub Domain (e.g. mycompany)" Required="True" />
        <Param Name="ClientId" Required="True" />
        <Param Name="ClientSecret" Secret="True" Required="True"/>
        <Param Name="Permissions" Value="read write" Required="True" Desc="Permissions you like to use. Examples:"/>
        <Param Name="RedirectUrl" Value="https://zappysys.com/oauth" Required="True" />
        
        <!--below not exposed as root level property in OAuth Connection so use as placeholder-->
        <Param Name="RetryMode" Value="RetryWhenStatusCodeMatch" Options="None;RetryAny;RetryWhenStatusCodeMatch;" Hidden="True" />
        <Param Name="RetryStatusCodeList" Value="429" Hidden="True" />
        <Param Name="RetryCountMax" Value="5" Hidden="True" />
        <Param Name="RetryMultiplyWaitTime" Value="True" Hidden="True" />
      </Params>
    </Auth>
    <Auth Type="HTTP" Name="basic" Label="UserID/Password Authentication (2FA must be OFF)" Desc="Authenticate using your userid / password (2FA must be OFF and [Password Access] option must be enabled under Admin Console &gt; Channel &gt; API &gt; Settings. These settings typically found here https://YOUR-SUB-DOMAIN.zendesk.com/agent/admin/api/settings " HelpLink="https://developer.zendesk.com/rest_api/docs/support/introduction#basic-authentication."
          ConnStr="CredentialType=Basic;" TestEndPoint="get_groups">
      <Params>
        <Param Name="Domain" Label="Sub Domain (e.g. mycompany)" Required="True" />
        <Param Name="UserName" Label="UserName (2FA Must be OFF)" Required="True"/>
        <Param Name="Password" Secret="True"  Required="True"/>
        <!--below not exposed as root level property in HTTP Connection so use as placeholder-->
        <Param Name="RetryMode" Value="RetryWhenStatusCodeMatch" Options="None;RetryAny;RetryWhenStatusCodeMatch;" Hidden="True" />
        <Param Name="RetryStatusCodeList" Value="429" Hidden="True" />
        <Param Name="RetryCountMax" Value="5" Hidden="True" />
        <Param Name="RetryMultiplyWaitTime" Value="True" Hidden="True" />    
      </Params>
    </Auth>
  </Auths>


  <Template>
    <Param Name="t_query" Label="Search Criteria" Desc="The search query based on this syntax https://support.zendesk.com/hc/en-us/articles/203663226" Type="query" Required="True"
          Options="Example: Search by Ticket ID=112233;Example: Search by Ticket Status=status&lt;solved;Example: Search by Some Text=SomeText;Example: Search By Status=SomeText;Example: Search by Type and Status=type:ticket status:open;Example: Search by Type and Name=type:user &quot;Jane Doe&quot;;Example: Search by Type and CreationDate=type:organization created&lt; 2015-05-01;Example: Search organizations updated after some date=type:organization updated &gt; 2015-05-01;Example: Search users updated after some date=type:user updated &gt; 2015-05-01;Example: Search By Type and Tag=type:ticket tags:red tags:blue"
          />
    <!-- When name not specified in EndPoints node .. its considered as base for all other template -->
    <EndPoint >
      <Params>
        <Param Name="NextUrlAttributeOrExpr" Value="$.next_page" Type="Property" />
        <Param Name="EnableArrayFlattening" Value="False" Type="Property" Desc="Enables deep array flattening for selected filtered hierarchy. When you turn on this property it will flatten each property of each array item and expose as column (e.g. If you have array property called tags and value is ['red','blue','yellow'] and if you turn on array flatterning then may see columns tags.1, tags.2, tags.3... tags.N in the output. You can control how many array items you want to flatten by setting MaxArrayItemsToFlatten property." />
        <Param Name="MaxArrayItemsToFlatten" Value="5" Type="Property" />
		<Param Name="NextUrlWaitInMs" Value="0" Label="Wait time after each request (in milliseconds)" Desc="This setting is useful to avoid error 429 (too many requests) during pagination. By setting this it slows down data read operation and that way less chance of error 429." Type="Property" />		
      </Params>
    </EndPoint>

    <EndPoint Name="tp_ticket">
      <Params>
        <Param Name="EnableArrayFlattening" Value="True" Type="Property" Desc="Enables deep array flattening for selected filtered hierarchy. When you turn on this property it will flatten each property of each array item and expose as column (e.g. If you have array property called tags and value is ['red','blue','yellow'] and if you turn on array flatterning then may see columns tags.1, tags.2, tags.3... tags.N in the output. You can control how many array items you want to flatten by setting MaxArrayItemsToFlatten property." />
      </Params>
      <OutputColumns>
        <Column Name="id" DataType="DT_I8" />
        <Column Name="recipient" DataType="DT_WSTR" Length="255" />
        <Column Name="subject" DataType="DT_WSTR" Length="1000" />
        <Column Name="status" DataType="DT_WSTR" Length="28" />
        <Column Name="type" DataType="DT_WSTR" Length="255" />
        <Column Name="priority" DataType="DT_WSTR" Length="24" />
        <Column Name="description" DataType="DT_NTEXT" />
        <Column Name="external_id" DataType="DT_WSTR" Length="255" />
        <Column Name="created_at" DataType="DT_DBTIMESTAMP" />
        <Column Name="updated_at" DataType="DT_DBTIMESTAMP" />
        <Column Name="raw_subject" DataType="DT_WSTR" Length="1000" />
        <Column Name="url" DataType="DT_WSTR" Length="500" />
        <Column Name="comment_count" DataType="DT_I8" />
        <Column Name="requester_id" DataType="DT_I8" />
        <Column Name="submitter_id" DataType="DT_I8" />
        <Column Name="assignee_id" DataType="DT_I8" />
        <Column Name="organization_id" DataType="DT_I8" />
        <Column Name="group_id" DataType="DT_I8" />
        <Column Name="collaborator_ids" DataType="DT_WSTR" Length="1000" />
        <Column Name="collaborator_ids.1" Label="collaborator_ids_1" DataType="DT_WSTR" Length="20" />
        <Column Name="collaborator_ids.2" Label="collaborator_ids_2" DataType="DT_WSTR" Length="20" />
        <Column Name="collaborator_ids.3" Label="collaborator_ids_3" DataType="DT_WSTR" Length="20" />

        <Column Name="follower_ids" DataType="DT_WSTR" Length="1000" />
        <Column Name="follower_ids.1" Label="follower_ids_1" DataType="DT_WSTR" Length="20" />
        <Column Name="follower_ids.2" Label="follower_ids_2" DataType="DT_WSTR" Length="20" />
        <Column Name="follower_ids.3" Label="follower_ids_3" DataType="DT_WSTR" Length="20" />

        <Column Name="email_cc_ids" DataType="DT_WSTR" Length="1000" />
        <Column Name="email_cc_ids.1" Label="email_cc_ids_1" DataType="DT_WSTR" Length="20" />
        <Column Name="email_cc_ids.2" Label="email_cc_ids_2" DataType="DT_WSTR" Length="20" />
        <Column Name="email_cc_ids.3" Label="email_cc_ids_3" DataType="DT_WSTR" Length="20" />


        <Column Name="forum_topic_id" DataType="DT_WSTR" Length="255" />
        <Column Name="problem_id" DataType="DT_WSTR" Length="255" />
        <Column Name="has_incidents" DataType="DT_BOOL"  />
        <Column Name="is_public" DataType="DT_BOOL"  />
        <Column Name="due_at" DataType="DT_DBTIMESTAMP"  />
        <Column Name="tags" DataType="DT_WSTR" Length="1000" />
        <Column Name="tags.1" Label="tags_1" DataType="DT_WSTR" Length="50" />
        <Column Name="tags.2" Label="tags_2" DataType="DT_WSTR" Length="50" />
        <Column Name="tags.3" Label="tags_3" DataType="DT_WSTR" Length="50" />
        <Column Name="tags.4" Label="tags_4" DataType="DT_WSTR" Length="50" />
        <Column Name="tags.5" Label="tags_5" DataType="DT_WSTR" Length="50" />

        <Column Name="custom_fields" DataType="DT_WSTR" Length="1000" />
        <Column Name="custom_fields.1.id" Label="custom_fields_1_id" DataType="DT_WSTR" Length="20" />
        <Column Name="custom_fields.1.value" Label="custom_fields_1_value" DataType="DT_WSTR" Length="1000" />
        <Column Name="custom_fields.2.id" Label="custom_fields_2_id" DataType="DT_WSTR" Length="20" />
        <Column Name="custom_fields.2.value" Label="custom_fields_2_value" DataType="DT_WSTR" Length="1000" />
        <Column Name="custom_fields.3.id" Label="custom_fields_3_id" DataType="DT_WSTR" Length="20" />
        <Column Name="custom_fields.3.value" Label="custom_fields_3_value" DataType="DT_WSTR" Length="1000" />
        <Column Name="custom_fields.4.id" Label="custom_fields_4_id" DataType="DT_WSTR" Length="20" />
        <Column Name="custom_fields.4.value" Label="custom_fields_4_value" DataType="DT_WSTR" Length="1000" />
        <Column Name="custom_fields.5.id" Label="custom_fields_5_id" DataType="DT_WSTR" Length="20" />
        <Column Name="custom_fields.5.value" Label="custom_fields_5_value" DataType="DT_WSTR" Length="1000" />

        <Column Name="via_followup_source_id" DataType="DT_I8" />
        <Column Name="satisfaction_rating.id" Label="satisfaction_rating_id" DataType="DT_I8" />
        <Column Name="satisfaction_rating.score" Label="satisfaction_rating_score" DataType="DT_WSTR" Length="20" />
        <Column Name="satisfaction_rating.comment" Label="satisfaction_rating_comment" DataType="DT_WSTR" Length="1000" />

        <Column Name="sharing_agreement_ids" DataType="DT_WSTR" Length="255" />
        <Column Name="fields" DataType="DT_WSTR" Length="1000" />
        <Column Name="followup_ids" DataType="DT_WSTR" Length="1000" />
        <Column Name="brand_id" DataType="DT_I8" />
        <Column Name="allow_channelback" DataType="DT_BOOL" />
        <Column Name="allow_attachments" DataType="DT_BOOL" />
        <Column Label="via_channel" Name="via.channel" DataType="DT_WSTR" Length="100" />
        <Column Label="via_source_rel" Name="via.source.rel" DataType="DT_WSTR" Length="255" />
        <Column Label="via_source_from_address" Name="via.source.from.address" DataType="DT_WSTR" Length="500" />
        <Column Label="via_source_from_name" Name="via.source.from.name" DataType="DT_WSTR" Length="500" />
        <Column Label="via_source_to_name" Name="via.source.to.name" DataType="DT_WSTR" Length="500" />
        <Column Label="via_source_to_address" Name="via.source.to.address" DataType="DT_WSTR" Length="500" />
        <Column Label="via_source_from_ticket_id" Name="via.source.from.ticket_id" DataType="DT_I8" />
        <Column Label="via_source_from_subject" Name="via.source.from.subject" DataType="DT_WSTR" Length="1000" />
        <Column Label="via_source_from_channel" Name="via.source.from.channel" DataType="DT_WSTR" Length="50" />
        <Column Name="custom_fields" Label="custom_field_[$parent.id$]" Expand="True" 
                DataEndPoint="get_ticket_fields" DataEndPointParameters="Filter=$.ticket_fields[?(@removable==true)]"
                ValueTemplate="&lt;&lt;{$value$}|~|$.data[?(@id==[$parent.id$])].value,FUN_JSON_TO_TEXT&gt;&gt;"
                />        
      </OutputColumns>
      <InputColumns>
        <Column Name="subject" DataType="DT_WSTR" Length="1012" />
        <Column Name="recipient" DataType="DT_WSTR" Length="255" />
        <Column Name="status" DataType="DT_WSTR" Length="28" Example="new, open, pending, solved, closed" />
        <Column Name="type" DataType="DT_WSTR" Length="255" />
        <Column Name="priority" DataType="DT_WSTR" Length="24" />
        <Column Name="comment_body" DataType="DT_NTEXT" />
        <Column Name="comment_body_html" DataType="DT_NTEXT" />
        <Column Name="comment_public" DataType="DT_BOOL" />
        <Column Name="comment_author_id" DataType="DT_I8" />

        <Column Name="tags" DataType="DT_WSTR" Length="1000" Raw="True" Example="[&quot;red&quot;, &quot;blue&quot;]"/>
        <Column Name="custom_fields" DataType="DT_WSTR" Length="1000" Raw="True" Example="[{&quot;id&quot;: 36001,&quot;value&quot;: 111}, {&quot;id&quot;: 36002,&quot;value&quot;: &quot;abcd&quot;}]"/>
        
        <Column Name="external_id" DataType="DT_WSTR" Length="255" />
        <Column Name="requester_name" DataType="DT_WSTR" Length="255"/>
        <Column Name="requester_email" DataType="DT_WSTR" Length="255"/>
        <Column Name="requester_id" DataType="DT_I8" />

        <Column Name="submitter_id" DataType="DT_I8" />
        <Column Name="assignee_id" DataType="DT_I8" />
        <Column Name="organization_id" DataType="DT_I8" />
        <Column Name="group_id" DataType="DT_I8" />
        <Column Name="collaborator_ids" DataType="DT_WSTR" Length="1000" Example="[111000, 222000]"/>
        <Column Name="follower_ids" DataType="DT_WSTR" Length="1000" Raw="True" Example="[111000, 222000]"/>
        <Column Name="email_cc_ids" DataType="DT_WSTR" Length="1000" Raw="True" Example="[111000, 222000]"/>
        <Column Name="forum_topic_id" DataType="DT_WSTR" Length="255" />
        <Column Name="problem_id" DataType="DT_WSTR" Length="255" />
        <Column Name="is_public" DataType="DT_BOOL"  />
        <Column Name="due_at" DataType="DT_DBTIMESTAMP"  />
        <Column Name="sharing_agreement_ids" DataType="DT_WSTR" Length="255" Raw="True" Example="[111000, 222000]"/>
        <Column Name="fields" DataType="DT_WSTR" Length="1000" Raw="True"/>
        <Column Name="followup_ids" DataType="DT_WSTR" Length="1000" Raw="True" Example="[111000, 222000]"/>
        <Column Name="brand_id" DataType="DT_I8" />
        <Column Name="allow_channelback" DataType="DT_BOOL" />
        <Column Name="allow_attachments" DataType="DT_BOOL" />
      </InputColumns>

    </EndPoint>

    <EndPoint Name="tp_ticket_bulk">
      <InputColumns>
        <Column Name="subject" DataType="DT_WSTR" Length="1012" />
        <Column Name="recipient" DataType="DT_WSTR" Length="255" />
        <Column Name="status" DataType="DT_WSTR" Length="28" Example="new, open, pending, solved, closed" />
        <Column Name="type" DataType="DT_WSTR" Length="255" />
        <Column Name="priority" DataType="DT_WSTR" Length="24" />
        <Column Name="comment_body" DataType="DT_NTEXT" />
		<Column Name="comment_body_html" DataType="DT_NTEXT" />
        <Column Name="comment_public" DataType="DT_BOOL" />
		<Column Name="comment_author_id" DataType="DT_I8" />

        <Column Name="tags" DataType="DT_WSTR" Length="1000" Raw="True" Example="[&quot;red&quot;, &quot;blue&quot;]"/>
        <Column Name="additional_tags" DataType="DT_WSTR" Length="1000" Raw="True" Example="[&quot;red&quot;, &quot;blue&quot;]"/>
        <Column Name="remove_tags" DataType="DT_WSTR" Length="1000" Raw="True"  Example="[&quot;red&quot;, &quot;blue&quot;]"/>
        <Column Name="custom_fields" DataType="DT_WSTR" Length="1000" Raw="True" Example="[{&quot;id&quot;: 36001,&quot;value&quot;: 111}, {&quot;id&quot;: 36002,&quot;value&quot;: &quot;abcd&quot;}]"/>

        <Column Name="external_id" DataType="DT_WSTR" Length="255" />
        <Column Name="requester_name" DataType="DT_WSTR" Length="255"/>
        <Column Name="requester_email" DataType="DT_WSTR" Length="255"/>
        <Column Name="requester_id" DataType="DT_I8" />

        <Column Name="submitter_id" DataType="DT_I8" />
        <Column Name="assignee_id" DataType="DT_I8" />
        <Column Name="organization_id" DataType="DT_I8" />
        <Column Name="group_id" DataType="DT_I8" />
        <Column Name="collaborator_ids" DataType="DT_WSTR" Length="1000" Example="[111000, 222000]" />
        <Column Name="follower_ids" DataType="DT_WSTR" Length="1000" Raw="True" Example="[111000, 222000]" />
        <Column Name="email_cc_ids" DataType="DT_WSTR" Length="1000" Raw="True" Example="[111000, 222000]" />
        <Column Name="forum_topic_id" DataType="DT_WSTR" Length="255" />
        <Column Name="problem_id" DataType="DT_WSTR" Length="255" />
        <Column Name="is_public" DataType="DT_BOOL"  />
        <Column Name="due_at" DataType="DT_DBTIMESTAMP"  />
        <Column Name="sharing_agreement_ids" DataType="DT_WSTR" Length="255" Raw="True" Example="[111000, 222000]" />
        <Column Name="fields" DataType="DT_WSTR" Length="1000" Raw="True" />
        <Column Name="followup_ids" DataType="DT_WSTR" Length="1000" Raw="True" Example="[111000, 222000]" />
        <Column Name="brand_id" DataType="DT_I8" />
        <Column Name="allow_channelback" DataType="DT_BOOL" />
        <Column Name="allow_attachments" DataType="DT_BOOL" />
      </InputColumns>

    </EndPoint>

    <EndPoint Name="tp_count">
      <OutputColumns>
        <Column Name="value" DataType="DT_I8" />
        <Column Name="refreshed_at" DataType="DT_DBTIMESTAMP" />
      </OutputColumns>
    </EndPoint>


    <EndPoint Name="tp_comment">
      <Params>
        <Param Name="EnableArrayFlattening" Value="True" Type="Property" Desc="Enables deep array flattening for selected filtered hierarchy. When you turn on this property it will flatten each property of each array item and expose as column (e.g. If you have array property called tags and value is ['red','blue','yellow'] and if you turn on array flatterning then may see columns tags.1, tags.2, tags.3... tags.N in the output. You can control how many array items you want to flatten by setting MaxArrayItemsToFlatten property." />
      </Params>
      <OutputColumns>
        <Column Name="id" DataType="DT_I8" />
        <Column Name="author_id" DataType="DT_I8" />
        <Column Name="body" DataType="DT_NTEXT"  />
        <Column Name="plain_body" DataType="DT_NTEXT"  />
        <Column Name="html_body" DataType="DT_NTEXT"  />
        <Column Name="created_at" DataType="DT_DBTIMESTAMP" />
        <Column Name="attachments" DataType="DT_WSTR" Length="4000" />
        <Column Name="type" DataType="DT_WSTR" Length="100" />
        <Column Name="public" DataType="DT_BOOL" />

        <Column Label="attachments_1_id" Name="attachments.1.id" DataType="DT_I8" />
        <Column Label="attachments_2_id" Name="attachments.2.id" DataType="DT_I8" />
        <Column Label="attachments_3_id" Name="attachments.3.id" DataType="DT_I8" />
        <Column Label="attachments_4_id" Name="attachments.4.id" DataType="DT_I8" />
        <Column Label="attachments_5_id" Name="attachments.5.id" DataType="DT_I8" />

        <Column Label="attachments_1_file_name" Name="attachments.1.file_name" DataType="DT_WSTR" Length="255" />
        <Column Label="attachments_2_file_name" Name="attachments.2.file_name" DataType="DT_WSTR" Length="255" />
        <Column Label="attachments_3_file_name" Name="attachments.3.file_name" DataType="DT_WSTR" Length="255" />
        <Column Label="attachments_4_file_name" Name="attachments.4.file_name" DataType="DT_WSTR" Length="255" />
        <Column Label="attachments_5_file_name" Name="attachments.5.file_name" DataType="DT_WSTR" Length="255" />

        <Column Label="attachments_1_content_url" Name="attachments.1.content_url" DataType="DT_WSTR" Length="500" />
        <Column Label="attachments_2_content_url" Name="attachments.2.content_url" DataType="DT_WSTR" Length="500" />
        <Column Label="attachments_3_content_url" Name="attachments.3.content_url" DataType="DT_WSTR" Length="500" />
        <Column Label="attachments_4_content_url" Name="attachments.4.content_url" DataType="DT_WSTR" Length="500" />
        <Column Label="attachments_5_content_url" Name="attachments.5.content_url" DataType="DT_WSTR" Length="500" />

        <Column Label="via_channel" Name="via.channel" DataType="DT_WSTR" Length="100" />
        <Column Label="via_source_rel" Name="via.source.rel" DataType="DT_WSTR" Length="255" />
        <Column Label="via_source_from_address" Name="via.source.from.address" DataType="DT_WSTR" Length="500" />
        <Column Label="via_source_from_name" Name="via.source.from.name" DataType="DT_WSTR" Length="500" />
        <Column Label="via_source_from_original_recipients" Name="via.source.from.original_recipients" DataType="DT_WSTR" Length="2000" />

        <Column Label="via_source_to_name" Name="via.source.to.name" DataType="DT_WSTR" Length="500" />
        <Column Label="via_source_to_address" Name="via.source.to.address" DataType="DT_WSTR" Length="500" />
      </OutputColumns>
      <InputColumns>
        <Column Name="author_id" DataType="DT_I8" />
        <Column Name="body" DataType="DT_NTEXT"  />
      </InputColumns>

    </EndPoint>

    <EndPoint Name="tp_attachment">
      <Params>
        <Param Name="EnableArrayFlattening" Value="True" Type="Property" Desc="Enables deep array flattening for selected filtered hierarchy. When you turn on this property it will flatten each property of each array item and expose as column (e.g. If you have array property called tags and value is ['red','blue','yellow'] and if you turn on array flatterning then may see columns tags.1, tags.2, tags.3... tags.N in the output. You can control how many array items you want to flatten by setting MaxArrayItemsToFlatten property." />
      </Params>
      <OutputColumns>
        <Column Name="id" DataType="DT_I8" />
        <Column Name="file_name" DataType="DT_WSTR" Length="255" />
        <Column Name="content_url" DataType="DT_WSTR"  Length="500"  />
        <Column Name="mapped_content_url" DataType="DT_WSTR" Length="500" />
        <Column Name="content_type" DataType="DT_WSTR" Length="255"  />
        <Column Name="size" DataType="DT_I4"  />
        <Column Name="width" DataType="DT_I4"  />
        <Column Name="height" DataType="DT_I4"  />
        <Column Name="inline" DataType="DT_BOOL"  />
        <Column Name="deleted" DataType="DT_BOOL"  />
        <Column Name="thumbnails" DataType="DT_WSTR" Length="4000"/>
      </OutputColumns>
    </EndPoint>


	<EndPoint Name="tp_user_base">
      <LayoutMap>
        <![CDATA[<?xml version="1.0" encoding="utf-8"?>
<settings>
	<dataset id="root" readfrominput="True" />
	<map name="id" src="id"  /> 
	<map name="email" src="email"  />
	<map name="name" src="name"/>
	<map name="active" src="active"  />
	<map name="custom_role_id" src="custom_role_id"  />
	<map name="phone" src="phone"/>
	<map name="photo" src="photo" fragment="True" />
	<map name="remote_photo_url" src="remote_photo_url"/>
	<map name="notes" src="notes"/>
	<map name="organization_id" src="organization_id"/>
	<map name="skip_verify_email" src="skip_verify_email"/>	
	<map name="role" src="role"/>
	<map name="external_id" src="external_id"/>
	<map name="identities" src="identities"  fragment="True"/>
	<map name="alias" src="alias"/>
	<map name="default_group_id" src="default_group_id"/>
	<map name="details" src="details"/>
	<map name="locale" src="locale"/>
	<map name="locale_id" src="locale_id"/>
	<map name="moderator" src="moderator"/>
	<map name="only_private_comments" src="only_private_comments"/>

	<map name="restricted_agent" src="restricted_agent"/>
	<map name="shared_phone_number" src="shared_phone_number"/>
	<map name="signature" src="signature"/>
	<map name="suspended" src="suspended"/>
	<map name="tags" src="tags" fragment="True"/>
	<map name="ticket_restriction" src="ticket_restriction"/>
	<map name="time_zone" src="time_zone"/>
	<map name="verified" src="verified"/>
	<map name="user_fields" src="user_fields" fragment="True"/>		
</settings>]]>
      </LayoutMap>	
<!-- These are available columns for table write operations (i.e. Insert, Update, Upsert) -->
      <InputColumns>
        <Column Name="id" DataType="DT_I8"  Key="True" />
        <Column Name="name" DataType="DT_WSTR" Length="120" />
        <Column Name="email" DataType="DT_WSTR" Length="160" />
        <Column Name="alias" DataType="DT_WSTR" Length="255" />
        <Column Name="time_zone" DataType="DT_WSTR" Length="104" />
        <Column Name="phone" DataType="DT_WSTR" Length="80" />
        <Column Name="shared_phone_number" DataType="DT_BOOL" />
        <Column Name="photo_id" DataType="DT_WSTR" Length="1020" />
        <Column Name="locale_id" DataType="DT_I8" />
        <Column Name="locale" DataType="DT_WSTR" Length="20" />
        <Column Name="organization_id" DataType="DT_I8" />
		<Column Name="organization_name" DataType="DT_WSTR" Length="200"/>
        <Column Name="role" DataType="DT_WSTR" Length="100" Example="end-user or agent or admin"/>
        <Column Name="verified" DataType="DT_BOOL" />
        <Column Name="external_id" DataType="DT_WSTR" Length="500" />
        <Column Name="tags" DataType="DT_WSTR" Length="4000" Raw="True"/>

        <Column Name="signature" DataType="DT_WSTR" Length="4000" />
        <Column Name="details" DataType="DT_WSTR" Length="4000" />
        <Column Name="notes" DataType="DT_WSTR" Length="4000" />
		<Column Name="remote_photo_url" DataType="DT_WSTR" Length="4000" />
		
        <Column Name="custom_role_id" DataType="DT_I8" />
        <Column Name="moderator" DataType="DT_BOOL" />
		
        <Column Name="ticket_restriction" DataType="DT_WSTR" Length="80" Example="" />
        <Column Name="only_private_comments" DataType="DT_BOOL" />
        <Column Name="restricted_agent" DataType="DT_BOOL" />
        <Column Name="suspended" DataType="DT_BOOL" />
        <Column Name="default_group_id" DataType="DT_I8" />
        <Column Name="photo" DataType="DT_WSTR" Raw="True" />
		<Column Name="user_fields" DataType="DT_WSTR" Raw="True" Length="4000"/>
		<Column Name="identities" DataType="DT_WSTR" Raw="True" Length="4000"/>
      </InputColumns>	  
	</EndPoint>
	
    <EndPoint Name="tp_user" Template="tp_user_base" JsonRowFormat="Multicontent">
      <Params>
        <Param Name="EnableArrayFlattening" Value="True" Type="Property" Desc="Enables deep array flattening for selected filtered hierarchy. When you turn on this property it will flatten each property of each array item and expose as column (e.g. If you have array property called tags and value is ['red','blue','yellow'] and if you turn on array flatterning then may see columns tags.1, tags.2, tags.3... tags.N in the output. You can control how many array items you want to flatten by setting MaxArrayItemsToFlatten property." />
		<Param Name="ContineOn404Error" Type="Property" Value="True" />
      </Params>	  
      <OutputColumns>
        <Column Name="id" DataType="DT_I8" Key="True" />
        <Column Name="name" DataType="DT_WSTR" Length="255" />
        <Column Name="email" DataType="DT_WSTR" Length="500" />
		<Column Name="active" DataType="DT_BOOL" />
		<Column Name="role" DataType="DT_WSTR" Length="32" />
        <Column Name="created_at" DataType="DT_DBTIMESTAMP" />
        <Column Name="updated_at" DataType="DT_DBTIMESTAMP" />
        <Column Name="time_zone" DataType="DT_WSTR" Length="100" />
        <Column Name="iana_time_zone" DataType="DT_WSTR" Length="100" />
        <Column Name="phone" DataType="DT_WSTR" Length="100" />
		<Column Name="url" DataType="DT_WSTR" Length="500" />
        <Column Name="shared_phone_number" DataType="DT_BOOL" />
        <Column Name="locale_id" DataType="DT_I8" />
        <Column Name="locale" DataType="DT_WSTR" Length="20" />
        <Column Name="organization_id" DataType="DT_I8" />
        
        <Column Name="role_type" DataType="DT_I8" />
        <Column Name="verified" DataType="DT_BOOL" />
        <Column Name="external_id" DataType="DT_WSTR" Length="500" />
        <Column Name="tags" DataType="DT_WSTR" Length="1000" />
        <Column Name="tags.1" Label="tags_1" DataType="DT_WSTR" Length="50" />
        <Column Name="tags.2" Label="tags_2" DataType="DT_WSTR" Length="50" />
        <Column Name="tags.3" Label="tags_3" DataType="DT_WSTR" Length="50" />
        <Column Name="tags.4" Label="tags_4" DataType="DT_WSTR" Length="50" />
        <Column Name="tags.5" Label="tags_5" DataType="DT_WSTR" Length="50" />		
        <Column Name="alias" DataType="DT_WSTR" Length="255" />
        <Column Name="shared" DataType="DT_BOOL" />
        <Column Name="shared_agent" DataType="DT_BOOL" />
        <Column Name="last_login_at" DataType="DT_DBTIMESTAMP" />
        <Column Name="two_factor_auth_enabled" DataType="DT_BOOL" />
        <Column Name="signature" DataType="DT_WSTR" Length="80" />
        <Column Name="details" DataType="DT_WSTR" Length="4000" />
        <Column Name="notes" DataType="DT_WSTR" Length="4000" />
        
        <Column Name="custom_role_id" DataType="DT_I8" />
        <Column Name="moderator" DataType="DT_BOOL" />
        <Column Name="ticket_restriction" DataType="DT_WSTR" Length="80" />
        <Column Name="only_private_comments" DataType="DT_BOOL" />
        <Column Name="restricted_agent" DataType="DT_BOOL" />
        <Column Name="suspended" DataType="DT_BOOL" />
        <Column Name="default_group_id" DataType="DT_I8" />
        <Column Name="report_csv" DataType="DT_BOOL" />
        <Column Name="photo.url" Label="photo_url" DataType="DT_WSTR" Length="500" />
        <Column Name="photo.id" Label="photo_id" DataType="DT_I8" />
        <Column Name="photo.file_name" Label="photo_file_name" DataType="DT_WSTR" Length="148" />
        <Column Name="photo.content_url" Label="photo_content_url" DataType="DT_WSTR" Length="500" />
        <Column Name="photo.mapped_content_url" Label="photo_mapped_content_url" DataType="DT_WSTR" Length="500" />
        <Column Name="photo.content_type" Label="photo_content_type" DataType="DT_WSTR" Length="40" />
        <Column Name="photo.size" Label="photo_size" DataType="DT_I8" />
        <Column Name="photo.width" Label="photo_width" DataType="DT_I8" />
        <Column Name="photo.height" Label="photo_height" DataType="DT_I8" />
        <Column Name="photo.inline" Label="photo_inline" DataType="DT_BOOL" />
        <Column Name="photo.deleted" Label="photo_deleted" DataType="DT_BOOL" />
        <Column Name="photo.thumbnails" Label="photo_thumbnails" DataType="DT_WSTR" Length="4000" />
		<Column Name="user_fields.[$parent.key$]" 
			Label="user_field_dt_[$parent.key$]" 
			Expand="True" 
			DataEndPoint="get_user_fields" 
			DataEndPointParameters="Filter=$.user_fields[?(@type=='date')]"
			ColumnInfoMap="DataType=type"
			DataTypeMap="DT_DBTIMESTAMP=date"
			ValueTemplate="&lt;&lt;{$value$},FUN_TO_UTC_DATE&gt;&gt;"
		/>
		<Column Name="user_fields.[$parent.key$]" 
			Label="user_field_[$parent.key$]" 
			Expand="True" 
			DataEndPoint="get_user_fields" 
			DataEndPointParameters="Filter=$.user_fields[?(@type!='date')]"
		/>
      </OutputColumns>
      
    </EndPoint>

    <EndPoint Name="tp_user_bulk" Template="tp_user_base">

    </EndPoint>	
    
	<EndPoint Name="tp_organization_base">
  <LayoutMap>
        <![CDATA[<?xml version="1.0" encoding="utf-8"?>
<settings>
	<dataset id="root" readfrominput="True" />
	<map name="id" src="id"  /> 
	<map name="name" src="name"/>
	<map name="notes" src="notes"/>	
	<map name="external_id" src="external_id"/>
	<map name="group_id" src="group_id"/>	
	<map name="details" src="details"/>
	<map name="tags" src="tags" fragment="True"/>
	<map name="organization_fields" src="organization_fields" fragment="True"/>
	<map name="domain_names" src="domain_names" fragment="True"/>
	<map name="shared_comments" src="shared_comments"/>
	<map name="shared_tickets" src="shared_tickets"/>
</settings>]]>
      </LayoutMap>		
      <!-- These are available columns for table write operations (i.e. Insert, Update, Upsert) -->
      <InputColumns>
        <Column Name="id" DataType="DT_I8" Key="True" />
        <Column Name="name" DataType="DT_WSTR" Length="500" />
        <Column Name="notes" DataType="DT_WSTR" Length="4000" />
        <Column Name="external_id" DataType="DT_WSTR" Length="500" />
        <Column Name="group_id" DataType="DT_I8" />
        <Column Name="details" DataType="DT_WSTR" Length="4000" />
		<Column Name="tags" DataType="DT_WSTR" Length="4000"  Raw="True" />
		<Column Name="organization_fields" DataType="DT_WSTR" Length="4000"  Raw="True" />
        <Column Name="domain_names" DataType="DT_WSTR" Length="1000" Raw="True" />
        <Column Name="shared_comments" DataType="DT_BOOL" />
        <Column Name="shared_tickets" DataType="DT_BOOL" />
      </InputColumns>	
	</EndPoint>
    <EndPoint Name="tp_organization" Template="tp_organization_base"  JsonRowFormat="Multicontent">
      <Params>
        <Param Name="EnableArrayFlattening" Value="True" Type="Property" Desc="Enables deep array flattening for selected filtered hierarchy. When you turn on this property it will flatten each property of each array item and expose as column (e.g. If you have array property called tags and value is ['red','blue','yellow'] and if you turn on array flatterning then may see columns tags.1, tags.2, tags.3... tags.N in the output. You can control how many array items you want to flatten by setting MaxArrayItemsToFlatten property." />
		<Param Name="ContineOn404Error" Type="Property" Value="True" />
      </Params>
      <OutputColumns>
        <Column Name="id" DataType="DT_I8" />
        <Column Name="name" DataType="DT_WSTR" Length="500" />
        <Column Name="notes" DataType="DT_WSTR" Length="4000" />
        <Column Name="created_at" DataType="DT_DBTIMESTAMP" />
        <Column Name="details" DataType="DT_WSTR" Length="4000" />
        <Column Name="domain_names" DataType="DT_WSTR" Length="144" />
        <Column Name="domain_names.1" Label="domain_names_1" DataType="DT_WSTR" Length="255" />
        <Column Name="domain_names.2" Label="domain_names_2" DataType="DT_WSTR" Length="255" />
        <Column Name="domain_names.3" Label="domain_names_3" DataType="DT_WSTR" Length="255" />

        <Column Name="external_id" DataType="DT_WSTR" Length="500" />
        <Column Name="group_id" DataType="DT_I8" />

        <Column Name="shared_comments" DataType="DT_BOOL" />
        <Column Name="shared_tickets" DataType="DT_BOOL" />
        <Column Name="tags" DataType="DT_WSTR" Length="144" />
        <Column Name="tags.1" Label="tags_1" DataType="DT_WSTR" Length="500" />
        <Column Name="tags.2" Label="tags_2" DataType="DT_WSTR" Length="500" />
        <Column Name="tags.3" Label="tags_3" DataType="DT_WSTR" Length="500" />
        <Column Name="tags.4" Label="tags_4" DataType="DT_WSTR" Length="500" />
        <Column Name="tags.5" Label="tags_5" DataType="DT_WSTR" Length="500" />
        <Column Name="updated_at" DataType="DT_DBTIMESTAMP" />
        <Column Name="url" DataType="DT_WSTR" Length="500" />
		<Column Name="organization_fields.[$parent.key$]" 
			Label="organization_field_dt_[$parent.key$]" 
			Expand="True" 
			DataEndPoint="get_organization_fields" 
			DataEndPointParameters="Filter=$.organization_fields[?(@type=='date')]"
			ColumnInfoMap="DataType=type"
			DataTypeMap="DT_DBTIMESTAMP=date"
			ValueTemplate="&lt;&lt;{$value$},FUN_TO_UTC_DATE&gt;&gt;"
		/>
		<Column Name="organization_fields.[$parent.key$]" 
			Label="organization_field_[$parent.key$]" 
			Expand="True" 
			DataEndPoint="get_organization_fields" 
			DataEndPointParameters="Filter=$.organization_fields[?(@type!='date')]"
			ColumnInfoMap="DataType=type"
			DataTypeMap="DT_I8=integer;DT_R8=decimal;"			
		/>		
      </OutputColumns>

    </EndPoint>
    <EndPoint Name="tp_organization_bulk" Template="tp_organization_base">

    </EndPoint>		
	
  </Template>
  
  <EndPoints>
    <EndPoint Group="Tickets" Name="get_tickets" Template="tp_ticket" Label="Read Tickets (All)" Desc="Get a list of all tickets in your account"
              Url="/tickets.json" Filter="$.tickets[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/tickets#list-tickets">
      <Params>
        <Param Name="sort_by" Label="Sort By" Type="Query" Desc="Sort By field" Options=";id;assignee;assignee.name;created_at;group;locale;requester;requester.name;status;subject;updated_at"/>
        <Param Name="sort_order" Label="Sort Order" Type="Query" Desc="Sort order" Options=";desc;asc"/>
        <Param Name="include" Label="Extra Columns to Include" Type="Query"  Options="Default=;comment_count=comment_count"/>
        <Param Name="external_id" Label="External ID for Ticket" Type="Query" />
      </Params>
    </EndPoint>

    <EndPoint Group="Tickets" Name="get_tickets_incr" Template="tp_ticket" Label="Read Tickets changed after date (Incremental)" Desc="Get a list of tickets changed after specified date/time"
              Url="/incremental/tickets.json" Filter="$.tickets[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/incremental_export">
      <Params>
        <Param Name="start_time" Label="Start Time (e.g. yyyy-MM-dd -OR- yyyy-MM-ddTHH:mm:ss)" Type="Query"
            Desc="Start DateTime for data fetch. Tickets modified after this date/time is fetched. You can enter date in yyyy-MM-dd or yyyy-MM-ddTHH:mm:ss format. You can also use functions to get date. 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)"
            Options="today;yesterday;monthstart;monthend;yearstart;yearend;weekstart;weekend;yearstart-1y;yearend-1y;monthstart-1d;monthend+1d;2022-01-31;2022-01-31 23:59:59" 
            ValueTemplate="&lt;&lt;{$value$}||unix_timestamp,FUN_TO_DATETIME&gt;&gt;" 
            Required="True"/>
			
        <Param Name="NextUrlEndIndicator" Type="Property" Value="true" />
        <Param Name="StopIndicatorAttributeOrExpr" Type="Property" Value="$.end_of_stream" />

      </Params>
    </EndPoint>

    <EndPoint Group="Tickets" Name="get_tickets_by_ids" Template="tp_ticket"
              RequestFormat="Csv" Label="Read Ticket(s) by ID" Desc="Get a list of all tickets in your account"
              Url="/tickets/show_many.json?ids=[$ticket_ids$]" BatchSize="100" Filter="$.tickets[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/tickets#show-ticket">
      <Params>
        <Param Name="ticket_ids"
               Label="Ticket ID(S) - Use Comma for multiple (e.g. 111,222)"
               Required="True"
               Functions="{$rows$}"
               OptionsEndPoint="get_tickets"
               OptionsEndPointValueColumn="id"
               MultiSelectSeparator=","
               MultiSelect="True"
               MultiSelectForPreview="True"
               MultiSelectLimit="100"
               IsKey="True"
               ReadAs="Id"
               DataType="DT_I4"
      />
      </Params>
      <LayoutMap>
        <![CDATA[<?xml version="1.0" encoding="utf-8"?>
<settings>
  <dataset id="root" readfrominput="True" format="Csv"/>
    <map src="$$ticket_ids" name="$$ticket_ids" />    
</settings>]]>
      </LayoutMap>

      <InputColumns>
        <Column Name="$$ticket_ids" DataType="DT_WSTR" Length="2000" Example="111,222,333"/>
      </InputColumns>
    </EndPoint>

    <EndPoint Group="Tickets" Name="get_users_by_ids" Template="tp_user"
              RequestFormat="Csv" Label="Read User(s) by ID" Desc="Get a list of users in your account for specific id(s)"
              Url="/users/show_many.json?ids=[$user_ids$]" BatchSize="100" Filter="$.users[*]" HelpLink="https://developer.zendesk.com/api-reference/ticketing/users/users/#show-many-users">
      <Params>
        <Param Name="user_ids"
               Label="User ID(S) - Use Comma for multiple (e.g. 111,222)"
               Required="True"
               Functions="{$rows$}"
               OptionsEndPoint="get_users"
               OptionsEndPointNameColumn="email"
               OptionsEndPointValueColumn="id"
               MultiSelectSeparator=","
               MultiSelect="True"
               MultiSelectForPreview="True"
               MultiSelectLimit="100"
               IsKey="True"
               ReadAs="Id"
               DataType="DT_I4"
      />
      </Params>
      <LayoutMap>
        <![CDATA[<?xml version="1.0" encoding="utf-8"?>
<settings>
  <dataset id="root" readfrominput="True" format="Csv"/>
    <map src="$$ticket_ids" name="$$ticket_ids" />    
</settings>]]>
      </LayoutMap>

      <InputColumns>
        <Column Name="$$user_ids" DataType="DT_WSTR" Length="2000" Example="111,222,333"/>
      </InputColumns>
    </EndPoint>

    <EndPoint Group="Tickets" Name="get_organizations_by_ids" Template="tp_organization"
              RequestFormat="Csv" Label="Read Organization(s) by ID" Desc="Get a list of organizations in your account for specific id(s)"
              Url="/organizations/show_many.json?ids=[$organization_ids$]" BatchSize="100" Filter="$.organizations[*]" HelpLink="https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/#show-many-organizations">
      <Params>
        <Param Name="organization_ids"
               Label="Organization ID(S) - Use Comma for multiple (e.g. 111,222)"
               Required="True"
               Functions="{$rows$}"
               OptionsEndPoint="get_organizations"
               OptionsEndPointNameColumn="name"
               OptionsEndPointValueColumn="id"
               MultiSelectSeparator=","
               MultiSelect="True"
               MultiSelectForPreview="True"
               MultiSelectLimit="100"
               IsKey="True"
               ReadAs="Id"
               DataType="DT_I4"
      />
      </Params>
      <LayoutMap>
        <![CDATA[<?xml version="1.0" encoding="utf-8"?>
<settings>
  <dataset id="root" readfrominput="True" format="Csv"/>
    <map src="$$ticket_ids" name="$$ticket_ids" />    
</settings>]]>
      </LayoutMap>

      <InputColumns>
        <Column Name="$$organization_ids" DataType="DT_WSTR" Length="2000" Example="111,222,333"/>
      </InputColumns>
    </EndPoint>

    <EndPoint Group="Tickets" Name="get_tickets_by_org" Template="tp_ticket" Label="Read Tickets for Organization" Desc="Get all tickets for specified organization_id"
              Url="/organizations/[$organization_id$]/tickets.json" Filter="$.tickets[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/tickets#list-tickets">
      <Params>
        <Param Name="organization_id" Label="Organization ID" Required="True"/>
      </Params>
    </EndPoint>

    <EndPoint Group="Tickets" Name="get_tickets_for_user_requested" Template="tp_ticket" Label="Read Tickets for User (Requested)" Desc="Get all requested tickets for specified user_id"
              Url="/users/[$user_id$]/tickets/requested.json" Filter="$.tickets[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/tickets#list-tickets">
      <Params>
        <Param Name="user_id" Label="User ID" Required="True"/>
      </Params>
    </EndPoint>
    <EndPoint Group="Tickets" Name="get_tickets_for_user_cced" Template="tp_ticket" Label="Read Tickets for User (CCed)" Desc="Get all CCed tickets for specified user_id"
              Url="/users/[$user_id$]/tickets/ccd.json" Filter="$.tickets[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/tickets#list-tickets">
      <Params>
        <Param Name="user_id" Label="User ID" Required="True"/>
      </Params>
    </EndPoint>
    <EndPoint Group="Tickets" Name="get_tickets_for_user_assigned" Template="tp_ticket" Label="Read Tickets for User (Assigned)" Desc="Get all assigned tickets for specified user_id"
              Url="/users/[$user_id$]/tickets/assigned.json" Filter="$.tickets[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/tickets#list-tickets">
      <Params>
        <Param Name="user_id" Label="User ID" Required="True"/>
      </Params>
    </EndPoint>
    <EndPoint Group="Tickets" Name="get_tickets_recent" Template="tp_ticket" Label="Read Tickets (Recent)" Desc="Get all recent tickets"
              Url="/tickets/recent.json" Filter="$.tickets[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/tickets#list-tickets">
    </EndPoint>

    <EndPoint Group="Tickets" Name="get_tickets_count" Template="tp_count" Label="Read Tickets Count (All)" Desc="Returns an approximate count of tickets in the account. If the count exceeds 100,000, it is updated every 24 hours. The count[refreshed_at] property is a timestamp that indicates when the count was last updated. Note: When the count exceeds 100,000, count[refreshed_at] may occasionally be null. This indicates that the count is being updated in the background, and count[value] is limited to 100,000 until the update is complete."
              Url="/tickets/count.json" Filter="$.count" HelpLink="https://developer.zendesk.com/rest_api/docs/support/tickets#count-tickets">

    </EndPoint>
    <EndPoint Group="Tickets" Name="get_tickets_count_org" Template="tp_count" Label="Read Tickets Count (for Organization)" Desc="Returns an approximate count of tickets for specified organization_id. If the count exceeds 100,000, it is updated every 24 hours. The count[refreshed_at] property is a timestamp that indicates when the count was last updated. Note: When the count exceeds 100,000, count[refreshed_at] may occasionally be null. This indicates that the count is being updated in the background, and count[value] is limited to 100,000 until the update is complete."
              Url="/organizations/[$organization_id$]/tickets/count.json" Filter="$.count" HelpLink="https://developer.zendesk.com/rest_api/docs/support/tickets#list-tickets">
      <Params>
        <Param Name="organization_id" Label="Organization ID" Required="True"/>
      </Params>
    </EndPoint>
    <EndPoint Group="Tickets" Name="get_ticket_metrics" Label="Read Ticket Metrics" Desc="Returns a list of tickets with their metrics.."
              Url="/ticket_metrics.json" Filter="$.ticket_metrics[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/ticket_metrics">

    </EndPoint>
    
    <EndPoint Group="Fields" Name="get_ticket_fields" Label="Read Ticket Fields" CachedTtl="120" Desc="Returns a list of all system and custom ticket fields in your account. For accounts without access to multiple ticket forms, positions can be changed using the Update Ticket Field endpoint or the Ticket Forms page in Zendesk Support (Admin > Manage > Ticket Forms). The Ticket Forms page shows the fields for the account. The order of the fields is used in the different products to show the field values in the tickets."
              Url="/ticket_fields.json" HelpLink="https://developer.zendesk.com/rest_api/docs/support/ticket_fields#list-ticket-fields">
      <Params>
        <Param Name="Filter" Type="Property" Value="$.ticket_fields[*]" Options="All fields=$.ticket_fields[*];System fields=$.ticket_fields[?(@removable==false)];Custom Fields=$.ticket_fields[?(@removable==true)]"/>
      </Params>
    </EndPoint>

    <EndPoint Group="Forms" Name="get_ticket_forms" Label="Read Ticket Forms" Desc="Returns a list of all ticket forms for your account if accessed as an admin or agent. End users only see ticket forms that have end_user_visible set to true."
              Url="/ticket_forms.json" Filter="$.ticket_forms[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/ticket_forms#list-ticket-forms">

    </EndPoint>

    <EndPoint Group="Comments" Name="get_ticket_comments" Template="tp_comment" Label="Read Ticket Comments" Desc="Returns comments for specified ticket ID."
              Url="/tickets/[$ticket_id$]/comments.json" Filter="$.comments[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/ticket_comments">
      <Params>
        <Param Name="ticket_id" Label="Ticket ID" Required="True"/>
        <Param Name="sort_order" Label="Sort Order" Type="Query" Desc="Sort order" Options=";desc;asc"/>
        <Param Name="include_inline_images" Label="Include inline images" Type="Query" Desc="Default is false. When true, inline images are also listed as attachments in the response" Options=";false;true"/>
      </Params>
    </EndPoint>
    <EndPoint Group="Tickets" Name="get_ticket_attachments" Template="tp_attachment" IncludeParentColumns="True" Label="Read Ticket Attachments" Desc="Returns attachments for the specified Ticket ID."
              Url="/tickets/[$ticket_id$]/comments.json" Filter="$.comments[*].attachments[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/ticket_comments">
      <Params>
        <Param Name="ticket_id" Label="Ticket ID" Required="True"/>
        <Param Name="sort_order" Label="Sort Order" Type="Query" Desc="Sort order" Options=";desc;asc"/>
        <Param Name="include_inline_images" Label="Include inline images" Type="Query" Desc="Default is false. When true, inline images are also listed as attachments in the response" Options=";false;true"/>
      </Params>
      <OutputColumns>
        <Column Label="comment_id"  Name="P_comments_id" DataType="DT_I8" />
      </OutputColumns>
    </EndPoint>

    <EndPoint Group="Activities" Name="get_ticket_activity_stream" Label="Read Ticket ActivityStream" Desc="Lists ticket activities in the last 30 days affecting the agent making the request. The Ticket Activities API returns ticket activities by other people affecting the agent making the API request. Ticket activities include assigning a ticket to the agent, increasing the priority of a ticket assigned to the agent, or adding a comment to a ticket assigned to the agent. A possible use case for the API is building a personalized notification service for agents."
              Url="/activities.json" Filter="$.activities[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/activity_stream">
      <Params>
        <Param Name="since" Type="Query" Label="Since (ISO e.g. 2013-04-03T16:02:46Z)" Desc="return the activities since a specific date. The since parameter takes a UTC time in the ISO 8601 format. Example: '2013-04-03T16:02:46Z'." />
      </Params>
    </EndPoint>

    <EndPoint Group="Activities" Name="get_ticket_activity_info" Label="Read Ticket ActivityStream Details" Desc="Lists ticket activity details."
              Url="/activities/[$activity_id$].json" Filter="$.activities[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/activity_stream">
      <Params>
        <Param Name="activity_id" Required="True" />
      </Params>
    </EndPoint>

    <EndPoint Group="Search" Name="get_search" Label="Search Records" Desc="Search for ticket, user, organization, or group for specified search criteria. Returns max 1000 records based on search criteria (i.e. query) you specify"
              Url="/search.json" Filter="$.results[*]"
              HelpLink="https://developer.zendesk.com/rest_api/docs/support/search" MaxRows="1000">
      <Params>
        <Param Name="query" Template="t_query" />
        <Param1 Name="query" Label="Search Criteria" Desc="The search query based on this syntax https://support.zendesk.com/hc/en-us/articles/203663226" Type="query" Required="True"
               Options="Example: Search by Ticket ID=112233;Example: Search by Ticket Status=status&lt;solved;Example: Search by Text=Some Text;Example:Search tickets by created date=type:ticket created_at&gt;2024-01-09T00:00:00Z;Example:Search tickets by updated date=type:ticket updated_at&gt;2024-01-09T00:00:00Z;Example: Search by Type and Name=type:user &quot;Jane Doe&quot;;Example: Search organizations created after=type:organization created&gt;2015-05-01Example: Search organizations updated before=type:organization updated&lt;2015-05-01;Example: Search for user by email=type:user email:bob@abc.com;Example: Search for users updated after=type:user updated&lt;2015-05-01;Example: Search by Type and UpdatedDate=type:organization updated&lt;2015-05-01;Example: Search By Type and Tag=type:ticket tags:red tags:blue"
               />
        <Param Name="sort_by" Label="Sort By" Desc="" Type="Query" Options=";updated_at;created_at;priority;status;ticket_type" />
        <Param Name="sort_order" Label="Sort Order" Desc="" Type="Query" Options=";desc;asc" />
        <Param Name="include" Label="Extra Columns to Include" Desc="You can list email CCs by side-loading users." Type="Query"  Options="Default=;users=users"/>
      </Params>
    </EndPoint>


    <EndPoint Group="Organizations" Name="get_organizations_count" Template="tp_count" Label="Read Organization Count" Desc="Get organizations count."
              Url="/organizations/count.json" Filter="$.count" HelpLink="https://developer.zendesk.com/rest_api/docs/support/organizations#list-organizations">
    </EndPoint>
    <EndPoint Group="Organizations" Name="get_organization_fields" Label="Read Organization Fields" Desc="Returns a list of custom Organization Fields in your account. Fields are returned in the order that you specify in your Organization Fields configuration in Zendesk Support. Clients should cache this resource for the duration of their API usage and map the key for each Organization Field to the values returned under the organization_fields attribute on the Organization resource."
              Url="/organization_fields.json" Filter="$.organization_fields[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/organization_fields#list-organization-fields">

    </EndPoint>

    <EndPoint Group="Tags" Name="get_tags" Label="Read Tags" CachedTtl="60" Desc="Lists the 500 most popular tags in the last 60 days, in decreasing popularity. You must enable the tagging of users and organizations in Zendesk Support for the API calls to work. Select Manage > Settings > Customers, and enable the option."
              Url="/tags.json" Filter="$.tags[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/tags">
    </EndPoint>

    <EndPoint Group="Groups" Name="get_groups" CachedTtl="60" Label="Read Groups" Desc="Get information about groups."
              Url="/groups.json" Filter="$.groups[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/groups">
    </EndPoint>

    <EndPoint Group="Users" Name="get_user_fields" 
		CachedTtl="60"
		Label="Read User Fields" Desc="Returns a list of custom User Fields in your account. Fields are returned in the order that you specify in your User Fields configuration in Zendesk Support. Clients should cache this resource for the duration of their API usage and map the key for each User Field to the values returned under the user_fields attribute on the User resource."
              Url="/user_fields.json" Filter="$.user_fields[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/user_fields#list-user-fields">

		<Params>
			<Param Name="Filter" Value="$.user_fields[*]" Options="all fields=$.user_fields[*];date fields=$.user_fields[?(@type=='date')]"/>			
		</Params>
	</EndPoint>

    <EndPoint Group="Users" Name="get_me" Label="Read Current User Info" Desc="Get information for current profile based on credentials you have used."
              Url="/users/me.json" Filter="$.user" HelpLink="https://developer.zendesk.com/rest_api/docs/support/users#show-the-current-user">

    </EndPoint>
    <EndPoint Group="Brands" Name="get_brands" Label="Read Brands" Desc="Get information about brands."
              Url="/brands.json" Filter="$.brands[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/brands">
    </EndPoint>
    <EndPoint Group="Views" Name="get_views" Label="Read Views" Desc="Get information about views."
              Url="/views.json" Filter="$.views[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/views">
    </EndPoint>
    <EndPoint Group="Macros" Name="get_macros" Label="Read Macros" Desc="Get information about macros."
              Url="/macros.json" Filter="$.macros[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/macros">
    </EndPoint>
    <EndPoint Group="Sessions" Name="get_sessions" Label="Read Sessions" Desc="Get information about Sessions."
              Url="/sessions.json" Filter="$.sessions[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/sessions">
    </EndPoint>
    <EndPoint Group="Sessions" Name="get_user_sessions" Label="Read User Sessions" Desc="Get information about user sessions."
              Url="/users/[$user_id$]/sessions.json" Filter="$.sessions[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/Sessions">
      <Params>
        <Param Name="user_id" Required="True" />
      </Params>
    </EndPoint>

    <EndPoint Group="Requests" Name="get_requests" Label="Read Requests" Desc="Returns a list of requests."
              Url="/requests.json" Filter="$.requests[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/requests#list-requests">
      <Params>
        <Param Name="sort_by" Label="Sort By" Type="Query" Desc="Sort By field" Options=";updated_at;created_at"/>
        <Param Name="sort_order" Label="Sort Order" Type="Query" Desc="Sort order" Options=";desc;asc"/>
        <Param Name="status" Label="Status" Type="Query" MultiSelect="True" Desc="Sort order" Options=";new;open;pending;solved;closed"/>
      </Params>
    </EndPoint>

    <EndPoint Group="Requests" Name="get_requests_search" Label="Read Requests Search" Desc="Returns a requests using search criteria."
              Url="/requests/search.json" Filter="$.requests[*]" HelpLink="https://developer.zendesk.com/rest_api/docs/support/requests#list-requests">
      <Params>
        <Param Name="sort_by" Label="Sort By" Type="Query" Desc="Sort By field" Options=";updated_at;created_at"/>
        <Param Name="sort_order" Label="Sort Order" Type="Query" Desc="Sort order" Options=";desc;asc"/>
        <Param Name="query" Template="t_query" />
        <Param Name="status" Label="Status" Type="Query" MultiSelect="True" Desc="Sort order" Options=";new;open;pending;solved;closed"/>
        <Param Name="organization_id" Type="Query"/>
        <Param Name="cc_id" Type="Query"/>

      </Params>
    </EndPoint>

    <EndPoint Group="Attachments" Name="get_attachment" Method="GET" Label="Read Attachment" Desc="Read attachment information"
                 Url="attachments/[$attachment_id$].json" Filter="" HelpLink="https://developer.zendesk.com/rest_api/docs/support/attachments#show-attachment">
      <Params>
        <Param Name="attachment_id" Required="True" Label="Attachment ID" />
        <Param Name="EnableArrayFlattening" Value="True" Type="Property" />
      </Params>
      <OutputColumns>

        <Column Name="attachment.id" Label="attachment_id" DataType="DT_I8" />
        <Column Name="attachment.file_name" Label="attachment_file_name" DataType="DT_WSTR" Length="255" />
        <Column Name="attachment.content_url" Label="attachment_content_url" DataType="DT_WSTR" Length="500" />
        <Column Name="attachment.url" Label="attachment_url" DataType="DT_WSTR" Length="500" />
        <Column Name="attachment.content_type" Label="attachment_content_type" DataType="DT_WSTR" Length="100" />
        <Column Name="attachment.size" Label="attachment_size" DataType="DT_I8" />
        <Column Name="attachment.height" Label="attachment_height" DataType="DT_I4" />
        <Column Name="attachment.width" Label="attachment_width" DataType="DT_I4" />
        <Column Name="attachment.deleted" Label="attachment_deleted" DataType="DT_BOOL" />
        <Column Name="attachment.inline" Label="attachment_inline" DataType="DT_BOOL" />

        <Column Name="attachment.thumbnails.1.id" Label="attachment_thumbnail_id" DataType="DT_I8" />
        <Column Name="attachment.thumbnails.1.file_name" Label="attachment_thumbnail_file_name" DataType="DT_WSTR" Length="255" />
        <Column Name="attachment.thumbnails.1.content_url" Label="attachment_thumbnail_content_url" DataType="DT_WSTR" Length="500" />
        <Column Name="attachment.thumbnails.1.url" Label="attachment_thumbnail_url" DataType="DT_WSTR" Length="500" />
        <Column Name="attachment.thumbnails.1.content_type" Label="attachment_thumbnail_content_type" DataType="DT_WSTR" Length="100" />
        <Column Name="attachment.thumbnails.1.size" Label="attachment_thumbnail_size" DataType="DT_I8" />
        <Column Name="attachment.thumbnails.1.height" Label="attachment_thumbnail_height" DataType="DT_I4" />
        <Column Name="attachment.thumbnails.1.width" Label="attachment_thumbnail_width" DataType="DT_I4" />
        <Column Name="attachment.thumbnails.1.deleted" Label="attachment_thumbnail_deleted" DataType="DT_BOOL" />
        <Column Name="attachment.thumbnails.1.inline" Label="attachment_thumbnail_inline" DataType="DT_BOOL" />

      </OutputColumns>
    </EndPoint>

    <EndPoint Group="Attachments" Name="delete_attachment" Method="DELETE" Label="Delete Attachment" Desc="Delete attachment"
                 Url="attachments/[$attachment_id$].json" Filter="" HelpLink="https://developer.zendesk.com/rest_api/docs/support/attachments#delete-attachment">
      <Params>
        <Param Name="attachment_id" Required="True" Label="Attachment ID" />
        <Param Name="EnableArrayFlattening" Value="True" Type="Property" />
      </Params>
      <OutputColumns>
        <Column Name="attachment.id" Label="attachment_id" DataType="DT_I8" />
      </OutputColumns>
    </EndPoint>

    <EndPoint Group="Attachments" Name="post_attachment" Method="POST" Label="Upload Attachment (Single file)" Desc="Upload files to Zendesk which can be used as attachment later."
                 Url="uploads.json" Body="@[$path$]" IsMultiPart="True" Filter="" HelpLink="https://developer.zendesk.com/rest_api/docs/support/attachments#upload-files">
      <Params>
        <Param Name="filename" Required="True" Label="File Name" Type="Query" Desc="File name for display purpose" />
        <Param Name="path" Required="True" Label="File Path (Local)" />
        <Param Name="token" Label="Token for exising Upload Session" Type="Query" Desc="Blank if creating a new upload" />
        <Param Name="EnableArrayFlattening" Value="True" Type="Property" />
      </Params>
      <OutputColumns>
        <Column Name="upload.token" Label="token" DataType="DT_WSTR" Length="100"  />
        <Column Name="upload.expires_at" Label="expires_at" DataType="DT_DBTIMESTAMP" />

        <Column Name="upload.attachment.id" Label="attachment_id" DataType="DT_I8" />
        <Column Name="upload.attachment.file_name" Label="attachment_file_name" DataType="DT_WSTR" Length="255" />
        <Column Name="upload.attachment.content_url" Label="attachment_content_url" DataType="DT_WSTR" Length="500" />
        <Column Name="upload.attachment.url" Label="attachment_url" DataType="DT_WSTR" Length="500" />
        <Column Name="upload.attachment.content_type" Label="attachment_content_type" DataType="DT_WSTR" Length="100" />
        <Column Name="upload.attachment.size" Label="attachment_size" DataType="DT_I8" />
        <Column Name="upload.attachment.height" Label="attachment_height" DataType="DT_I4" />
        <Column Name="upload.attachment.width" Label="attachment_width" DataType="DT_I4" />
        <Column Name="upload.attachment.deleted" Label="attachment_deleted" DataType="DT_BOOL" />
        <Column Name="upload.attachment.inline" Label="attachment_inline" DataType="DT_BOOL" />

        <Column Name="upload.attachment.thumbnails.1.id" Label="attachment_thumbnail_id" DataType="DT_I8" />
        <Column Name="upload.attachment.thumbnails.1.file_name" Label="attachment_thumbnail_file_name" DataType="DT_WSTR" Length="255" />
        <Column Name="upload.attachment.thumbnails.1.content_url" Label="attachment_thumbnail_content_url" DataType="DT_WSTR" Length="500" />
        <Column Name="upload.attachment.thumbnails.1.url" Label="attachment_thumbnail_url" DataType="DT_WSTR" Length="500" />
        <Column Name="upload.attachment.thumbnails.1.content_type" Label="attachment_thumbnail_content_type" DataType="DT_WSTR" Length="100" />
        <Column Name="upload.attachment.thumbnails.1.size" Label="attachment_thumbnail_size" DataType="DT_I8" />
        <Column Name="upload.attachment.thumbnails.1.height" Label="attachment_thumbnail_height" DataType="DT_I4" />
        <Column Name="upload.attachment.thumbnails.1.width" Label="attachment_thumbnail_width" DataType="DT_I4" />
        <Column Name="upload.attachment.thumbnails.1.deleted" Label="attachment_thumbnail_deleted" DataType="DT_BOOL" />
        <Column Name="upload.attachment.thumbnails.1.inline" Label="attachment_thumbnail_inline" DataType="DT_BOOL" />
      </OutputColumns>
    </EndPoint>

    <EndPoint Group="Attachments" Name="delete_upload" Method="DELETE" Label="Delete Upload Session" Desc="Delete upload session and all its attachments."
                 Url="uploads/[$token$].json" Filter="" HelpLink="https://developer.zendesk.com/rest_api/docs/support/attachments#delete-upload">
      <Params>
        <Param Name="token" Required="True" Label="Token for exising upload"/>
      </Params>
      <OutputColumns>
        <Column Name="Response" DataType="DT_WSTR" Length="10"  />
      </OutputColumns>
    </EndPoint>

    <EndPoint Group="Tickets"
              Template="tp_ticket" Name="post_ticket"
              ContentType="application/json"
              Method="POST"
              JsonRowFormat="Multicontent"
              Label="Create Ticket (Single)" Desc="Creates one ticket at a time and wait until its created. Use BULK Table instead of this one to create multiple tickets."
              Url="/tickets.json"
              Filter="$.ticket" HelpLink="https://developer.zendesk.com/rest_api/docs/support/tickets#create-ticket"
              >

      <Body><![CDATA[{"ticket" : {$rows$} }]]></Body>
      <LayoutMap>
        <![CDATA[<?xml version="1.0" encoding="utf-8"?>
<settings>
  <dataset id="root" readfrominput="True" />
    <map src="subject" name="subject" />  
    <map name="comment">
      <map src="comment_body" name="body" />
	  <map src="comment_body_html" name="html_body" />
	  <map src="comment_author_id" name="author_id" />
      <map src="comment_public" name="public" />
    </map>  
    <map name="requester">
      <map src="requester_name" name="name" />
      <map src="requester_email" name="email" />
    </map>
    <map src="priority" name="priority" />
    <map src="status" name="status" />
    <map src="requester_id" name="requester_id" />
    <map src="submitter_id" name="submitter_id" />
    <map src="assignee_id" name="assignee_id" />
    <map src="organization_id" name="organization_id" />
    <map src="group_id" name="group_id" />
    <map src="external_id" name="external_id" />
    <map src="type" name="type" />
    <map src="collaborator_ids" name="collaborator_ids" fragment="True" />
    <map src="follower_ids" name="follower_ids" fragment="True" />
    <map src="email_cc_ids" name="email_cc_ids" fragment="True" />
    <map src="forum_topic_id" name="forum_topic_id" />
    <map src="problem_id" name="problem_id" />
    <map src="is_public" name="is_public" />
    <map src="due_at" name="due_at" />
    <map src="tags" name="tags" fragment="True" />
    <map src="custom_fields" name="custom_fields" fragment="True" />    
</settings>]]>
      </LayoutMap>
    </EndPoint>

    <EndPoint Group="Tickets" Template="tp_ticket_bulk" Name="post_tickets" Method="POST" Label="Create Tickets (Bulk)" Desc="Create tickets in bulk (job is queued) and wait until done. This is faster than one request at a time"
              Url="/tickets/create_many.json" ContentType="application/json" BatchSize="100" Filter="$.job_status" HelpLink="https://developer.zendesk.com/rest_api/docs/support/tickets#create-many-tickets">

      <Body><![CDATA[{"tickets" : {$rows$} }]]></Body>
      <LayoutMap>
        <![CDATA[<?xml version="1.0" encoding="utf-8"?>
<settings>
  <dataset id="root" readfrominput="True" />
    <map src="subject" name="subject" />  
    <map name="comment">
      <map src="comment_body" name="body" />
	  <map src="comment_body_html" name="html_body" />
	  <map src="comment_author_id" name="author_id" />
      <map src="comment_public" name="public" />
    </map>  

    <map src="priority" name="priority" />
    <map src="status" name="status" />
    <map src="requester_id" name="requester_id" />
    <map src="submitter_id" name="submitter_id" />
    <map src="assignee_id" name="assignee_id" />
    <map src="organization_id" name="organization_id" />
    <map src="group_id" name="group_id" />
    <map src="external_id" name="external_id" />
    <map src="type" name="type" />
    <map src="collaborator_ids" name="collaborator_ids" fragment="True" />
    <map src="follower_ids" name="follower_ids" fragment="True" />
    <map src="email_cc_ids" name="email_cc_ids" fragment="True" />
    <map src="forum_topic_id" name="forum_topic_id" />
    <map src="problem_id" name="problem_id" />
    <map src="is_public" name="is_public" />
    <map src="due_at" name="due_at" />
    <map src="tags" name="tags" fragment="True" />
    <map src="custom_fields" name="custom_fields" fragment="True" />    
</settings>]]>
      </LayoutMap>

      <EndPoint Url="[$parent.url$]" Method="GET" Filter="$.job_status.results[*]" IncludeParentColumns="True">
        <Params>
          <Param Name="EnableStatusCheck" Type="Property" Value="true" />
          <Param Name="StatusCheckIterationWaitSeconds" Type="Property" Value="4" />
          <Param Name="StatusCheckMaxWaitSeconds" Type="Property" Value="200" />
          <Param Name="StatusContinueValue" Type="Property" Value="queued|working" />
          <Param Name="StatusSuccessValue" Type="Property" Value="completed|failed|killed" />
        </Params>
      </EndPoint>

      <OutputColumns>
        <Column Name="P_job_status_id" Label="job_id" DataType="DT_WSTR" Length="100"/>
        <Column Name="P_job_status_message" Label="message" DataType="DT_WSTR" Length="2000"/>

        <Column Name="P_job_status_total" Label="total" DataType="DT_I4" />
        <Column Name="P_job_status_status" Label="status" DataType="DT_WSTR" Length="50" />
        <Column Name="P_job_status_url" Label="url" DataType="DT_WSTR" Length="500" />

        <Column Name="account_id" DataType="DT_I8" />
        <Column Name="id" Label="ticket_id" DataType="DT_I8" />
        <Column Name="index" DataType="DT_I4" />
      </OutputColumns>
    </EndPoint>

    <EndPoint Group="Tickets" Name="delete_tickets"
              Method="DELETE"
              RequestFormat="Csv"

              Label="Delete Tickets (Bulk)" Desc="Delete multiple tickets in a single request. This is faster than row by row operation."
              Url="/tickets/destroy_many.json?ids=[$ticket_ids$]"
              JsonRowFormat="Multicontent"
              BatchSize="100"
              Filter="$.job_status" HelpLink="https://developer.zendesk.com/rest_api/docs/support/tickets#bulk-delete-tickets">

      <Params>
        <Param Name="ticket_ids"
               Label="Ticket ID(S) - Use Comma for multiple (e.g. 111,222)"
               Required="True"
               Functions="{$rows$}"
               IsKey="True"
               ReadAs="Id"
        />
      </Params>

      <LayoutMap>
        <![CDATA[<?xml version="1.0" encoding="utf-8"?>
<settings>
  <dataset id="root" readfrominput="True"/>
    <map src="$$ticket_ids" name="$$ticket_ids" /> 
</settings>]]>
      </LayoutMap>

      <EndPoint Url="[$parent.url$]" Method="GET" Filter="$.job_status.results[*]" IncludeParentColumns="True">
        <Params>
          <Param Name="EnableStatusCheck" Type="Property" Value="true" />
          <Param Name="StatusCheckIterationWaitSeconds" Type="Property" Value="4" />
          <Param Name="StatusCheckMaxWaitSeconds" Type="Property" Value="200" />
          <Param Name="StatusContinueValue" Type="Property" Value="queued|working" />
          <Param Name="StatusSuccessValue" Type="Property" Value="completed|failed|killed" />
        </Params>
      </EndPoint>

      <InputColumns>
        <Column Name="$$ticket_ids" DataType="DT_WSTR" Length="2000" Key="True" Example="111,222,333" />
      </InputColumns>
      <OutputColumns>
        <Column Name="P_job_status_id" Label="job_id" DataType="DT_WSTR" Length="100"/>
        <Column Name="P_job_status_message" Label="message" DataType="DT_WSTR" Length="2000"/>

        <Column Name="P_job_status_total" Label="total" DataType="DT_I4" />
        <Column Name="P_job_status_status" Label="job_status" DataType="DT_WSTR" Length="50" />
        <Column Name="P_job_status_url" Label="url" DataType="DT_WSTR" Length="500" />

        <Column Name="title" DataType="DT_WSTR" Length="255" />
        <Column Name="errors" DataType="DT_WSTR" Length="1000" />
        <Column Name="id" Label="ticket_id" DataType="DT_I8" />
        <Column Name="status" DataType="DT_WSTR" Length="50" />
        <Column Name="success" DataType="DT_BOOL" />
      </OutputColumns>

    </EndPoint>

    <EndPoint Group="Tickets" Template="tp_ticket_bulk" Name="put_tickets" Method="PUT"
              Label="Update Tickets (Bulk)"
              Desc="Update tickets in bulk (job is queued) and wait until done. This is faster than one request at a time"
              Url="/tickets/update_many.json"
              ContentType="application/json" BatchSize="100"
              Filter="$.job_status"
              HelpLink="https://developer.zendesk.com/rest_api/docs/support/tickets#update-many-tickets">

      <Body><![CDATA[{"tickets" : {$rows$} }]]></Body>
      <LayoutMap>
        <![CDATA[<?xml version="1.0" encoding="utf-8"?>
<settings>
  <dataset id="root" readfrominput="True" />
    <map src="id" name="id" /> 
    <map src="subject" name="subject" />  
    <map name="comment">
      <map src="comment_body" name="body" />
	  <map src="comment_body_html" name="html_body" />
	  <map src="comment_author_id" name="author_id" />
      <map src="comment_public" name="public" />
    </map>  	
    <map src="priority" name="priority" />
    <map src="status" name="status" />
    <map src="requester_id" name="requester_id" />
    <map src="submitter_id" name="submitter_id" />
    <map src="assignee_id" name="assignee_id" />
    <map src="organization_id" name="organization_id" />
    <map src="group_id" name="group_id" />
    <map src="external_id" name="external_id" />
    <map src="type" name="type" />
    <map src="collaborator_ids" name="collaborator_ids" fragment="True" />
    <map src="follower_ids" name="follower_ids" fragment="True" />
    <map src="email_cc_ids" name="email_cc_ids" fragment="True" />
    <map src="forum_topic_id" name="forum_topic_id" />
    <map src="problem_id" name="problem_id" />
    <map src="is_public" name="is_public" />
    <map src="due_at" name="due_at" />
    <map src="tags" name="tags" fragment="True" />
    <map src="additional_tags" name="additional_tags" fragment="True" />
    <map src="remove_tags" name="remove_tags" fragment="True" />
    <map src="custom_fields" name="custom_fields" fragment="True" />        
    <map src="allow_attachments" name="allow_attachments" /> 
    <map src="allow_channelback" name="allow_channelback" />

</settings>]]>
      </LayoutMap>

      <EndPoint Url="[$parent.url$]" Method="GET" Filter="$.job_status.results[*]" IncludeParentColumns="True">
        <Params>
          <Param Name="EnableStatusCheck" Type="Property" Value="true" />
          <Param Name="StatusCheckIterationWaitSeconds" Type="Property" Value="4" />
          <Param Name="StatusCheckMaxWaitSeconds" Type="Property" Value="200" />
          <Param Name="StatusContinueValue" Type="Property" Value="queued|working" />
          <Param Name="StatusSuccessValue" Type="Property" Value="completed|failed|killed" />
        </Params>
      </EndPoint>

      <InputColumns>
        <Column Name="id" DataType="DT_I8" Key="True" Order="-1" />
      </InputColumns>
      <OutputColumns>
        <Column Name="P_job_status_id" Label="job_id" DataType="DT_WSTR" Length="100"/>
        <Column Name="P_job_status_message" Label="message" DataType="DT_WSTR" Length="2000"/>

        <Column Name="P_job_status_total" Label="total" DataType="DT_I4" />
        <Column Name="P_job_status_status" Label="job_status" DataType="DT_WSTR" Length="50" />
        <Column Name="P_job_status_url" Label="url" DataType="DT_WSTR" Length="500" />

        <Column Name="index" DataType="DT_I4" />
        <Column Name="error" DataType="DT_WSTR" Length="1000" />
        <Column Name="details" DataType="DT_WSTR" Length="4000" />
        <Column Name="id" Label="ticket_id" DataType="DT_I8" />
        <Column Name="status" DataType="DT_WSTR" Length="50" />
        <Column Name="success" DataType="DT_BOOL" />
      </OutputColumns>
    </EndPoint>

    <EndPoint Group="Tickets" Template="tp_ticket" Name="put_ticket" Method="PUT"
              Label="Update Ticket (Single)"
              Desc="Update single ticket. Use bulk operation if you pfrefer to update multiple tickets. If you like to set additional_tags or remove_tags then use BULK Table (Tickets)"
              Url="/tickets/[$id$].json"
              ContentType="application/json"
              JsonRowFormat="Multicontent"
              HelpLink="https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#update-ticket"
              Filter="$.ticket">

      <Body><![CDATA[{"ticket" : {$rows$} }]]></Body>
      <LayoutMap>
        <![CDATA[<?xml version="1.0" encoding="utf-8"?>
<settings>
  <dataset id="root" readfrominput="True" />
    <map src="subject" name="subject" />  
    <map name="comment">
      <map src="comment_body" name="body" />
	  <map src="comment_body_html" name="html_body" />
	  <map src="comment_author_id" name="author_id" />
      <map src="comment_public" name="public" />
    </map>  		
    <map src="priority" name="priority" />
    <map src="status" name="status" />
    <map src="requester_id" name="requester_id" />
    <map src="submitter_id" name="submitter_id" />
    <map src="assignee_id" name="assignee_id" />
    <map src="organization_id" name="organization_id" />
    <map src="group_id" name="group_id" />
    <map src="external_id" name="external_id" />
    <map src="type" name="type" />
    <map src="collaborator_ids" name="collaborator_ids" fragment="True" />
    <map src="follower_ids" name="follower_ids" fragment="True" />
    <map src="email_cc_ids" name="email_cc_ids" fragment="True" />
    <map src="forum_topic_id" name="forum_topic_id" />
    <map src="problem_id" name="problem_id" />
    <map src="is_public" name="is_public" />
    <map src="due_at" name="due_at" />
    <map src="tags" name="tags" fragment="True" />
    <map src="additional_tags" name="additional_tags" fragment="True" />
    <map src="remove_tags" name="remove_tags" fragment="True" />
    <map src="custom_fields" name="custom_fields" fragment="True" />        
    <map src="allow_attachments" name="allow_attachments" /> 
    <map src="allow_channelback" name="allow_channelback" />

	
</settings>]]>
      </LayoutMap>

      <Params>
        <Param Name="id" Label="Ticket ID to Update" Required="True"/>
      </Params>
      <InputColumns>
        <Column Name="id" DataType="DT_I8" Key="True" MapToParam="True" Order="-1" />
      </InputColumns>
    </EndPoint>

    <EndPoint Group="Tickets" Name="delete_ticket" Method="DELETE" Label="Delete Ticket" Desc="Delete ticket by id."
             Url="tickets/[$id$].json" Filter="" HelpLink="https://developer.zendesk.com/rest_api/docs/support/tickets#delete-ticket">
      <Params>
        <Param Name="id" Label="Ticket ID for Delete" Required="True"/>
        <Param Name="RawOutputDataRowTemplate" Type="Property" Value="{Response:'Deleted'}" />
        <Param Name="EnableRawOutputModeSingleRow" Type="Property" Value="True" />                                      
        
      </Params>
      <OutputColumns>
        <Column Name="Response" DataType="DT_WSTR" Length="10"  />
      </OutputColumns>
      <InputColumns>
        <Column Name="id" DataType="DT_I8" Key="True" MapToParam="True"  Order="-1"  />
      </InputColumns>
    </EndPoint>

    <EndPoint Group="Users" Name="get_users" Template="tp_user" Label="Read Users (All)" Desc="Get a list of all users in your account"
              Url="/users.json" Filter="$.users[*]" HelpLink="https://developer.zendesk.com/api-reference/ticketing/users/users/#list-users">
      <Params>
        <Param Name="role" Label="Role" Options=";agent;admin;end-user"/>
        <Param Name="permission_set" Type="Query"  />
        <Param Name="external_id" Label="External ID for Ticket" Type="Query" />
      </Params>
    </EndPoint>
    <EndPoint Group="Organizations" Name="get_organizations" Template="tp_organization" Label="Read Organizations (All)" Desc="Get a list of all organizations in your account"
              Url="/organizations.json" Filter="$.organizations[*]" HelpLink="https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/#list-organizations">
      <Params>
      </Params>
    </EndPoint>
	
    <EndPoint Group="Users" Name="upsert_users" Template="tp_user_bulk" Method="POST"
              Label="Upsert Users (Bulk) - Create or Update"
              Desc="Create or Update users in bulk (Upsert)"
              Url="/users/create_or_update_many.json"
              ContentType="application/json" BatchSize="100"
              Filter="$.job_status"
              HelpLink="https://developer.zendesk.com/api-reference/ticketing/users/users/#create-or-update-many-users">

      <Body><![CDATA[{"users" : {$rows$} }]]></Body>

      <EndPoint Url="[$parent.url$]" Method="GET" Filter="$.job_status.results[*]" IncludeParentColumns="True">
        <Params>
          <Param Name="EnableStatusCheck" Type="Property" Value="true" />
          <Param Name="StatusCheckIterationWaitSeconds" Type="Property" Value="4" />
          <Param Name="StatusCheckMaxWaitSeconds" Type="Property" Value="200" />
          <Param Name="StatusContinueValue" Type="Property" Value="queued|working" />
          <Param Name="StatusSuccessValue" Type="Property" Value="completed|failed|killed" />
        </Params>
      </EndPoint>

      <InputColumns>
        <Column Name="id" DataType="DT_I8" Key="True" Order="-1" />
      </InputColumns>
      <OutputColumns>
        <Column Name="id" DataType="DT_I8" />
		<Column Name="email" DataType="DT_WSTR" Length="100"/>
        <Column Name="status" DataType="DT_WSTR" Length="50" />
        <Column Name="success" DataType="DT_BOOL" />
		
        <Column Name="P_job_status_id" Label="job_id" DataType="DT_WSTR" Length="100"/>
        <Column Name="P_job_status_message" Label="message" DataType="DT_WSTR" Length="2000"/>

        <Column Name="P_job_status_total" Label="total" DataType="DT_I4" />
        <Column Name="P_job_status_status" Label="job_status" DataType="DT_WSTR" Length="50" />
        <Column Name="P_job_status_url" Label="job_url" DataType="DT_WSTR" Length="500" />

        <Column Name="index" DataType="DT_I4" />
        <Column Name="error" DataType="DT_WSTR" Length="1000" />
        <Column Name="details" DataType="DT_WSTR" Length="4000" />
      </OutputColumns>
    </EndPoint>	

    <EndPoint Group="Users" Name="delete_user"  Method="DELETE" Template="tp_user"
              Label="Delete User"
              Desc="Delete a user by its id"
              Url="/users/[$id$].json"
              ContentType="application/json" 
              Filter="$.user"
			  BatchSize="1"
              HelpLink="https://developer.zendesk.com/api-reference/ticketing/users/users/#delete-user">		
	  <Params>
        <Param Name="id" Label="User ID for Delete" Required="True"/>
      </Params>
      <InputColumns>
        <Column Name="id" DataType="DT_I8" Key="True" MapToParam="True"  Order="-1"  />
      </InputColumns>
    </EndPoint>	
	
    <EndPoint Group="Users" Name="put_user" Template="tp_user" Method="PUT"
			  	
              Label="Update User"
              Desc="Update a user by its id"
              Url="/users/[$id$].json"
              ContentType="application/json" 
              Filter="$.user"
			  BatchSize="1"
              HelpLink="https://developer.zendesk.com/api-reference/ticketing/users/users/#update-user">

      <Body><![CDATA[{"user" : {$rows$} }]]></Body>			
	  <Params>
		<Param Name="id" IsKey="True"  />
	  </Params>
	  <InputColumns>
			<Column Name="id" MapToParam="True" Key="True" DataType="DT_I8" />
	  </InputColumns>
    </EndPoint>	
	
    <EndPoint Group="Users" Name="post_user" Template="tp_user" Method="POST"
			  	
              Label="Create User"
              Desc="Create a user"
              Url="/users.json"
              ContentType="application/json" 
              Filter="$.user"
			  BatchSize="1"
              HelpLink="https://developer.zendesk.com/api-reference/ticketing/users/users/#create-user">
      <Body><![CDATA[{"user" : {$rows$} }]]></Body>			
    </EndPoint>		
	
    <EndPoint Group="Users" Name="upsert_user" Template="tp_user" Method="POST"
			  	
              Label="Upsert User - Create or Update"
              Desc="Create or Update a user in (Upsert)"
              Url="/users/create_or_update.json"
              ContentType="application/json" 
              Filter="$.user"
			  BatchSize="1"
              HelpLink="https://developer.zendesk.com/api-reference/ticketing/users/users/#create-or-update-user">
      <Body><![CDATA[{"user" : {$rows$} }]]></Body>			
    </EndPoint>	


    <EndPoint Group="Organizations" Name="delete_organization"  Method="DELETE" Template="tp_organization"
              Label="Delete Organization"
              Desc="Delete an organization by its id"
              Url="/organizations/[$id$].json"
              ContentType="application/json" 
              Filter="$.organization"
			  BatchSize="1"
              HelpLink="https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/#delete-organization">		
	  <Params>
        <Param Name="id" Label="Organization ID for Delete" Required="True"/>
      </Params>
      <InputColumns>
        <Column Name="id" DataType="DT_I8" Key="True" MapToParam="True"  Order="-1"  />
      </InputColumns>
    </EndPoint>	
	
    <EndPoint Group="Organizations" Name="put_organization" Template="tp_organization" Method="PUT"
			  	
              Label="Update Organization"
              Desc="Update an organization by its id"
              Url="/organizations/[$id$].json"
              ContentType="application/json" 
              Filter="$.organization"
			  BatchSize="1"
              HelpLink="https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/#update-organization">

      <Body><![CDATA[{"organization" : {$rows$} }]]></Body>			
	  <Params>
		<Param Name="id" IsKey="True"  />
	  </Params>
	  <InputColumns>
			<Column Name="id" MapToParam="True" Key="True" DataType="DT_I8" />
	  </InputColumns>
    </EndPoint>	
	
    <EndPoint Group="Organizations" Name="post_organization" Template="tp_organization" Method="POST"
			  	
              Label="Create Organization"
              Desc="Create an organization"
              Url="/organizations.json"
              ContentType="application/json" 
              Filter="$.organization"
			  BatchSize="1"
              HelpLink="https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/#create-organization">
      <Body><![CDATA[{"organization" : {$rows$} }]]></Body>			
    </EndPoint>		
	
    <EndPoint Group="Organizations" Name="upsert_organization" Template="tp_organization" Method="POST"
			  	
              Label="Upsert Organization - Create or Update"
              Desc="Create or Update an organization in (Upsert)"
              Url="/organizations/create_or_update.json"
              ContentType="application/json" 
              Filter="$.organization"
			  BatchSize="1"
              HelpLink="https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/#create-or-update-organization">
      <Body><![CDATA[{"organization" : {$rows$} }]]></Body>			
    </EndPoint>	
	
  </EndPoints>
    

  <Tables>
    <Table Name="Tickets_Bulk" Label="Tickets (Bulk)"
           LookupEndPoint="get_tickets_by_ids"
           InsertEndPoint="post_tickets"
           UpdateEndPoint="put_tickets"
           DeleteEndPoint="delete_tickets"
           SelectEndPoint="get_tickets" />

    <Table Name="Tickets" Label="Tickets (Row by Row)"
           LookupEndPoint="get_tickets_by_ids"
           InsertEndPoint="post_ticket"
           UpdateEndPoint="put_ticket"
           DeleteEndPoint="delete_ticket"
           SelectEndPoint="get_tickets" />
     
    <Table Name="Users" 
               SelectEndPoint="get_users" 
               LookupEndPoint="get_users_by_ids" 
			   InsertEndPoint="post_user"
			   UpdateEndPoint="put_user"
			   UpsertEndPoint="upsert_user"
			   DeleteEndPoint="delete_user"
           />
    <Table Name="Users_Bulk" 
               SelectEndPoint="get_users" 
               LookupEndPoint="get_users_by_ids" 
			   InsertEndPoint="upsert_users"
			   UpdateEndPoint="upsert_users"
			   UpsertEndPoint="upsert_users"
			   DeleteEndPoint="delete_user"
           />
		   
    <Table Name="Organizations"
               SelectEndPoint="get_organizations" 
               LookupEndPoint="get_organizations_by_ids" 
               InsertEndPoint="post_organization"
			   UpdateEndPoint="put_organization"
			   UpsertEndPoint="upsert_organization"
			   DeleteEndPoint="delete_organization"			   
           />
		   
  </Tables>

  <Examples>
    <Example Group="ODBC" Label="Get all Tickets" Desc="Read all tickets from Zendesk" >
      <Code><![CDATA[SELECT * FROM Tickets]]></Code>
    </Example>
    <Example Group="ODBC" Label="Get Ticket information by ID(s)" Desc="Read multiple ticket information from Zendesk by ID(s)" >
      <Code>
        <![CDATA[SELECT * from get_tickets_by_ids
WITH(ticket_ids='104861,104860')]]>
      </Code>
    </Example>
    <Example Group="ODBC" Label="Get Single Ticket information by ID" >
      <Code>
        <![CDATA[SELECT * from Tickets
WHERE ID=104861]]>
      </Code>
    </Example>

    <Example Group="ODBC" Label="Get all tickets modified after ceratin date/time" Desc="Read tickets modified after ceratin date/time. This is incremental data fetch." >
      <Code>
        <![CDATA[SELECT * FROM get_tickets_incr
WITH(
	  start_time='2012-01-31T00:00:00'
)]]>
      </Code>
    </Example>
    <Example Group="ODBC" Label="Get all tickets for specific organization" Desc="Read tickets for a specified organization_id (company)." >
      <Code>
        <![CDATA[SELECT * FROM get_tickets_by_org
WITH(
	  organization_id='12'
)]]>
      </Code>
    </Example>
    <Example Group="ODBC" Label="Get all tickets for a specific user who requested ticket(s)" Desc="Read tickets for a specified user_id who is listed as requested by." >
      <Code>
        <![CDATA[SELECT * FROM get_tickets_for_user_requested
WITH(
	  user_id='123'
)]]>
      </Code>
    </Example>
    <Example Group="ODBC" Label="Get all tickets for a specific user who is CCed on  ticket(s)" Desc="Read tickets for a specified user_id who is listed as CC." >
      <Code>
        <![CDATA[SELECT * FROM get_tickets_for_user_cced
WITH(
	  user_id='123'
)]]>
      </Code>
    </Example>
    <Example Group="ODBC" Label="Get all tickets for a specific user who is assigned to ticket(s)" Desc="Read tickets for a specified user_id who is assigned to ticket(s)." >
      <Code>
        <![CDATA[SELECT * FROM get_tickets_for_user_assigned
WITH(
	  user_id='123'
)]]>
      </Code>
    </Example>
    <Example Group="ODBC" Label="Get total tickets count" >
      <Code><![CDATA[SELECT * FROM get_tickets_count]]></Code>
    </Example>
    <Example Group="ODBC" Label="Get total tickets count for a specific organization" >
      <Code>
        <![CDATA[SELECT * FROM get_tickets_count_org
WITH(
	  organization_id='123'
)]]>
      </Code>
    </Example>
    <Example Group="ODBC" Label="Get all attachment urls for a specific ticket" >
      <Code>
        <![CDATA[SELECT * FROM get_ticket_attachments
WITH(
	  ticket_id='104351'
)]]>
      </Code>
    </Example>
    <Example Group="ODBC" Label="Get User(s)" >
      <Code>
        <![CDATA[SELECT * FROM Users --Where Id=1234
]]>
      </Code>
    </Example>
    <Example Group="ODBC" Label="Get multiple users by ID(s)" Desc="Read multiple user information from Zendesk by ID(s)" >
      <Code>
        <![CDATA[SELECT * from get_users_by_ids
WITH(user_ids='1111,2222,3333')]]>
      </Code>
    </Example>

    <Example Group="ODBC" Label="Get Organization(s)" >
      <Code>
        <![CDATA[SELECT * FROM Organizations --Where Id=1234
]]>
      </Code>
    </Example>
    <Example Group="ODBC" Label="Get multiple organizations by ID(s)" Desc="Read multiple organization information from Zendesk by ID(s)" >
      <Code>
        <![CDATA[SELECT * from get_organizations_by_ids
WITH(organization_ids='1111,2222,3333')]]>
      </Code>
    </Example>

    	
	<Example Group="ODBC" Label="Create a new ticket" Desc="Use Tickets_Bulk instead of Tickets table if you like to multiple tickets at once. Tickets_Bulk table supports BULK operation (using SOURCE clause)." >
      <Code>
        <![CDATA[INSERT INTO Tickets(
	subject
	,status
	,assignee_id
	,comment_body_html --(for html body)
	--,comment_body (for plain text)
	,comment_public
	,tags
	,custom_fields)
VALUES(
  'Test Ticket Subject - From email'
, 'new' --new, solved, closed
, 18590685428 --assign to agent id
, 'This is <b>html body</b>' --markup also supported
, 1 --1=public, 0=private 
, '["tag1","tag2"]' 
  --below json can be obtained using select custom_fields from tickets where id=1234
, '[
  {
    "id": 56608448,
    "value": "1122"
  },
  {
    "id": 57385967,
    "value": "ORD-12345"
  }
]'
)]]>
      </Code>
    </Example>

<Example Group="ODBC" Label="Create a new ticket (behalf of user)" Desc="This example creates ticket behalf of user (i.e. requester_email and requester_name) and if user is missing then creates a new user for supplied username and email. Use Tickets_Bulk instead of Tickets table if you like to multiple tickets at once. Tickets_Bulk table supports BULK operation (using SOURCE clause)." >
      <Code>
        <![CDATA[INSERT INTO Tickets(
	subject
	,status
	,requester_email
	,requester_name
	,assignee_id 
	--,group_id --or assign to group
	,comment_body_html --(for html body)
	--,comment_body (for plain text)
	,comment_public
	,tags
	,custom_fields)
VALUES(
  'Test Ticket Subject - From email'
, 'new' --new, solved, closed
, 'fromsomeuser@abc.com' --from email
, 'Bob Smith' --submitter name needed if its new user
, 18590685428 --assign to agent id
--,123435454 --or use group id if not assignee 
, 'This is <b>html body</b>' --markup also supported
--, 'This is plain text'
, 1 --1=public, 0=private 
, '["tag1","tag2"]' 
  --below json can be obtained using select custom_fields from tickets where id=1234
, '[
  {
    "id": 56608448,
    "value": "1122"
  },
  {
    "id": 57385967,
    "value": "ORD-12345"
  }
]'
)]]>
      </Code>
    </Example>

    <Example Group="ODBC" Label="BULK Create tickets (BULK read / write from external source)" Desc="This examples shows how to use SOURCE clause to read data from MS SQL Server (or other external system) and send data to Zendesk using Bulk API">
      <Code>
        <![CDATA[INSERT INTO Tickets_BULK 
SOURCE(
  'MSSQL' --ODBC or OLEDB
  ,'Data Source=localhost;Initial Catalog=Test;Integrated Security=true'
  ,'select ''Test Subject#1'' as subject,''new'' as status,''this is description#1'' as comment_body from Projects'
)]]>
      </Code>
    </Example>
    
    <Example Group="ODBC" Label="Delete a ticket by Id " >
      <Code>
        <![CDATA[DELETE FROM Tickets WHERE Id=111]]>
      </Code>
    </Example>
    
    <Example Group="ODBC" Label="Delete multiple by tickets by Id list - BULK (comma seperated - max 100 ids)" >
      <Code>
        <![CDATA[DELETE FROM Tickets_Bulk WHERE [$$ticket_ids]='111,222,333']]>
      </Code>
    </Example>

    <Example Group="ODBC" Label="Update ticket by Id" >
      <Code>
        <![CDATA[Update Tickets 
SET subject='Test ticket subject'
  , tags='["tag1","tag2"]' 
  --, additional_tags ='["tag1","tag2"]' --tags you like to remove
  --, remove tags='["tag1","tag2"]'
  , status='pending' --new, solved, closed
  --below json can be obtained using select custom_fields from tickets where id=1234
  , custom_fields='[
  {
    "id": 10000,
    "value": "some value for prop1"
  },
  {
    "id": 10001,
    "value": "some value for prop2"
  }
]'
Where Id = 1234]]>
      </Code>
    </Example>
	
    <Example Group="ODBC" Label="Update exising ticket with private comment" >
      <Code>
        <![CDATA[Update Tickets 
SET comment_body='Closing this ticket'
  , comment_public = 0 --or 1
  , status='solved' --pending, new, closed
  --, comment_body_html='Closing <b>this</b> ticket'
  --, comment_author_id=123545   
Where Id = 1234]]>
      </Code>
    </Example>

    <Example Group="ODBC" Label="Update exising ticket with HTML body" >
      <Code>
        <![CDATA[Update Tickets 
SET comment_body_html='Closing <b>this</b> ticket'
  , status='solved' --pending, new, closed
  --, comment_author_id=123545   
  --, comment_public = 0 --or 1  
Where Id = 1234]]>
      </Code>
    </Example>	

    <Example Group="ODBC" Label="Update ticket with Add or remove tags" Desc="Update ticket with Add new tags or remove tags. Adding / removing tags available via special field names only in BULK mode so you must use Tickets_BULK table." >
      <Code>
        <![CDATA[Update Tickets_Bulk 
SET subject='New subject'
  , additional_tags ='["new-tag1","new-tag2"]' --//add some tags
  --, remove_tags='["old-tag1","old-tag2"]' --//removes some tags
  --, tags='["tag1","tag2"]' --//overwrite all tags
  , status='pending' --new, solved, closed
Where Id = 1234]]>
      </Code>
    </Example>


    <Example Group="ODBC" Label="Update multiple tickets - (BULK read / write from external source)" Desc="This examples shows how to perform bulk update using SOURCE clause. It reads data from external system (in this example MS SQL Server) and sends data to Zendesk using Bulk API">
      <Code>
        <![CDATA[UPDATE Tickets_BULK 
SOURCE(
  'MSSQL' --ODBC or OLEDB
  ,'Data Source=localhost;Initial Catalog=Test;Integrated Security=true'
  ,'select 104897 as Id, ''Test Subject#1-updated-bulk-demo'' as subject,''new'' as status
    UNION 
    select 104898 as Id, ''Test Subject#2-updated-bulk-demo'' as subject,''new'' as status'
)]]>
      </Code>
    </Example>

    <Example Group="ODBC" Label="Delete multiple tickets - (BULK read / write from external source)" Desc="This examples shows how to perform bulk delete using SOURCE clause. It reads data from external system (in this example MS SQL Server) and sends data to Zendesk using Bulk API">
      <Code>
        <![CDATA[DELETE FROM Tickets_BULK 
SOURCE(
  'MSSQL' --ODBC or OLEDB
  ,'Data Source=localhost;Initial Catalog=Test;Integrated Security=true'
  ,'select 104897 as Id 
    UNION 
    select 104898 as Id'
)]]>
      </Code>
    </Example>    

    <Example Group="ODBC" Label="Create a new ticket using Raw JSON Body approach" HelpLink="https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#create-ticket" >
      <Code>
        <![CDATA[INSERT INTO Tickets(_rawdoc_) 
VALUES(
  '{
      "subject": "Test ticket #1",    
      "comment": {
        "body": "Test ticket #1"
      },
      "priority": "urgent"
    }'
)]]>
      </Code>
    </Example>

    <Example Group="ODBC" Label="Update an existing ticket using Raw JSON Body approach" HelpLink="https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#update-ticket" >
      <Code>
        <![CDATA[UPDATE Tickets
SET _rawdoc_ =
  '{
      "subject": "Test ticket #1",    
      "comment": {
        "body": "Test ticket #1"
      },
      "priority": "urgent"
    }'
WHERE Id=1234]]>
      </Code>
    </Example>

    <Example Group="ODBC" Label="Create multiple ticket(s) using a RAW JSON body (single or multiple)" HelpLink="https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#create-ticket" >
      <Code>
        <![CDATA[INSERT INTO Tickets_Bulk(_rawdoc_) 
VALUES(
  '[
    {
      "subject": "Test ticket #1",    
      "comment": {
        "body": "Test ticket #1"
      },
      "priority": "urgent"
    },
    {
      "subject": "Test ticket #2",    
      "comment": {
        "body": "This is a comment for #2"
      },
      "priority": "normal"
    }
  ]'
)]]>
      </Code>
    </Example>

    <Example Group="ODBC" Label="Create User" Desc="Create a new user for specified email id and other information. If user with same email exists then call fails." HelpLink="https://developer.zendesk.com/api-reference/ticketing/users/users/#create-user" >
      <Code>
        <![CDATA[
INSERT INTO Users
(
 name
,email
,organization_id
,phone
,default_group_id
,locale
,moderator
,skip_verify_email
,only_private_comments
,signature
,tags
,time_zone
,role
,external_id
,alias
,details
,notes
,remote_photo_url
,user_fields
)
VALUES(
   'Bob Walton'
  ,'bob@abc.com'
  ,5397098432795
  ,'111-222-3333'
  ,114094762733
  ,'en-US'
  ,'false'
  ,'true' --true=do not send verify account email
  ,1 --user can put only private comments
  ,'Best regards, Support Team' --Only agents and admins can have signatures
  ,'["paid","trial","solved"]' 
  ,'America/New_York'
  ,'end-user' --agent or admin 
  ,'zcrm_1558554000052161270'
  ,'some alias'
  ,'some details'
  ,'some notes'
  ,'https://zappysys.com/wp-content/uploads/2021/10/Slider-API-Hub-1.png' --this does not work in INSERT (works only in UPDATE/UPSERT for now)
  ,'{"birthdate": "1981-01-23", "gender": "M"}'
)	
		]]>
      </Code>
    </Example>
 
    <Example Group="ODBC" Label="Update User" HelpLink="https://developer.zendesk.com/api-reference/ticketing/users/users/#update-user" >
      <Code>
        <![CDATA[
UPDATE Users
SET name='Sam Walton'
  ,email='sam@abc.com'
  ,organization_id=5397098432795
  ,phone='111-222-3333'
  ,default_group_id=114094762733
  ,locale='en-US'
  ,skip_verify_email='true' --do not send verify account email
  ,moderator='false'
  ,only_private_comments=1 --user can put only private comments
  ,signature='Best regards, Support Team' --Only agents and admins can have signatures
  ,tags='["paid","trial","solved"]' 
  ,time_zone='America/New_York'
  ,role='end-user'
  ,external_id='zcrm_1558554000052161269'
  ,alias='some alias'
  ,details='some details'
  ,notes='some notes'
  ,remote_photo_url='https://zappysys.com/wp-content/uploads/2021/10/Slider-API-Hub-1.png'
  ,user_fields='{"birthdate": "1981-01-23", "gender": "M"}'
Where id=21811221397915		
		]]>
      </Code>
    </Example>
	
   <Example Group="ODBC" Label="Upsert User (Create or Update)" Desc="Creates a user if the user does not already exist, or updates an existing user identified by e-mail address or external ID." HelpLink="https://developer.zendesk.com/api-reference/ticketing/users/users/#create-or-update-user" >
      <Code>
        <![CDATA[
INSERT INTO Users
(
 name
,email
,organization_id
,phone
,default_group_id
,locale
,moderator
,skip_verify_email
,only_private_comments
,signature
,tags
,time_zone
,role
,external_id
,alias
,details
,notes
,remote_photo_url
,user_fields
)
VALUES(
   'Bob Walton'
  ,'bob@abc.com'
  ,5397098432795
  ,'111-222-3333'
  ,114094762733
  ,'en-US'
  ,'false'
  ,'true' --true=do not send verify account email
  ,1 --user can put only private comments
  ,'Best regards, Support Team' --Only agents and admins can have signatures
  ,'["paid","trial","solved"]' 
  ,'America/New_York'
  ,'end-user' --agent or admin 
  ,'zcrm_1558554000052161270'
  ,'some alias'
  ,'some details'
  ,'some notes'
  ,'https://zappysys.com/wp-content/uploads/2021/10/Slider-API-Hub-1.png' --this does not work in INSERT (works only in UPDATE/UPSERT for now)
  ,'{"birthdate": "1981-01-23", "gender": "M"}'
)	
		]]>
      </Code>
    </Example>		
	
     <Example Group="ODBC" Label="Delete User" HelpLink="https://developer.zendesk.com/api-reference/ticketing/users/users/#delete-user" >
      <Code>
        <![CDATA[DELETE FROM Users Where id=21855694556443 --it doesnt delete user from system but only changes active flag	
		]]>
      </Code>
    </Example>
	
   <Example Group="ODBC" Label="Search for user with email id" HelpLink="https://developer.zendesk.com/documentation/ticketing/using-the-zendesk-api/searching-with-the-zendesk-api/" >
      <Code>
        <![CDATA[SELECT *
FROM get_search
WITH(
	  query='type:user email:bob@abc.com'
)]]>
      </Code>
    </Example>
	
    <Example Group="ODBC" Label="Create Organization" Desc="Create a new organization for specified email id and other information. If organization with same email exists then call fails." HelpLink="https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/#create-organization" >
      <Code>
        <![CDATA[
INSERT INTO Organizations
(
	 name
	,external_id
	,group_id 
	,tags
	,details
	,notes
	,organization_fields
	,domain_names
	,shared_tickets
	,shared_comments
)
VALUES(
	'Abc Inc'
	,'zcrm_1558554000052161270'  --external_id
	,114094762733  
	,'["paid","trial","solved"]' 
	,'some details'
	,'some notes'
	,'{"startdate": "1981-01-23", "revenue": 12000000.50, "somenumber": 1235678}'
	,'["aaa.com", "bbb.com"]'
	,'false'
	,'false'
)
		]]>
      </Code>
    </Example>
 
    <Example Group="ODBC" Label="Update Organization" HelpLink="https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/#update-organization" >
      <Code>
        <![CDATA[
UPDATE Organizations
SET  name='Abc Inc'
	,external_id='zcrm_1558554000052161270'
	,group_id=114094762733 
	,tags='["paid","trial","solved"]'
	,details='some details'
	,notes='some notes'
	,organization_fields='{"startdate": "1981-01-23", "revenue": 12000000.50, "somenumber": 1235678}'
	,domain_names='["aaa.com", "bbb.com"]'
	,shared_tickets='false'
	,shared_comments='false'
Where id=21863188631451		
		]]>
      </Code>
    </Example>
	
   <Example Group="ODBC" Label="Upsert Organization (Create or Update)" Desc="Creates an organization if the organization does not already exist, or updates an existing organization identified by e-mail address or external ID." HelpLink="https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/#create-or-update-organization" >
      <Code>
        <![CDATA[
UPSERT INTO Organizations
(
	 name
	--id or external_id can be supplied for UPSERT
	,id 
	--or--
	,external_id
	 
	,group_id 
	,tags
	,details
	,notes
	,organization_fields
	,domain_names
	,shared_tickets
	,shared_comments
)
VALUES(
	'Abc Inc'
	,1234567 --id
	--or--
	,'zcrm_1558554000052161270'  --external_id
	
	,114094762733  
	,'["paid","trial","solved"]' 
	,'some details'
	,'some notes'
	,'{"startdate": "1981-01-23", "revenue": 12000000.50, "somenumber": 1235678}'
	,'["aaa.com", "bbb.com"]'
	,'false'
	,'false'
)
		]]>
      </Code>
    </Example>		
	
     <Example Group="ODBC" Label="Delete Organization" HelpLink="https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/#delete-organization" >
      <Code>
        <![CDATA[DELETE FROM Organizations Where id=21855694556443 
		]]>
      </Code>
    </Example>
	
   <Example Group="ODBC" Label="Search for an organization with a specified name" HelpLink="https://developer.zendesk.com/documentation/ticketing/using-the-zendesk-api/searching-with-the-zendesk-api/" >
      <Code>
        <![CDATA[SELECT *
FROM get_search
WITH(
	  query='type:organization "Abc"'
)]]>
      </Code>
    </Example>	

   <Example Group="ODBC" Label="Bulk Import Mode for Users or Organizations" Desc="This example shows how to upsert in bulk mode from external data and import into Zendesk. We used Microsoft SQL Server as source system in below example with static value query (just one row) but it can be any number of rows." >
      <Code>
        <![CDATA[UPSERT INTO Organizations
SOURCE('MSSQL' --ODBC
, 'Data Source=localhost;Initial Catalog=test;Integrated Security=true'

--For bulk input, map columns in External Query (Must use alias column name to match INSERT command Input Column names - see help file)
--If parameter value not same for all input rows then you can prefix some column with $$ to map as parameter (i.e. $$MyParam1)
--'ODBC', 'Driver={ZappySys CSV Driver};DataPath=C:\AccountsToInsert.csv'
--'ODBC', 'DSN=MyDSN'
--'OLEDB', 'Provider=SQLNCLI11;Server=localhost,1433;Database=tempdb;Trusted_Connection=yes;'

, 'select
      21863188631451 as id
    , ''Abc Inc'' as name
	,''zcrm_1558554000052161270'' as external_id
	,114094762733  as group_id
	,''["paid","trial","solved"]'' as tags
	,''some details'' as details
	,''some notes'' as notes
	,''{"startdate": "1981-01-23", "revenue": 12000000.50, "somenumber": 1235678}'' as organization_fields
	,''["aaa.com", "bbb.com"]'' domain_names
	,''false'' as shared_tickets
	,''false'' as shared_comments
')]]>
      </Code>
    </Example>	
	
  </Examples>
  

  
</ApiConfig>