แสดงปัญหาและแนวทางแก้ไขแก่ผู้ขาย

คู่มือนี้อธิบายวิธีที่นักพัฒนาแอปบุคคลที่สามใช้บริการ MerchantSupport เพื่อสร้างหน้าการวินิจฉัยในแอปสำหรับผู้ขาย

คุณใช้บริการนี้เพื่อสร้าง UI ที่คล้ายกับหน้าการวินิจฉัยบัญชีและปัญหาเกี่ยวกับผลิตภัณฑ์ของ Merchant Center ได้

บริการ MerchantSupport ใช้สำหรับ UI ของบุคคลที่สามเท่านั้น ระบบจะทริกเกอร์คำขอเมื่อผู้ขายโต้ตอบกับ UI ของแอปพลิเคชัน หากต้องการให้ระบบวินิจฉัยอัตโนมัติสำหรับบัญชีผู้ขายของคุณเอง โปรดดูคำแนะนำสถานะบัญชี สถานะผลิตภัณฑ์ และการกรองผลิตภัณฑ์

เราขอแนะนำให้คุณระบุหน้าต่อไปนี้ในแอปเพื่อช่วยผู้ขายแก้ปัญหา

  • การวินิจฉัยบัญชี
  • การวินิจฉัยผลิตภัณฑ์

ตัวเลือกต่างๆ ในการติดตั้งใช้งานหน้าการวินิจฉัย

คุณใช้งานหน้าการวินิจฉัยได้หลายวิธี เลือกตัวเลือกที่กำหนดวิธีจัดการการดำเนินการวินิจฉัยที่ซับซ้อน โดยขึ้นอยู่กับความต้องการของคุณ ในคำขอ คุณจะตั้งค่า user_input_action_option เป็นอย่างใดอย่างหนึ่งต่อไปนี้ได้

  • REDIRECT_TO_MERCHANT_CENTER: นี่คือตัวเลือกเริ่มต้น การดำเนินการที่ต้องแสดงเนื้อหาเพิ่มเติมหรือรับข้อมูลเพิ่มเติมจากผู้ขายจะไม่สามารถใช้งานได้โดยสมบูรณ์ในแอป โดย API จะแสดงลิงก์สำหรับเปลี่ยนเส้นทางไปยังหน้าที่เกี่ยวข้องใน Merchant Center ซึ่งผู้ขายดำเนินการดังกล่าวได้

  • BUILT_IN_USER_INPUT_ACTIONS: คุณใช้การดำเนินการที่ซับซ้อนได้ ซึ่งต้องใช้ข้อมูลจากผู้ใช้เป็นโซลูชันในแอปในแอปพลิเคชัน

ใช้หน้าการวินิจฉัย

ส่วนนี้จะครอบคลุมวิธีใช้งานหน้าการวินิจฉัย ซึ่งจะใช้ตัวเลือกเริ่มต้น (แบบง่าย) เพื่อจัดการการดำเนินการที่ซับซ้อนเป็นการเปลี่ยนเส้นทางไปยัง Merchant Center

สำหรับการติดตั้งใช้งานขั้นสูงยิ่งขึ้นกับการกระทำในแอป ให้อ่านส่วนต่อไปนี้และดูการใช้การดําเนินการในตัวโดยใช้ข้อมูลจากผู้ใช้

การใช้งาน

