---
title: "Personalize APIに電話して"
slug: "call-the-personalize-api"
abstract: "Personalize REST API(Sitecore Personalize)を使ってインタラクティブな実験や体験を行う方法を説明します。"
---
# Personalize APIに電話して

POST /v2/callFlows

ウェブベースまたはモバイルアプリケーション上でインタラクティブな実験や体験を行います。

フロー実行リクエストを送信する際、これらの属性のうち1つしか使用できません; browserId、email、またはidentifiers。

> !重要変換済み目標をアトリビューション率に含めるには、browserId属性を使ってフローを実行しなければなりません。これにより、実験や体験は実行されるたびに同じセッションに保存されます。これにより、マーケターがインタラクティブな実験や体験に追加した目標が正しいブラウザセッションに帰属され、コンバージョンがカウントされ、[パフォーマンス分析を閲覧](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/en/view-performance-analytics-in-sitecore-personalize.html)した際にアトリビューション率が正確であることが保証されます。

実験や経験を毎回別のセッションに保存するには、emailまたはidentifiers属性を使いましょう。

オプションとして、paramsオブジェクトを使ってカスタムフィールドを含めることも可能です。

browserIdを使って実験や体験をしてみましょう:

curl -X POST '<baseURL>/v2/callFlows' \\
-H 'Content-Type: application/json' \\
-H 'Accept: application/json' \\
--data-raw '
{
 "clientKey": "abBah8aelipaPeebae7roox2tiexoSee",
 "channel": "WEB",
 "language": "en",
 "currencyCode": "EUR",
 "pointOfSale": "myretailsite/ireland",
 "browserId": "a38b230c-11eb-4cf9-8d5d-274e9f344925​",
 "friendlyId": "home\_page\_banner"
}'

emailを使って実験や体験をしてみましょう:

curl -X POST '<baseURL>/v2/callFlows' \\
-H 'Content-Type: application/json' \\
-H 'Accept: application/json' \\
--data-raw '
{
 "clientKey": "abBah8aelipaPeebae7roox2tiexoSee",
 "channel": "WEB",
 "language": "en",
 "currencyCode": "EUR",
 "pointOfSale": "myretailsite/ireland",
 "email": "jane.doe@myretailsite.com",
 "friendlyId": "home\_page\_banner"
}'

identifiersを使って実験や体験をしてみましょう:

curl -X POST '<baseURL>/v2/callFlows' \\
-H 'Content-Type: application/json' \\
-H 'Accept: application/json' \\
--data-raw '
{
 "clientKey": "abBah8aelipaPeebae7roox2tiexoSee",
 "channel": "WEB",
 "language": "en",
 "currencyCode": "EUR",
 "pointOfSale": "myretailsite/ireland",
 "identifiers":{
 "id":"123456",
 "provider":"BXLP"
 },
 "friendlyId": "home\_page\_banner"
}'

カスタムフィールドを含める:

curl -X POST '<baseURL>/v2/callFlows' \\
-H 'Content-Type: application/json' \\
-H 'Accept: application/json' \\
--data-raw '
{
 "clientKey": "abBah8aelipaPeebae7roox2tiexoSee",
 "channel": "WEB",
 "language": "en",
 "currencyCode": "EUR",
 "pointOfSale": "retailsite.com",
 "browserId": "a38b230c-11eb-4cf9-8d5d-274e9f344925​",
 "params":{
 "loggedInState":"loggedIn",
 "someKey":"someValue"
 },
 "friendlyId": "home\_page\_banner"
}'

params.utmオブジェクトにUTMパラメータを含める:

curl -X POST '<baseURL>/v2/callFlows' \\
-H 'Content-Type: application/json' \\
-H 'Accept: application/json' \\
--data-raw '
{
 "clientKey":"abBah8aelipaPeebae7roox2tiexoSee",
 "channel":"WEB",
 "language":"en",
 "currencyCode":"EUR",
 "pointOfSale":"retailsite.com",
 "browserId": "a38b230c-11eb-4cf9-8d5d-274e9f344925​",
 "params":{
 "utm":{
 "campaign":"summer\_sale",
 "source":"newsletter",
 "medium":"email",
 "content":"running shoes"
 }
 },
 "friendlyId":"home\_page\_banner"
}

 {
 "trackingUrl": "<apiEndpoint>/v3/trackers/eyJjaGFubmVsIj",
 "Name": "Ancillary bundle",
 "imageURLForTesting": "https://png.icons8.com/ios/50/000000/cardboard-box.png"
 },
 {
 "trackingUrl": "<apiEndpoint>/v3/trackers/eyJjaGFubmVsIj",
 "Name": "Ancillary seat",
 "imageURLForTesting": "https://png.icons8.com/dotty/50/000000/flight-seat.png"
 },
 {
 "trackingUrl": "<apiEndpoint>/v3/trackers/eyJjaGFubmVsIj",
 "Name": "Ancillary bag",
 "imageURLForTesting": "https://png.icons8.com/metro/50/000000/suitcase.png",
 "nonDependent": "false"
 },
 {
 "trackingUrl": "<apiEndpoint>/v3/trackers/eyJjaGFubmVsIj",
 "Name": "Ancillary insurance",
 "imageURLForTesting": "https://png.icons8.com/ios/50/000000/umbrella.png",
 "nonDependent": "false"
 }