{"id":5547,"date":"2022-11-14T22:02:55","date_gmt":"2022-11-14T22:02:55","guid":{"rendered":"https:\/\/serviceobjects.wpaladdin.com\/?page_id=5547"},"modified":"2023-12-06T09:12:37","modified_gmt":"2023-12-06T17:12:37","slug":"ac-javascript-options","status":"publish","type":"page","link":"https:\/\/test.serviceobjects.com\/docs\/dots-global-address-complete\/ac-javascript-options\/","title":{"rendered":"AC &#8211; JavaScript Options"},"content":{"rendered":"\n<div style=\"height:28px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/test.serviceobjects.com\/docs\/dots-global-address-complete\/ac-javascript-options\/#AC-JavaScriptOptions-OptionOverview\">Option Overview<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/test.serviceobjects.com\/docs\/dots-global-address-complete\/ac-javascript-options\/#AC-JavaScriptOptions-OptionTable\">Option Table<\/a><\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"AC-JavaScriptOptions-OptionOverview\">Option Overview<\/h1>\n\n\n\n<ul class=\"is-style-no-bullets-indented-list wp-block-list\">\n<li>Options are used to customize or tailor our Global Address Complete to your specific needs.&nbsp; In the code it is the second parameter to the Address control object when setting up the integration.&nbsp;&nbsp;<\/li>\n<\/ul>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Address Control Object<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">var DOTSGlobalAddressComplete= new so.Address(fields, options);\n<\/pre>\n\n\n\n<div style=\"height:33px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ul class=\"is-style-no-bullets-indented-list wp-block-list\">\n<li>Options allow for some customization of the results that are returned. For example, setting setBiasToIP to true will bias the returned results to the users location as determined by their IP address<\/li>\n<\/ul>\n\n\n\n<div style=\"height:33px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Options*<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">var options = { key: CustomKey, setBiasToIP: true };<\/pre>\n\n\n\n<ul class=\"is-style-no-bullets-indented-list wp-block-list\">\n<li>*<em>In some newer Javascript frameworks, the &#8220;options&#8221; field will need be explicitly named options and created as a global variable i.e. &#8220;window.options =&nbsp;{ key: CustomKey, setBiasToIP: true };&#8221;<\/em><\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"AC-JavaScriptOptions-OptionTable\">Option Table<\/h1>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>Option<\/th><th><strong>Default<\/strong><\/th><th>Values<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>key<\/td><td>No default<\/td><td>String<\/td><td>The Custom Key.<\/td><\/tr><tr><td>isTrial<\/td><td>true<\/td><td>true,<br>false<\/td><td>Determines if executing Global Address Complete against our trial or live environment.<\/td><\/tr><tr><td>setBiasToIP<\/td><td>false<\/td><td>true,<br>false<\/td><td>Sets the starting location from which results should be return from to the IP&nbsp;location&nbsp;of the user so that if you are in Santa Barbara, CA, USA as you type suggested addresses returned are first from there.<\/td><\/tr><tr><td>setCountryByIP<\/td><td>false<\/td><td>true,<br>false<\/td><td>Sets the country selected to the country of the user.<\/td><\/tr><tr><td>countries<\/td><td>No default<\/td><td>Various<br>country<br>values<\/td><td>Limits the suggestions to by country, for example this can be added to the options to restrict suggestions to Canada, Russia and Sweden:<br>countries: { codesList:&#8221;CAN, RUS, SWE&#8221;}<\/td><\/tr><tr><td>Validate<\/td><td>true<\/td><td>true, false<\/td><td>Sets the selected United States addresses to return validated against our DOTS Address Validation US &#8211; 3 Service.<\/td><\/tr><tr><td>Accessibility<\/td><td>false<\/td><td>true, false<\/td><td>Setting to true will turn on ID&#8217;s for screen readers and high contrast for visually impaired.<\/td><\/tr><tr><td>languagePreference<\/td><td>en<\/td><td>Various<\/td><td>Two letter ISO codes for the language preferred.<\/td><\/tr><tr><td>prompt<\/td><td>false<\/td><td>true,<br>false<\/td><td>Turn on additional prompts based on conditions of the suggestions, such as: &#8220;No Results Found&#8221; or &#8220;Keep Typing&#8230;&#8221;<\/td><\/tr><tr><td>maxItems<\/td><td>7<\/td><td>Integer<\/td><td>The maximum number of items to return in the dropdown.<\/td><\/tr><tr><td>DoPlace<\/td><td>false<\/td><td>true, false<\/td><td>Setting this option to &#8220;true&#8221; will set the component  to do place predict suggestions instead of address.  <\/td><\/tr><tr><td>SearchType<\/td><td>Locality<\/td><td>Locality only but will vary in the future<\/td><td>Determines the Global Address Complete Search Type if specified. If using the Address Search Type, no need to include this field.  If a value is placed that does not match with Locality, it will return empty results.  More Search Type options coming soon.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>*Note, the true\/false values are boolean values and not strings.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Option Overview Address Control Object Options* Option Table Option Default Values Description key No default String The Custom Key. isTrial true true,false Determines if executing Global Address Complete against our trial or live environment. setBiasToIP false true,false Sets the starting location from which results should be return from to the IP&nbsp;location&nbsp;of the user so that [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":2321,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5547","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>AC - JavaScript Options<\/title>\n<meta name=\"description\" content=\"Option Overview Option Table Option Overview Options are used to customize or tailor our Global Address Complete to your specific needs.&nbsp; In the code\" \/>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AC - JavaScript Options\" \/>\n<meta property=\"og:description\" content=\"Option Overview Option Table Option Overview Options are used to customize or tailor our Global Address Complete to your specific needs.&nbsp; In the code\" \/>\n<meta property=\"og:url\" content=\"https:\/\/test.serviceobjects.com\/docs\/dots-global-address-complete\/ac-javascript-options\/\" \/>\n<meta property=\"og:site_name\" content=\"Service Objects | Contact, Phone, Email Verification | Data Quality Services\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-06T17:12:37+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/dots-global-address-complete\/ac-javascript-options\/\",\"url\":\"https:\/\/test.serviceobjects.com\/docs\/dots-global-address-complete\/ac-javascript-options\/\",\"name\":\"AC - JavaScript Options\",\"isPartOf\":{\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#website\"},\"datePublished\":\"2022-11-14T22:02:55+00:00\",\"dateModified\":\"2023-12-06T17:12:37+00:00\",\"description\":\"Option Overview Option Table Option Overview Options are used to customize or tailor our Global Address Complete to your specific needs.&nbsp; In the code\",\"breadcrumb\":{\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/dots-global-address-complete\/ac-javascript-options\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/test.serviceobjects.com\/docs\/dots-global-address-complete\/ac-javascript-options\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/dots-global-address-complete\/ac-javascript-options\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/test.serviceobjects.com\/docs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DOTS Global Address Complete\",\"item\":\"https:\/\/test.serviceobjects.com\/docs\/dots-global-address-complete\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"AC &#8211; JavaScript Options\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#website\",\"url\":\"https:\/\/test.serviceobjects.com\/docs\/\",\"name\":\"Service Objects | Contact, Phone, Email Verification | Data Quality Services\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/test.serviceobjects.com\/docs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#organization\",\"name\":\"Service Objects | Contact, Phone, Email Verification | Data Quality Services\",\"url\":\"https:\/\/test.serviceobjects.com\/docs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/test.serviceobjects.com\/docs\/wp-content\/uploads\/2022\/08\/SO-logo-2560px-transparent.png\",\"contentUrl\":\"https:\/\/test.serviceobjects.com\/docs\/wp-content\/uploads\/2022\/08\/SO-logo-2560px-transparent.png\",\"width\":2560,\"height\":1440,\"caption\":\"Service Objects | Contact, Phone, Email Verification | Data Quality Services\"},\"image\":{\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AC - JavaScript Options","description":"Option Overview Option Table Option Overview Options are used to customize or tailor our Global Address Complete to your specific needs.&nbsp; In the code","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"AC - JavaScript Options","og_description":"Option Overview Option Table Option Overview Options are used to customize or tailor our Global Address Complete to your specific needs.&nbsp; In the code","og_url":"https:\/\/test.serviceobjects.com\/docs\/dots-global-address-complete\/ac-javascript-options\/","og_site_name":"Service Objects | Contact, Phone, Email Verification | Data Quality Services","article_modified_time":"2023-12-06T17:12:37+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/test.serviceobjects.com\/docs\/dots-global-address-complete\/ac-javascript-options\/","url":"https:\/\/test.serviceobjects.com\/docs\/dots-global-address-complete\/ac-javascript-options\/","name":"AC - JavaScript Options","isPartOf":{"@id":"https:\/\/test.serviceobjects.com\/docs\/#website"},"datePublished":"2022-11-14T22:02:55+00:00","dateModified":"2023-12-06T17:12:37+00:00","description":"Option Overview Option Table Option Overview Options are used to customize or tailor our Global Address Complete to your specific needs.&nbsp; In the code","breadcrumb":{"@id":"https:\/\/test.serviceobjects.com\/docs\/dots-global-address-complete\/ac-javascript-options\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/test.serviceobjects.com\/docs\/dots-global-address-complete\/ac-javascript-options\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/test.serviceobjects.com\/docs\/dots-global-address-complete\/ac-javascript-options\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/test.serviceobjects.com\/docs\/"},{"@type":"ListItem","position":2,"name":"DOTS Global Address Complete","item":"https:\/\/test.serviceobjects.com\/docs\/dots-global-address-complete\/"},{"@type":"ListItem","position":3,"name":"AC &#8211; JavaScript Options"}]},{"@type":"WebSite","@id":"https:\/\/test.serviceobjects.com\/docs\/#website","url":"https:\/\/test.serviceobjects.com\/docs\/","name":"Service Objects | Contact, Phone, Email Verification | Data Quality Services","description":"","publisher":{"@id":"https:\/\/test.serviceobjects.com\/docs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/test.serviceobjects.com\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/test.serviceobjects.com\/docs\/#organization","name":"Service Objects | Contact, Phone, Email Verification | Data Quality Services","url":"https:\/\/test.serviceobjects.com\/docs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.serviceobjects.com\/docs\/#\/schema\/logo\/image\/","url":"https:\/\/test.serviceobjects.com\/docs\/wp-content\/uploads\/2022\/08\/SO-logo-2560px-transparent.png","contentUrl":"https:\/\/test.serviceobjects.com\/docs\/wp-content\/uploads\/2022\/08\/SO-logo-2560px-transparent.png","width":2560,"height":1440,"caption":"Service Objects | Contact, Phone, Email Verification | Data Quality Services"},"image":{"@id":"https:\/\/test.serviceobjects.com\/docs\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/5547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/comments?post=5547"}],"version-history":[{"count":23,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/5547\/revisions"}],"predecessor-version":[{"id":9932,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/5547\/revisions\/9932"}],"up":[{"embeddable":true,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/2321"}],"wp:attachment":[{"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/media?parent=5547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}