กระบวนการในหน้าการวินิจฉัยควรมีลักษณะดังนี้

  1. ผู้ขายเปิดหน้าการวินิจฉัยในแอป
  2. แอปขอการวินิจฉัยโดยการเรียกใช้บริการ MerchantSupport

    ต่อไปนี้คือตัวอย่างคำขอ

    POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/merchantsupport/renderaccountissues?timeZone=America/Los_Angeles&languageCode=en-GB {}
    

    แทนที่ {merchantId} ด้วยตัวระบุที่ไม่ซ้ำกันของบัญชีที่คุณต้องการให้ทริกเกอร์การดำเนินการ

  3. แอปจะแสดงการวินิจฉัยและการดำเนินการที่แนะนำจากการตอบกลับผู้ขาย ต่อไปนี้คือตัวอย่างคำตอบ

    {
      "issues": [
        {
          "title": "Misrepresentation",
          "impact": {
            "message": "Prevents all products from showing in all countries",
            "severity": "ERROR",
            "breakdowns": [
              {
                "regions": [
                  {
                    "code": "001",
                    "name": "All countries"
                  }
                ],
                "details": [
                  "Products not showing organically"
                ]
              }
            ]
          },
          "prerenderedContent": "\u003cdiv class=\"issue-detail\"\u003e\u003cdiv class=\"issue-content\"\u003e\u003cp class=\"content-element\"\u003e\u003cspan class=\"segment\"\u003eBased on the information available about your business, there is reason to believe that customers are being misled on Google. Review the Misrepresentation policy and make changes to your Merchant Center and/or online store.u003c/span\u003e\u003c/p\u003e\u003cp class=\"content-element root-causes-intro\"\u003e\u003cspan class=\"segment\"\u003eMake sure your Merchant Center and online store follow the following best practices / guidelines\u003c/span\u003e\u003c/p\u003e\u003cul class=\"content-element root-causes\"\u003e\u003cli\u003e\u003cp\u003e\u003cspan class=\"segment\"\u003eProvide transparency about your business identity, business model, policies and how your customers can interact with you\u003c/span\u003e\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003e\u003cspan class=\"segment\"\u003ePromote your online reputation by showing reviews or highlighting any badges or seals of approval\u003c/span\u003e\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp class=\"tooltip tooltip-style-info\"\u003e\u003cspan class=\"segment\"\u003eUse a professional design for your online store that includes an SSL certificate\u003c/span\u003e\u003cspan class=\"tooltip-icon\"\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"tooltip-text\"\u003e\u003cspan class=\"segment\"\u003eMake sure it's accessible for all users without any redirects and doesn't have any placeholders for text and images.u003c/span\u003e\u003c/span\u003e\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp class=\"tooltip tooltip-style-info\"\u003e\u003cspan class=\"segment\"\u003eProvide information in the business information settings in your Merchant Center\u003c/span\u003e\u003cspan class=\"tooltip-icon\"\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"tooltip-text\"\u003e\u003cspan class=\"segment\"\u003eLink any relevant third-party platforms to your Merchant Center and create a Google Business Profile.u003c/span\u003e\u003c/span\u003e\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003e\u003cspan class=\"segment\"\u003eFollow SEO guidelines, improve your eligibility for seller ratings and match your product data in your Merchant Center with your online store\u003c/span\u003e\u003c/p\u003e\u003c/li\u003e\u003c/ul\u003e\u003ca href=\"https://support.google.com/merchants/answer/6150127?hl=en-US\" class=\"content-element\"\u003eLearn more about the Misrepresentation policy\u003c/a\u003e\u003c/div\u003e\u003c/div\u003e",
          "actions": [
            {
              "externalAction": {
                "type": "REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER",
                "uri": "https://merchants.google.com/mc/products/diagnostics/accountissues?a=672911686&hl=en-US"
              },
              "buttonLabel": "Request review",
              "isAvailable": true
            }
          ]
        },
        {
          "title": "Adult-oriented content",
          "impact": {
            "message": "Prevents all products from showing in all countries",
            "severity": "ERROR",
            "breakdowns": [
              {
                "regions": [
                  {
                    "code": "001",
                    "name": "All countries"
                  }
                ],
                "details": [
                  "Products not showing organically"
                ]
              }
            ]
          },
          "prerenderedContent": "\u003cdiv class=\"issue-detail\"\u003e\u003cdiv class=\"callout-banners\"\u003e\u003cdiv class=\"callout-banner callout-banner-info\"\u003e\u003cp\u003e\u003cspan class=\"segment\"\u003eReview requested on Aug 9, 2023. It can take a few days to complete.u003c/span\u003e\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv class=\"issue-content\"\u003e\u003cp class=\"content-element\"\u003e\u003cspan class=\"segment\"\u003eThere was a problem identified with the sale of prohibited adult products on your online store. In the case that you are intentionally selling adult items, enable Adult content in Settings in your Merchant Center. In your product file, use the \u003c/span\u003e\u003cspan class=\"segment segment-attribute\"\u003eadult\u003c/span\u003e\u003cspan class=\"segment\"\u003e attribute for specific products.u003c/span\u003e\u003c/p\u003e\u003cp class=\"content-element root-causes-intro\"\u003e\u003cspan class=\"segment\"\u003eMake sure the products meet the policy requirements\u003c/span\u003e\u003c/p\u003e\u003cul class=\"content-element root-causes\"\u003e\u003cli\u003e\u003cp class=\"tooltip tooltip-style-info\"\u003e\u003cspan class=\"segment\"\u003eAdult oriented content may be prohibited or restricted depending on the product sold and the country it is sold\u003c/span\u003e\u003cspan class=\"tooltip-icon\"\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"tooltip-text\"\u003e\u003cspan class=\"segment\"\u003eSee a full list of countries in the HelpCenter\u003c/span\u003e\u003c/span\u003e\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp class=\"tooltip tooltip-style-info\"\u003e\u003cspan class=\"segment\"\u003eDon't list sexually explicit content that is intended to arouse or includes content such as text, image, audio, or video of graphic sexual acts intended to arouse\u003c/span\u003e\u003cspan class=\"tooltip-icon\"\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"tooltip-text\"\u003e\u003cspan class=\"segment\"\u003eExamples: Graphic depictions of sexual acts in progress, including hardcore pornography, any type of genital, anal, or oral sexual activity; graphic depictions of masturbation or genital arousal and language explicitly referencing arousal, masturbation, cartoon porn, or hentai\u003c/span\u003e\u003c/span\u003e\u003c/p\u003e\u003c/li\u003e\u003c/ul\u003e\u003ca href=\"https://support.google.com/merchants/answer/6150138?hl=en-US#wycd-restricted-adult-content\" class=\"content-element\"\u003eLearn more about the Adult-oriented content policy\u003c/a\u003e\u003c/div\u003e\u003c/div\u003e"
        },
        {
          "title": "Missing return and refund policy",
          "impact": {
            "message": "Limits visibility of all products in all countries",
            "severity": "ERROR",
            "breakdowns": [
              {
                "regions": [
                  {
                    "code": "001",
                    "name": "All countries"
                  }
                ],
                "details": [
                  "Limited visibility for products showing organically"
                ]
              }
            ]
          },
          "prerenderedContent": "\u003cdiv class=\"issue-detail\"\u003e\u003cdiv class=\"issue-content\"\u003e\u003cp class=\"content-element\"\u003e\u003cspan class=\"segment\"\u003eThere was a problem identified with the return and/or refund policy of your online store. Update your return or refund policy to provide customers a transparent shopping experience.u003c/span\u003e\u003c/p\u003e\u003cp class=\"content-element root-causes-intro\"\u003e\u003cspan class=\"segment\"\u003eMake sure your products meet the Shopping policy requirements\u003c/span\u003e\u003c/p\u003e\u003cul class=\"content-element root-causes\"\u003e\u003cli\u003e\u003cp class=\"tooltip tooltip-style-info\"\u003e\u003cspan class=\"segment\"\u003eIt's available on your online store\u003c/span\u003e\u003cspan class=\"tooltip-icon\"\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"tooltip-text\"\u003e\u003cspan class=\"segment\"\u003eWe recommend that you have a separate landing page for your policy and link to it from the other pages on your online store, so that it's easy to find.u003c/span\u003e\u003c/span\u003e\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp class=\"tooltip tooltip-style-info\"\u003e\u003cspan class=\"segment\"\u003eIt's available in the language of the country you're selling in or in English\u003c/span\u003e\u003cspan class=\"tooltip-icon\"\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"tooltip-text\"\u003e\u003cspan class=\"segment\"\u003eMake sure that the return and/or refund policy is available in the target language or in English. Ideally, users should be given the option to select the return and/or refund policy in their own language.u003c/span\u003e\u003c/span\u003e\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003e\u003cspan class=\"segment\"\u003eIt's accessible to everyone visiting your online store, without having to log in, sign up or enter any personal information\u003c/span\u003e\u003c/p\u003e\u003c/li\u003e\u003c/ul\u003e\u003ca href=\"https://support.google.com/merchants/answer/9158778?hl=en-US\" class=\"content-element\"\u003eLearn more about Missing return and refund policy\u003c/a\u003e\u003c/div\u003e\u003c/div\u003e",
          "actions": [
            {
              "externalAction": {
                "type": "REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER",
                "uri": "https://merchants.google.com/mc/products/diagnostics/accountissues?a=672911686&hl=en-US"
              },
             "buttonLabel": "Request review",
             "isAvailable": true
            }
          ]
        }
      ],
      "alternateDisputeResolution": {
        "uri": "https://support.google.com/european-union-digital-services-act-redress-options?hl=en-US",
        "label": "Additional options available to you"
      }
    }
    

    เราขอแนะนำให้คุณแสดงปัญหาตามลำดับการส่งคืนด้วย title และ impact.message นอกจากนี้ เราขอแนะนำให้คุณแสดง impact.breakdowns ของปัญหาเมื่อผู้ขายวางเมาส์เหนือชื่อหรือคำอธิบายปัญหา

  4. ผู้ขายคลิกปัญหาจากรายการ

  5. แอปแสดงรายละเอียดimpactของแต่ละปัญหาตามcountry, destination, prerendered_content และปุ่มต่างๆ สำหรับactionsที่ผู้ขายใช้เพื่อแก้ปัญหาได้ การดำเนินการมีหลายประเภทดังนี้

    1. การดำเนินการภายนอก: ชี้ไปที่หน้าภายนอก เช่น ใน Merchant Center ซึ่งผู้ขายจะแก้ไขปัญหาได้
    2. การดำเนินการง่ายๆ ที่ติดตั้งมาในตัว: ชี้ไปที่หน้าเว็บในแอปพลิเคชันที่ผู้ขายสามารถแก้ปัญหาได้
    3. การดำเนินการป้อนข้อมูลจากผู้ใช้ในตัว: เปิดกล่องโต้ตอบที่ผู้ขายสามารถระบุข้อมูลที่จำเป็นและขอการดำเนินการได้ การดำเนินการประเภทนี้จะใช้ได้เมื่อมีการขอ BUILT_IN_USER_INPUT_ACTIONS เท่านั้น
  6. ผู้ขายทำตามวิธีการเพื่อแก้ไขปัญหา

  7. ผู้ขายจะโหลดหน้าการวินิจฉัยในแอปซ้ำ

  8. แอปของคุณส่งคำขออีกครั้งไปยังบริการ MerchantSupport และแสดงรายการปัญหาที่อัปเดต

