This recipe walks end-to-end:
  1. Run the pricepally-api reference backend
  2. Create the agent in the dashboard
  3. Ground answers with a knowledge base (delivery, payments, seasons)
  4. Wire a Skill for search products, add to cart, and track order status
  5. Deploy the Mobile app profile and embed in React Native
The reference backend lives at pricepally-api/ in the Chatropic repo (port 8084). The reference mobile shell is examples/react-native-demo/. Swap in your own API base URL, the dashboard action setup is the same.

What you are building


API reference (pricepally-api)

All protected routes require Authorization: Bearer <jwt> from POST /api/auth/login.

Agent BFF routes (signed-in users)

When each shopper has their own JWT, point Chatropic actions at /api/agent/* instead of calling protected routes with a shared token. The BFF validates a static service token, reads X-End-User-Id, looks up that user’s Pricepally JWT from the session store, and proxies the request. BFF headers (on every agent action):
There is no separate /api/products/search route. Product search is implemented as GET /api/products with the q query parameter. Order lookup uses GET /api/orders with order_id: there is no GET /api/orders/:id path segment.

Prerequisites

1

Start Postgres

From the Chatropic repo root:
2

Run pricepally-api

Verify: curl http://localhost:8084/health, {"status":"ok"}On first boot the API runs migrations and seeds from seed/pricepally_seed.json.
3

Demo credentials

4

Obtain a JWT for action testing

Copy token from the response, use it when testing actions in the dashboard.
5

Chatropic dashboard

Open the playground dashboard (default http://localhost:3000) and sign in to your workspace.

Step 1, Create the agent

1

Create workspace

Sign in and open (or create) a workspace for your grocery product.
2

Set product type

Use Customer Support so the agent can combine knowledge retrieval with HTTP actions.
3

Open Playground

In Playground, set the display name (for example Pricepally Assistant), welcome message, and suggested prompts (see Step 6).

Step 2, Knowledge base setup

Ground delivery, payment, and policy answers so the agent does not invent storefront rules.
1

Add FAQ documents

Documents: paste or upload content such as:
2

Smoke test retrieval

New test session, ask “What payment methods do you accept?”, answer should cite your document.

Step 3, Authentication for actions

pricepally-api protects catalog, cart, and order routes with JWT. Pick one pattern:
1

Login and copy token

2

Save static token

Manage tokens: new Static token
3

Use in action headers

On each HTTP action:
Point actions at /api/products, /api/cart/items, /api/orders (not /api/agent/*).

Manage tokens

Static vs customer-login tokens.

Step 4, Skill setup

Create one skill per feature under Agent settings → Skills → New skill. Each skill covers a single capability and auto-creates the linked HTTP action when saved.

What is a Skill?

A Skill is a playbook that tells the agent when to activate and how to carry out one feature, including the API call to make. When you save a skill with a webhook step, Chatropic creates (or updates) the linked HTTP action automatically. See the Skills guide for the full editor reference. Create the three skills below in sequence. For each one:
  1. Open Agent settings → Skills, then New skill.
  2. Paste the description prompt into the Describe your skill field.
  3. Review the generated When to use, Steps, and webhook URL/headers. Edit inline if needed.
  4. Click Save skill. The linked action appears under Available actions.
For the Demo static JWT pattern, replace {{token.pricepally_bff}} with {{token.pricepally_demo_jwt}} and use the direct API URLs (/api/products, /api/cart/items, /api/orders) instead of /api/agent/*.

4a, Search products skill

Prompt to paste:
When a shopper asks what produce is available, in season, or asks for the price of an item, search the Pricepally catalog. Call GET http://localhost:8084/api/agent/products?q={{query}} with headers Authorization: Bearer {{token.pricepally_bff}} and X-End-User-Id: {{end_user_id}}. Summarize results by name, price range in Naira, and season status. If no results, say so and suggest refining the search.
Webhook the skill should generate: Sample response:

4b, Add to cart skill

Prompt to paste:
When a shopper asks to add an item to their cart, add it using the Pricepally API. If the product_id is not already known, first search for the product to resolve it. Then call POST http://localhost:8084/api/agent/cart/items with headers Authorization: Bearer {{token.pricepally_bff}}, X-End-User-Id: {{end_user_id}}, Content-Type: application/json, and Accept: application/json. Send body {"product_id":"{{product_id}}","quantity":{{quantity}}}. Default quantity to 1 if not specified. Confirm the updated cart subtotal in Naira.
Webhook the skill should generate:
Accept: application/json is required. The mobile app uses Accept: text/event-stream for live cart sync; the agent action needs a normal JSON response.
Sample response:

4c, Order status skill

Prompt to paste:
When a shopper asks where their order is or provides an order reference, look up the delivery status. Call GET http://localhost:8084/api/agent/orders?order_id={{order_id}} with headers Authorization: Bearer {{token.pricepally_bff}} and X-End-User-Id: {{end_user_id}}. Report the status, order date, and main product. If the user asks to see all their orders without a reference, omit the order_id parameter.
Webhook the skill should generate: Sample response:

Validate auto-created actions

After saving all three skills, confirm each linked action is wired correctly:
  1. Open Available actions → click each action (search_products, add_to_cart, get_order_status)
  2. Verify the URL, method, and headers match the tables above
  3. Use the action Test panel with sample parameters (query: "ginger", order_id: "00A49291044D1")
  4. Use each action’s Test panel to check resolved URLs and response bodies

Skills

Create and manage skills under Agent settings.

Action chaining

Search → add to cart chain reference.

Step 5, Agent instructions

In AI (or Agent settings), add system guidance:
Guardrails: block requests for card numbers or passwords in chat; use Escalate to human for delivery disputes.

Step 6, Suggested prompts

Suggested prompts on the Content tab:

Step 7, Test in Playground

1

Product search

Ask “Do you have ugu?”, search_products with q=ugu, agent lists Ugu with price range.
2

Add to cart

Ask “Add ginger to my cart”, search then add_to_cart with product_id: "3", confirms updated subtotal.
3

Order status

Ask “Where is order 00B77120355E2?”, get_order_status, explains Processing status and main item.
4

FAQ without action

Ask “How do I pay?”, answer from Documents, no HTTP call.
Check each action’s Test panel for resolved URLs and response bodies, and your API’s server logs for the incoming requests.

Step 8, React Native embed

The repo includes a Pricepally-skinned demo that uses the same API for login, products, cart SSE, and orders.
1

Configure env

2

Run services

3

Deploy mobile profile

Mobile app, configure style and content, Deploy, toggle Live.
4

Sign in and chat

Use demo credentials ada@pricepally.demo / Demo1234! in the app shell, then open the chat launcher. Cart tab stays in sync via GET /api/cart/stream SSE.

React Native deploy

Mobile app profile and tenant id.

React Native SDK

ChatWidgetLauncher, storage, and identity props.

Quick curl reference


Troubleshooting