Sandbox and production
Every org has a sandbox and a production, on one gateway: what each holds, and what moves between them.
Every org on Pinecall has a sandbox and a production, served by the same gateway at the same address. The sandbox is where your team tries things; production is what your customers reach. Nothing you do in one reaches the other.
What are the sandbox and production?#
One gateway (https://cloud.pinecall.io) and one key serve both. The gateway decides which one a
request acts in from the key and from what the request names, never from the host name. A
sandbox call never runs on the same workers as a production call, so a busy sandbox never slows
production down.
Choosing sandbox or production#
In the CLI, every command acts in the sandbox. Add --prod to act in production, for that one
command:
$ pinecall sessions # your sandbox calls
$ pinecall sessions --prod # production's calls
$ pinecall agent set --greeting "Clínica Norte, how can I help you?" --prod
pinecall whoami prints sandbox or production on its first line, and whether your key may act
in production.
In the console, the address says which: https://cloud.pinecall.io/ is production's console and
https://cloud.pinecall.io/sandbox/ the sandbox's. The Production · Sandbox switch in the
sidebar opens the same screen on the other side, with the same sign-in. pinecall console opens
the sandbox's console signed in, and pinecall console --prod production's.
The sandbox is yours#
In the sandbox each person has a copy of their own. Your pinecall start holds your copy of the
agent, your pinecall chat talks to it, and your test calls are logged under it. A colleague
running the same agent has their own copy, and neither of you takes the other's.
Settings work the same way. pinecall agent set writes your own settings; add --team to write
the team's, which everyone who set nothing of their own falls back to. An admin can see everyone's
sandbox settings, but only you hold yours (Agent settings).
Production is the org's#
Production has one copy of each agent: the org's. It is held by a process that runs on a server token, not on a person's key, so it keeps running when the person who set it up leaves. That process is either:
- your project, run by Pinecall with
pinecall deploy --prod(Deploy to Pinecall), or - your project on your own server, with a production server token in its secrets (Run it on your own server).
A person can still act in production one command at a time with --prod, but only while their
production switch is on. An admin turns it on in the console's Team screen
(Orgs, people and roles). Without it, every --prod is refused:
403 Bruno has no production access: an admin gives it in Team
What each one holds#
| sandbox | production | |
|---|---|---|
| the agent | one copy per person, plus the team's | one, the org's |
| the agent's settings and lexicon | your own, or the team's with --team |
one set, written with --prod or from production's console |
| calls and their logs | your own copy's | production's |
| a contact's memory | the sandbox's facts | production's facts, kept apart |
| knowledge bases | the sandbox's | production's |
| numbers | optional | the ones your customers call |
| limits | the sandbox's | production's; the dollar budget is shared by both |
Some things belong to the org and are the same in both: its people, its carrier accounts and its own provider keys.
Testing on your production number#
You do not need a sandbox number to test the telephone. Tell Pinecall which phone is yours, once:
$ pinecall line from +59899111111
From then on, while your pinecall start holds the agent, a call from that phone to one of the
org's production numbers reaches your sandbox copy. Every other caller still reaches production.
pinecall line forget, or stopping pinecall start, sends your calls back to production. The
sandbox console's Phone testing tab shows which number reaches your copy.
A server token opens only the sandbox or only production. A
pc_test_token is the sandbox's; apc_live_token used for a sandbox request is refused by the gateway:this key is a production server's token, and this request is for sandbox: a server's token opens the world it was made in.
What moves between them#
Nothing moves on its own. A setting reaches production when you set it there, with --prod on the
same command. Production's documents are pushed with pinecall docs push --prod. A number answers in
one of them at a time; production's Numbers screen has Move to sandbox on each number, and the
Numbers API moves one either way. From sandbox to production
walks it step by step.