คุณเปรียบเทียบข้อมูลที่แสดงโดยแอปที่เสร็จสมบูรณ์แล้วกับหน้าการวินิจฉัยใน Merchant Center เพื่อยืนยันการใช้งานได้

การจำลอง UI

ตัวอย่างวิธีแสดงข้อมูลจากการตอบกลับ renderaccountissues ในหน้าการวินิจฉัยบัญชีมีดังนี้ ออบเจ็กต์ใน UI จะแมปกับช่อง API ที่เกี่ยวข้องในการจำลอง คุณสร้างหน้าที่คล้ายกัน สำหรับปัญหาเกี่ยวกับผลิตภัณฑ์ได้

รูปภาพ

หน้าการวินิจฉัยบัญชีที่มีการป้อนข้อมูลจะมีลักษณะดังนี้

รูปภาพ

จัดรูปแบบ HTML ที่แสดงผลล่วงหน้า

การตอบกลับจากการเรียกใช้บริการ MerchantSupport จะมีช่อง prerendered_content ซึ่งเป็นรายละเอียดของแต่ละปัญหาในรูปแบบ HTML คุณฝังเนื้อหา HTML นี้ลงใน UI โดยตรงได้เพื่อแสดงปัญหาในรูปแบบที่อ่านได้

คุณอาจเห็นองค์ประกอบ HTML ในคลาส new-element ระบบจะใช้คลาส new-element กับองค์ประกอบที่เพิ่มลงใน HTML หลังจากที่คุณผสานรวมกับบริการ MerchantSupport แล้ว เราขอแนะนำให้ซ่อนองค์ประกอบด้วยคลาส new-element เพื่อให้คุณจัดรูปแบบองค์ประกอบเหล่านี้ก่อนที่จะแสดงต่อผู้ใช้ในแอปได้

