SOQVER ソースを準備
日本語

ブログ · 回答 ·

SO4AGの適用条件を顧客の要望とどう照合しますか?

把握している顧客情報とSO4AGの事実情報を照合し、不明な条件は推測せずに扱います。事実情報が現在も有効で、事業者によって明示されていることも確認します。

To match a customer’s request, compare its known details with the conditions on each SO4AG fact. Every specific condition must match, and any covers every value for that condition. If a missing detail could change which answer applies, ask for it. Present a fact’s value as current only if the business states it and its last day has yet to pass.

Match the details each fact depends on

SO4AG (Source Objects for AGents) is an open format for business facts, currently a working draft at version 0.1. A condition limits a fact to a particular country, customer type, item, branch, or other detail.

Compare every condition on a fact with the corresponding detail in the request. A fact for a specific item at a specific branch requires a match on both. A matching item at a different branch fails the branch condition. If the branch is missing, you still need that detail to determine whether the fact applies. See how facts and conditions are represented in the SO4AG 0.1 specification.

Match a business-only price

A price with customer: business satisfies the customer condition only when the request identifies the customer as a business. Apply that test to the request for which you plan to display the price.

Example: Example Plumbing (plumbing.example) states a price of 120.00 USD for a drain inspection for business customers. The table shows how three requests for the same inspection match the customer condition.

Customer detail in the requestMatch result
ビジネスThe customer condition matches.
IndividualThe customer condition fails.
Customer type missingThe match is unresolved.

The price table resolves customer type alone. If Example Plumbing also limits that price to a particular branch, check the branch before displaying the amount. The amount and the conditions belong together when your application presents the result. Read more about this in What a price needs before a program can use it.

Apply any to the condition that names it

The explicit value any means that a fact applies to every value of the specified condition. You can satisfy that condition even if the request leaves the corresponding detail open.

In the same example, suppose Example Plumbing states that it accepts card payments with customer: any. The payment fact covers business and individual customers, so you can use it without first asking for the customer type. If the payment fact also names a specific branch, you still need to match that branch. Apply any to its own condition and evaluate the remaining conditions individually.

Ask for a missing detail that changes the answer

Ask for a missing detail when you need it to decide whether a specific fact applies. If the application already knows the detail from the user’s selection, use that selection.

If someone requests the Example Plumbing inspection price and leaves customer type open, ask whether the booking is for a business or an individual before presenting 120.00 USD as their price. Once the customer answers, run the condition check again. If the customer leaves the question unanswered, keep the price match unresolved. You can still present the card payment fact if it applies to the request and is current.

Check the last day and whether the fact is stated

A matching fact is current through its last day. After that day, treat it as history. Before presenting a current value, also check whether the business states the fact.

If the Example Plumbing price lists June 30, 2027 as its last day, you can use that record as current on June 30 for a matching business request. On July 1, the same record is history. See what happens when a SO4AG fact reaches its last day.

When an applicable fact is marked not stated, show that status if it helps the user understand the answer. For a price, say that the business does not state a price for the matching conditions. Keep the status as not stated in your application data so it stays distinct from zero, an empty value, and no limit.

よくある質問

Can I use a fact when the request has extra details?

Yes, if the request satisfies every condition on the fact. A request can include the customer’s country even when the fact only specifies customer type.

What if one condition fails and another detail is missing?

A single failed condition rules out the fact for that request. Ask for the missing detail only if it could help you match another relevant fact.

Where do I find the website wording behind a fact?

Each SO4AG fact carries the address of its source page. It may also include the exact wording from that page.

次のステップ

Use the SOQVER developer guide to start reading published facts. Test your matcher with a business request, an individual request, and a request with no customer type. Then repeat the test with customer: any, a last day that has passed, and a fact marked not stated.

その他の記事

回答 ·

公開前にCIでSO4AGファイルを検証する方法

バージョンを固定したSO4AGバリデーターをインストールし、ローカル検証をCIの必須ステップに設定します。デプロイ後は、公開されているso4ag.jsonのURLを検証します。

回答 ·

FAQページとSO4AGファイルはいつ必要ですか?

顧客からよく寄せられる質問への回答にはFAQを使い、具体的な事実情報を適用条件、日付、出典とともに公開するにはSO4AGファイルを使います。

回答 ·

異なる数値が記載された2つのページを修正する方法

両方のページの提供内容、対象者、場所、日付を比較し、事業者の確認済み数値を用いて、ページと公開済みの事実を更新してください。

ウェブサイト無料診断 すべての記事