<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><language>en</language><title>Blog posts by Google's Structured data with Opti B2B</title> <link>https://world.optimizely.com/blogs/googles-structured-data-with-opti-b2b/</link><description></description><ttl>60</ttl><generator>Optimizely World</generator><item> <title>Optimizely Configured Commerce Custom POST API</title>            <link>https://world.optimizely.com/blogs/googles-structured-data-with-opti-b2b/dates/2023/9/optimizely-configured-commerce-custom-post-api/</link>            <description>&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;When creating custom API controllers for an Optimizely B2B project it&amp;rsquo;s possible you&amp;rsquo;ll want to create POST calls. Following the architecture of the base code you will likely have a controller that inherits from the BaseApiController and utilizes ExecuteAsync or Execute methods to map your parameters and results and run a service method.&lt;/p&gt;
&lt;p&gt;What can sometimes go unnoticed is that any result you&amp;rsquo;d like to return from a POST call requires a populated &amp;ldquo;Uri&amp;rdquo; string field on your result model.&amp;nbsp; This is because the Optimizely BaseApiController will not return the API result model with the POST response if the model doesn&amp;rsquo;t have a Uri value or it is null or blank. See the code section below from the BaseApiController Execute method:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;            if (this.Request.Method == HttpMethod.Post)
            {
                if (apiResult.Uri.IsBlank())
                {
                    return this.StatusCode(HttpStatusCode.Created);
                }

                return this.Created(apiResult.Uri, apiResult);
            }

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can see that without a Uri parameter on the apiResult object, the method will simply return a &amp;ldquo;Created&amp;rdquo; status code as the result and omit the actual apiResult object payload.&amp;nbsp; So, if you are seeing empty results from your custom POST method, it&amp;rsquo;s likely you have not properly set the Uri field and the object is being left off the response.&amp;nbsp; If your response model inherits from BaseModel, then it already has a Uri parameter and you simply need to set it, likely in your mapper.&amp;nbsp; Several of the Optimizely B2B API flows will set the Uri parameter in the mapper, like the AccountsV1 endpoint does in GetAccountMapper:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;        public virtual AccountModel MapResult(
            AddAccountResult serviceResult,
            HttpRequestMessage request
        )
        {
            var accountModel = this.GetAccountMapper.MapResult(
                serviceResult.GetAccountResult,
                request
            );

            accountModel.Password = accountModel.IsGuest ? serviceResult.Password : string.Empty;
            accountModel.BillToId = serviceResult.BillTo.Id;
            accountModel.ShipToId = serviceResult.ShipTo.Id;

            accountModel.Uri = this.UrlHelper.Link(
                &quot;AccountV1&quot;,
                new { accountid = Constants.WebApiCurrent },
                request
            );

            return accountModel;
        }

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The Uri should accurately identify the way that object could be resourced.&amp;nbsp; In this case, the UrlHelper.Link method returns the Get Account method which includes the Account Id.&amp;nbsp;&lt;/p&gt;</description>            <guid>https://world.optimizely.com/blogs/googles-structured-data-with-opti-b2b/dates/2023/9/optimizely-configured-commerce-custom-post-api/</guid>            <pubDate>Wed, 06 Sep 2023 17:15:08 GMT</pubDate>           <category>Blog post</category></item><item> <title>Using Google’s structured data to improve your SEO in Optimizely&#39;s B2B Configured Commerce</title>            <link>https://world.optimizely.com/blogs/googles-structured-data-with-opti-b2b/dates/2023/9/using-googles-structured-data-to-improve-your-seo-in-optimizelys-b2b-configured-commerce/</link>            <description>&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Following proper markup standards for search engine optimization is imperative for the success of every website. While Optimizely B2B&amp;rsquo;s platform properly follows the guidelines for setting structure data for google to crawl on the pages that come out of the box, it&amp;rsquo;s important to make sure any new pages follow similar guidelines depending on the type of page.&lt;/p&gt;
&lt;p&gt;The way any content management system provides the ability to create dynamic content easily in small containers can make it difficult to apply structured data. To make it easier with Opti B2B, XCentium has developed extension pages that have structured data properly in place for the specific page type.&lt;/p&gt;
&lt;p&gt;Google search has structured data types for many specific content pages outside of eCommerce pages including the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;FAQ&amp;rsquo;s&lt;/li&gt;
&lt;li&gt;Articles&lt;/li&gt;
&lt;li&gt;How-To&#39;s&lt;/li&gt;
&lt;li&gt;Events&lt;/li&gt;
&lt;li&gt;Breadcrumbs&lt;/li&gt;
&lt;li&gt;Job Postings&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We find that our clients often require a &amp;ldquo;Frequently Asked Questions (FAQs)&amp;rdquo; page on their website.&amp;nbsp; Google offers a structured data format for FAQ pages and individual question/answer pairs to create rich results on google search and actions with Google Assistant, see below for&amp;nbsp;how frequently asked questions rich results could appear in search results for your website:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://mms-delivery.sitecorecloud.io/api/media/v2/delivery/03da597b-4392-4f8e-91cf-08dac63d0cbe/4c920aa837e241fb8b1b45f35f518478&quot; alt=&quot;OptiSeo1&quot; /&gt;&lt;/p&gt;
&lt;p&gt;So, XCentium has leveraged the ability to create custom page types and widgets to build out elements that leverage Google&amp;rsquo;s structured data, allowing your team to simply create FAQs on your FAQ page that will automatically tag the HTML with the correct structured data elements necessary for Google to identify the elements of the page as being used for FAQs.&lt;/p&gt;
&lt;p&gt;In Optimizely B2B&amp;rsquo;s CMS it&amp;rsquo;s as easy as adding an &amp;ldquo;FAQ&amp;rdquo; widget, populating the question and answer fields, and then arranging it on your FAQs page as&amp;nbsp;you would with any other widget, shown here in the Spire CMS:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://mms-delivery.sitecorecloud.io/api/media/v2/delivery/03da597b-4392-4f8e-91cf-08dac63d0cbe/dfbd2206827b4060b06665e08c091ba9&quot; alt=&quot;OptiSeo2&quot; /&gt;&lt;img src=&quot;https://mms-delivery.sitecorecloud.io/api/media/v2/delivery/03da597b-4392-4f8e-91cf-08dac63d0cbe/f08d492827d74ff88001a46d5838195a&quot; alt=&quot;OptiSeo3&quot; /&gt;&lt;/p&gt;
&lt;p&gt;We have also adapted the same logic to work with the Classic CMS:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://mms-delivery.sitecorecloud.io/api/media/v2/delivery/03da597b-4392-4f8e-91cf-08dac63d0cbe/7d9d630a12df4a5d975a3acc299a2c63&quot; alt=&quot;OptiSeo4&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://mms-delivery.sitecorecloud.io/api/media/v2/delivery/03da597b-4392-4f8e-91cf-08dac63d0cbe/18117fd104e4425fac7de83217baa54b&quot; alt=&quot;OptiSeo5&quot; /&gt;&lt;/p&gt;
&lt;p&gt;See how Google recognizes the markup as valid FAQ structured data for the above screenshots:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://mms-delivery.sitecorecloud.io/api/media/v2/delivery/03da597b-4392-4f8e-91cf-08dac63d0cbe/ed333069dfcf4ad8a5ab59f84b21a0a8&quot; alt=&quot;OptiSeo6&quot; /&gt;&lt;/p&gt;
&lt;p&gt;We at XCentium have applied this same logic to other specific content pages like the ones listed above, including blogs/articles, events, and how-tos.&lt;/p&gt;</description>            <guid>https://world.optimizely.com/blogs/googles-structured-data-with-opti-b2b/dates/2023/9/using-googles-structured-data-to-improve-your-seo-in-optimizelys-b2b-configured-commerce/</guid>            <pubDate>Wed, 06 Sep 2023 17:14:02 GMT</pubDate>           <category>Blog post</category></item></channel>
</rss>