ต่อไปนี้คือตัวอย่างของค่าในช่อง prerendered_content

<div class="issue-detail">
  <div class="callout-banners">
    <div class="callout-banner callout-banner-info"><p><span class="segment">Review requested on Aug 9, 2023. It can take a few days to complete.</span>
    </p></div>
  </div>
  <div class="issue-content"><p class="content-element"><span class="segment">There was a problem identified with the sale of prohibited adult products on your online store. In the case that you are intentionally selling adult items, enable Adult content in Settings in your Merchant Center. In your product file, use the </span><span
      class="segment segment-attribute">adult</span><span class="segment"> attribute for specific products.</span>
  </p>
    <p class="content-element root-causes-intro"><span class="segment">Make sure the products meet the policy requirements</span>
    </p>
    <ul class="content-element root-causes">
      <li><p class="tooltip tooltip-style-info"><span class="segment">Adult oriented content may be prohibited or restricted depending on the product sold and the country it is sold</span><span
          class="tooltip-icon"><br></span><span class="tooltip-text"><span class="segment">See a full list of countries in the HelpCenter</span></span>
      </p></li>
      <li><p class="tooltip tooltip-style-info"><span class="segment">Don't list sexually explicit content that is intended to arouse or includes content such as text, image, audio, or video of graphic sexual acts intended to arouse</span><span
          class="tooltip-icon"><br></span><span class="tooltip-text"><span class="segment">Examples: Graphic depictions of sexual acts in progress, including hardcore pornography, any type of genital, anal, or oral sexual activity; graphic depictions of masturbation or genital arousal and language explicitly referencing arousal, masturbation, cartoon porn, or hentai</span></span>
      </p></li>
    </ul>
    <a href="https://support.google.com/merchants/answer/6150138?hl=en-US#wycd-restricted-adult-content"
       class="content-element">Learn more about the Adult-oriented content policy</a></div>
</div>

ต่อไปนี้คือลักษณะของหากคุณฝัง HTML prerendered_content ก่อนหน้าในแอปโดยไม่มีการจัดรูปแบบ

รูปภาพ

คุณสามารถใช้คลาส CSS หลายคลาสเพื่อปรับวิธีการแสดงผลของเนื้อหาใน UI ได้ นี่คือตัวอย่าง CSS ที่คุณใช้ได้

issue-detail {
  text-align: left;
  width: 700px;
  border-radius: 8px;
  background: white;
  margin: 16px;
  padding: 16px;
}

.content-element {
  margin: 8px 0 8px 0;
  display: block;
}

/* callout banners */
.callout-banners {
  margin: 0 0 16px 0;
}

.callout-banner {
  display: block;
  padding: 16px 16px 6px 16px;
  margin: 0 0 8px 0;
  border-radius: 8px;
}

.callout-banner-info {
  background: #e8f0fe;
}

.callout-banner-warning {
  background: #fef7e0;
}

.callout-banner-error {
  background: #fce8e6;
}

/* add an icon to the callout banner */
.callout-banner p {
  background-repeat: no-repeat;
  padding-left: 32px;
}

.callout-banner-error p {
  background-image: url("https://fonts.gstatic.com/s/i/short-term/release/googlesymbols/error/default/20px.svg");
}

.callout-banner-warning p {
  background-image: url("https://fonts.gstatic.com/s/i/short-term/release/googlesymbols/warning/default/20px.svg");
}

.callout-banner-info p {
  background-image: url("https://fonts.gstatic.com/s/i/short-term/release/googlesymbols/search/default/20px.svg");
}

/* segments with style */
.segment-attribute {
  color: #198639;
  font-family: monospace, monospace;
}

.segment-bold {
  font-weight: bold;
}

.segment-italic {
  font-style: italic;
}

/* tooltip */
.tooltip {
  position: relative;
}

.tooltip-style-info .tooltip-icon:before {
  content: '(i)';
  font-style: normal;
  font-weight: normal;
  text-decoration: inherit;
  margin-left: 5px;
}

.tooltip-style-question .tooltip-icon:before {
  content: '(?)';
  font-style: normal;
  font-weight: normal;
  text-decoration: inherit;
  margin-left: 5px;
}

.tooltip .tooltip-text {
  visibility: hidden;
  text-align: left;
  background: white;
  border-radius: 8px;
  padding: 5px 0;
  border: 1px solid;
  padding: 10px;
  box-shadow: 3px 7px 12px #c1c1c1;
  position: absolute;
  z-index: 1;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
}

/* table */
table.content-element {
  margin: 16px 0 16px 0;
  border: 1px solid #ccc;
  border-collapse: collapse;
  margin: 1em 0;
}

table.content-element th {
  background-color: #eee;
}

table.content-element th, table td {
  border: 1px solid #ddd;
  font-size: 0.9em;
  padding: 0.3em 1em;
}

/* hidde elements added in future, until they are supported in your application */
.new-element {
  visibility: hidden;
}

ต่อไปนี้คือลักษณะของเนื้อหาที่แสดงผลหากคุณใช้ CSS ก่อนหน้า

รูปภาพ

นอกจากนี้ คุณยังกำหนดค่าและแสดงเคล็ดลับเครื่องมือด้วย CSS ได้โดยทำดังนี้

รูปภาพ

ใช้การดําเนินการในตัวกับอินพุตของผู้ใช้

การดำเนินการในตัวพร้อมอินพุตของผู้ใช้ช่วยให้คุณมอบความสามารถในการวินิจฉัยที่ซับซ้อนในฐานะโซลูชันในแอปในแอปพลิเคชันของคุณ เราขอแนะนำให้ใช้ข้อความนี้เป็นกล่องโต้ตอบที่ผู้ขายสามารถให้ข้อมูล อ่านข้อมูลเพิ่มเติม และยืนยันคำขอได้

การดำเนินการแต่ละรายการจะมีขั้นตอนการดำเนินการอย่างน้อย 1 ขั้นตอน การดำเนินการบางอย่าง อาจมีมากกว่า 1 ขั้นตอน เช่น อาจมีขั้นตอนที่แตกต่างออกไปเมื่อผู้ขายขอรับการตรวจสอบเพิ่มเติมเนื่องจากพวกเขาไม่เห็นด้วยกับผลการตัดสินและขั้นตอนที่ต่างออกไปเมื่อได้แก้ไขปัญหาแล้ว

หากต้องการขอข้อมูลเพื่อใช้การดำเนินการที่ซับซ้อนกับอินพุตของผู้ใช้ คุณต้องตั้งค่าช่อง user_input_action_option เป็นค่า BUILT_IN_USER_INPUT_ACTIONS

POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/merchantsupport/renderaccountissues

{
  "user_input_action_option": "BUILT_IN_USER_INPUT_ACTIONS"
}

แทนที่ {merchantId} ด้วยตัวระบุที่ไม่ซ้ำกันของบัญชีที่คุณต้องการให้ทริกเกอร์การดำเนินการ

การใช้งาน

กระบวนการในหน้าการวินิจฉัยซึ่งขอข้อมูลจากผู้ใช้ควรมีลักษณะดังนี้

  1. ผู้ขายคลิกปุ่มการทำงาน

    • หากมีหลายขั้นตอน แอปของคุณจะเสนอขั้นตอนทั้งหมดเพื่อให้ผู้ขายเลือกได้ 1 ขั้นตอนตามความต้องการ
    • ผู้ขายเลือกขั้นตอน
  2. แอปจะแสดงชื่อ ข้อความ ข้อความไฮไลต์ และแบบฟอร์มการป้อนข้อมูลของผู้ใช้สำหรับขั้นตอนการดำเนินการที่เลือก เราขอแนะนำให้คุณแสดงรายละเอียดเหล่านี้ในกล่องโต้ตอบ

    • (หากมี) ข้อความไฮไลต์มีข้อมูลสำคัญซึ่งมีจุดประสงค์เพื่อช่วยให้ผู้ขายเข้าใจวิธีการทำงานของการดำเนินการและสิ่งที่ต้องทำเพื่อให้ประสบความสำเร็จได้ดีขึ้น เราขอแนะนำให้ไฮไลต์ข้อความนี้และจัดรูปแบบ ตามความรุนแรงของข้อความเสริม
    • หากมีช่องป้อนข้อมูลใดๆ ในขั้นตอนดังกล่าว ก็จะต้องแสดงช่องเหล่านั้นเพื่อให้ผู้ขายระบุค่าได้ หากช่องป้อนข้อมูลมีการทำเครื่องหมายว่าต้องระบุ แอปของคุณไม่ควรให้ผู้ขายส่งคำขอก่อนที่จะให้ค่า
  3. ผู้ขายจะอ่านข้อมูลและระบุค่าที่ขอ

  4. ผู้ขายยืนยันคำขอด้วยการคลิกปุ่ม

  5. แอปทริกเกอร์การประมวลผลการดำเนินการโดยเรียกใช้บริการ MerchantSupport ต่อไปนี้คือตัวอย่างคำขอ

    POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/merchantsupport/triggeraction
    
    {
      actionContext: "ActionContextValue=",
      actionInput: { actionFlowId: "flow1",
      inputValues: [
      { input_field_id: "input1", checkbox_input_value: { value: true } }
      ]
    }
    

    แทนที่ {merchantId} ด้วยตัวระบุที่ไม่ซ้ำกันของบัญชีที่คุณต้องการให้ทริกเกอร์การดำเนินการ

    หากต้องการเข้าถึงเมธอด triggeraction สำหรับ BuiltInUserInputAction โปรดส่งคำขอโดยใช้แบบฟอร์มนี้

  6. แอปของคุณแสดงข้อความยืนยันที่ส่งคืนจากบริการ MerchantSupport

    • หากบริการส่งข้อผิดพลาดในการตรวจสอบความถูกต้องพร้อมสถานะ INVALID_ARGUMENT กลับมา บริการนั้นจะมีข้อมูลโดยละเอียดและข้อความแสดงข้อผิดพลาดที่แปลแล้วซึ่งควรจะแสดงให้แก่ผู้ขาย เราขอแนะนำให้แสดงข้อผิดพลาดดังกล่าวใกล้กับช่องป้อนข้อมูลที่ได้รับผลกระทบ ต่อไปนี้คือตัวอย่าง คำตอบตัวอย่าง
    {
      "error":
        {
          "code": 400,
          "message": "[actionInput.inputValues] Invalid user input",
          "status": "INVALID_ARGUMENT",
          "details": [
          {
            "@type": "type.googleapis.com/google.rpc.ErrorInfo",
            "reason": "invalid",
            "domain": "global"
          },
          {
            "@type": "type.googleapis.com/google.rpc.BadRequest",
            "fieldViolations": [
              {
                "field": "actionInput.inputValues.input",
                "description": "The field is required"
              }
            ]
          }
        ]
      }
    }
    
    • หากบริการแสดงผลสถานะที่ไม่ถูกต้องหรือข้อผิดพลาดภายในซึ่งระบุโดยสถานะ FAILED_PRECONDITION และ INTERNAL แอปควรสั่งให้ผู้ขายโหลดหน้าเว็บซ้ำหรือลองในภายหลัง