picked 0.0.115 → 0.0.116-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/docs/explanation/apps.md +4 -0
- package/docs/how-to/apps/add-a-page-to-the-dashboard.md +10 -8
- package/docs/how-to/apps/connect-a-google-app.md +100 -0
- package/docs/how-to/apps/connect-a-third-party-service-with-oauth.md +19 -12
- package/docs/how-to/apps/connect-vercel.md +101 -0
- package/docs/how-to/apps/connect-zoho-crm.md +105 -0
- package/docs/how-to/apps/host-an-app-on-vercel.md +5 -2
- package/docs/how-to/apps/link-to-an-installation-from-your-site.md +57 -21
- package/docs/how-to/apps/read-project-data-from-an-app.md +4 -3
- package/docs/how-to/apps/run-code-when-a-workspace-publishes.md +2 -0
- package/docs/how-to/apps/use-an-app-tool-in-a-workflow.md +7 -0
- package/docs/how-to/install-the-gtm-template.md +9 -9
- package/docs/reference/apps/app-kit.md +132 -56
- package/docs/reference/apps/environment.md +48 -12
- package/docs/reference/apps/google.md +235 -0
- package/docs/reference/apps/protocol.md +24 -6
- package/docs/reference/apps/vercel.md +222 -0
- package/docs/reference/apps/zoho-crm.md +214 -0
- package/docs/reference/glossary.md +8 -7
- package/docs/reference/management-api/schema/project.md +70 -2
- package/docs/reference/tools/mcp.md +11 -7
- package/package.json +4 -4
|
@@ -19,12 +19,12 @@ Picked sends lifecycle events, app events and workflow tool calls to a path belo
|
|
|
19
19
|
`endpoint` of the manifest that the installation uses. Picked sends MCP requests to the
|
|
20
20
|
`mcp.url` of the manifest. An app with no `endpoint` and no `mcp` gets no requests.
|
|
21
21
|
|
|
22
|
-
| Request | Method and URL
|
|
23
|
-
| ------------------ |
|
|
24
|
-
| Lifecycle event | `POST <endpoint>/lifecycle`
|
|
25
|
-
| App event | `POST <endpoint>/events`
|
|
26
|
-
| Workflow tool call | `POST <endpoint>/tools/<name>`
|
|
27
|
-
| MCP request | `POST`, `GET` or `DELETE` `<mcp.url>`
|
|
22
|
+
| Request | Method and URL | When Picked sends it |
|
|
23
|
+
| ------------------ | ------------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
24
|
+
| Lifecycle event | `POST <endpoint>/lifecycle` | After a person installs or upgrades the app on a project, and before a person removes it. |
|
|
25
|
+
| App event | `POST <endpoint>/events` | After an event that the manifest lists in `events`. |
|
|
26
|
+
| Workflow tool call | `POST <endpoint>/tools/<name>` | When a workflow node runs the tool `<name>` of the manifest. |
|
|
27
|
+
| MCP request | `POST`, `GET` or `DELETE` `<mcp.url>` | When the AI agent in the dashboard uses the MCP server of the app. |
|
|
28
28
|
|
|
29
29
|
## Headers
|
|
30
30
|
|
|
@@ -129,6 +129,24 @@ Picked publishes its public keys as a JSON Web Key Set at
|
|
|
129
129
|
The set holds the current key of Picked first. After Picked replaces its key, the set can
|
|
130
130
|
also hold old keys.
|
|
131
131
|
|
|
132
|
+
## App config of Picked
|
|
133
|
+
|
|
134
|
+
Picked publishes the dashboard origins of its environment at
|
|
135
|
+
`<Picked API>/.well-known/picked-app-config.json`, for example
|
|
136
|
+
`https://api.picked.app/.well-known/picked-app-config.json`. The response has
|
|
137
|
+
`cache-control: public, max-age=300`.
|
|
138
|
+
|
|
139
|
+
```json
|
|
140
|
+
{ "dashboardOrigins": ["https://dashboard.picked.app", "https://acme.picked.app"] }
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
| Field | Value |
|
|
144
|
+
| ------------------ | ---------------------------------------------------------------------------------- |
|
|
145
|
+
| `dashboardOrigins` | The origin of the dashboard, and the host of each client that shows the dashboard. |
|
|
146
|
+
|
|
147
|
+
The origin of the dashboard is first. An app lets these origins show its pages in an `iframe`,
|
|
148
|
+
and links to the first. See [App config of Picked](/reference/apps/environment#app-config-of-picked).
|
|
149
|
+
|
|
132
150
|
## The `InstallationRef` fields
|
|
133
151
|
|
|
134
152
|
Each request body from Picked contains these fields. They identify the installation, and the
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: reference
|
|
3
|
+
layout: docs
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Vercel app
|
|
7
|
+
|
|
8
|
+
The Vercel app deploys Vercel projects again when a Picked project publishes a workspace. It
|
|
9
|
+
connects to Vercel through the Picked Vercel Integration.
|
|
10
|
+
|
|
11
|
+
[How to deploy to Vercel when you publish](/how-to/apps/connect-vercel) gives the steps.
|
|
12
|
+
|
|
13
|
+
## Manifest
|
|
14
|
+
|
|
15
|
+
| Property | Value |
|
|
16
|
+
| --------------- | ----------------------------------------------------- |
|
|
17
|
+
| `handle` | `vercel-deploy` |
|
|
18
|
+
| `name` | `Vercel` |
|
|
19
|
+
| `scopes` | None. The app asks for no access to the project data. |
|
|
20
|
+
| `offlineAccess` | Not set |
|
|
21
|
+
| `events` | `workspace.published` |
|
|
22
|
+
| `slots` | `app-home`, `workspace-postpublish-actions` |
|
|
23
|
+
| `workflowTools` | `trigger_deploy` |
|
|
24
|
+
|
|
25
|
+
See [App manifest](/reference/apps/manifest) for each property.
|
|
26
|
+
|
|
27
|
+
## Slots
|
|
28
|
+
|
|
29
|
+
| Location | Title | Height | What it shows |
|
|
30
|
+
| ------------------------------- | ------------------- | ------ | -------------------------------------------------------------------------------------------------------------- |
|
|
31
|
+
| `app-home` | `Vercel connection` | `520` | The app page. See [App page](#app-page). |
|
|
32
|
+
| `workspace-postpublish-actions` | `Deploy to Vercel` | `120` | A **Deploy <project>** button for each chosen project, in the publish modal after a workspace publishes. |
|
|
33
|
+
|
|
34
|
+
The height is in pixels.
|
|
35
|
+
|
|
36
|
+
In the publish modal, the slot shows one of these messages when it has no button:
|
|
37
|
+
|
|
38
|
+
| Message | When |
|
|
39
|
+
| ------------------------------------------------------- | ------------------------------------- |
|
|
40
|
+
| `Connect Vercel on the Vercel app page.` | The installation has no connection. |
|
|
41
|
+
| `Choose the projects to deploy on the Vercel app page.` | The connection has no chosen project. |
|
|
42
|
+
|
|
43
|
+
## App page
|
|
44
|
+
|
|
45
|
+
The `Vercel connection` page has these parts:
|
|
46
|
+
|
|
47
|
+
| Part | What it does |
|
|
48
|
+
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
49
|
+
| **Connect Vercel** | Opens a new window at the install page of the Picked Vercel Integration. Shows only when the installation has no connection, and the Picked environment has the integration. |
|
|
50
|
+
| Account line | `Connected to Vercel team <team ID>`, or `Connected to Vercel personal account`. When the installation has a configuration, ` (configuration <icfg_…>)` follows. |
|
|
51
|
+
| **Projects to deploy** | A checkbox for each project of the Vercel team or account. The list holds 2,000 projects at most. |
|
|
52
|
+
| **Save projects** | Stores the chosen projects. Picked checks each project at Vercel first. |
|
|
53
|
+
| **Deploy now** | A **Deploy <project>** button for each chosen project. The button deploys that project. With no chosen project, it shows `Choose a project to deploy.` |
|
|
54
|
+
| `Disconnect` | Removes the connection. See [Removal of the connection](#removal-of-the-connection). |
|
|
55
|
+
| `Recent deploys` | A table of the last 20 deployments: `When`, `Project`, `Started by` (`manual`, `publish` or `workflow`) and `Result` (`Deploying`, or `Failed:` and the reason). |
|
|
56
|
+
|
|
57
|
+
When the team holds more than 2,000 projects, the page shows a message. See
|
|
58
|
+
[Messages](#messages).
|
|
59
|
+
|
|
60
|
+
## Connection
|
|
61
|
+
|
|
62
|
+
**Connect Vercel** opens the install page of the Picked Vercel Integration on Vercel. The
|
|
63
|
+
person chooses a Vercel team or a personal account, and approves the integration. Vercel then
|
|
64
|
+
sends the window back to the app. The window closes.
|
|
65
|
+
|
|
66
|
+
The sign-in page of Vercel can separate the window from the app page. Then the window stays
|
|
67
|
+
open after the connection, and shows the result. The person then goes back to the app page.
|
|
68
|
+
The status line shows
|
|
69
|
+
`The connection window closed. If you finished connecting there, it shows here`, and the page
|
|
70
|
+
shows the connection.
|
|
71
|
+
|
|
72
|
+
The connection completes only in the browser that clicked **Connect Vercel**, within ten
|
|
73
|
+
minutes. See [About app authentication](/explanation/app-authentication#why-a-cookie-binds-the-flow-to-one-browser).
|
|
74
|
+
|
|
75
|
+
The integration asks Vercel for these permissions:
|
|
76
|
+
|
|
77
|
+
| Vercel permission | Access |
|
|
78
|
+
| ----------------- | ----------- |
|
|
79
|
+
| Deployments | Read, write |
|
|
80
|
+
| Projects | Read |
|
|
81
|
+
|
|
82
|
+
A connection to a different team removes the chosen projects of the last team.
|
|
83
|
+
|
|
84
|
+
## Deployments
|
|
85
|
+
|
|
86
|
+
A deployment of a chosen project has two parts:
|
|
87
|
+
|
|
88
|
+
1. The app finds the last production deployment of the project with the state `READY`.
|
|
89
|
+
2. The app tells Vercel to make a new production deployment from it, with `forceNew`. Vercel
|
|
90
|
+
builds the project again.
|
|
91
|
+
|
|
92
|
+
The app deploys each chosen project on its own. A failure of one project does not stop the
|
|
93
|
+
other projects. When a project has no `READY` production deployment, its deployment fails
|
|
94
|
+
with `<project> has no ready production deployment to redeploy`.
|
|
95
|
+
|
|
96
|
+
Three things start a deployment:
|
|
97
|
+
|
|
98
|
+
| Start | `Started by` | Projects |
|
|
99
|
+
| --------------------- | ------------ | ----------------------------------------- |
|
|
100
|
+
| A workspace publishes | `publish` | Each chosen project. |
|
|
101
|
+
| A button | `manual` | The project of the button. |
|
|
102
|
+
| A workflow | `workflow` | The projects that `trigger_deploy` names. |
|
|
103
|
+
|
|
104
|
+
## Event `workspace.published`
|
|
105
|
+
|
|
106
|
+
Picked sends `workspace.published` to the app when a workspace of the project publishes. The
|
|
107
|
+
app deploys each chosen project.
|
|
108
|
+
|
|
109
|
+
The app deploys one time each time that a workspace publishes. When Picked sends the same event again, with the
|
|
110
|
+
same `eventId`, the app does not deploy again. When the installation has no connection, the
|
|
111
|
+
app ignores the event.
|
|
112
|
+
|
|
113
|
+
## Workflow tool `trigger_deploy`
|
|
114
|
+
|
|
115
|
+
| Property | Value |
|
|
116
|
+
| ------------------ | ---------------------------------------------------------------------------------------- |
|
|
117
|
+
| Tool name | `app.<installation slug>.trigger_deploy`, for example `app.vercel-deploy.trigger_deploy` |
|
|
118
|
+
| Label in workflows | `Vercel: Trigger Vercel deploy` |
|
|
119
|
+
| Effect | `write` |
|
|
120
|
+
|
|
121
|
+
### Arguments
|
|
122
|
+
|
|
123
|
+
| Name | Label | Type | Required | Description |
|
|
124
|
+
| --------- | ---------------- | -------- | -------- | --------------------------------------------------------------------------------------- |
|
|
125
|
+
| `project` | `Vercel project` | `string` | No | The name or the ID of a chosen project. Empty, or not set, deploys each chosen project. |
|
|
126
|
+
|
|
127
|
+
### Output
|
|
128
|
+
|
|
129
|
+
| Name | Label | Type | Description |
|
|
130
|
+
| ----------- | --------------------- | -------- | ----------------------------------------------------------------- |
|
|
131
|
+
| `triggered` | `Projects redeployed` | `number` | The number of projects that the call deployed. `0` in a test run. |
|
|
132
|
+
|
|
133
|
+
A test run of a workflow does not deploy. The tool returns `{ "triggered": 0 }`. The tool
|
|
134
|
+
still makes its checks for a connection and a chosen project, and fails as a real run does.
|
|
135
|
+
|
|
136
|
+
### Errors
|
|
137
|
+
|
|
138
|
+
| Message | When |
|
|
139
|
+
| ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |
|
|
140
|
+
| `Connect Vercel on the app’s page in this project first` | The installation has no connection. |
|
|
141
|
+
| `Choose the Vercel projects to deploy on the app’s page in this project first` | `project` is empty, and the connection has no chosen project. |
|
|
142
|
+
| `<project> is not among the Vercel projects this project deploys` | `project` names no chosen project. |
|
|
143
|
+
| `Vercel could not redeploy <project>: <message>. Redeployed <projects>` | Vercel refused one or more projects. The message also names the projects that Vercel deployed. |
|
|
144
|
+
|
|
145
|
+
See [How to use an app tool in a workflow](/how-to/apps/use-an-app-tool-in-a-workflow).
|
|
146
|
+
|
|
147
|
+
## Configuration URL
|
|
148
|
+
|
|
149
|
+
The Configuration URL of the integration is `<app URL>/configure`. Vercel opens it from the
|
|
150
|
+
Vercel dashboard, with `?configurationId=icfg_…`.
|
|
151
|
+
|
|
152
|
+
| Request | Answer |
|
|
153
|
+
| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
154
|
+
| `configurationId` is an `icfg_` ID | A `302` redirect to `<dashboard>/apps/<app ID>/open?label=vercel.configuration_id&value=<icfg_…>`. |
|
|
155
|
+
| Other values, or an app with no app ID or no dashboard | A page with the heading `Manage the Vercel integration in Picked`. When the app has a dashboard, the page has an **Open Picked** link to it. |
|
|
156
|
+
|
|
157
|
+
The dashboard opens the installation that holds that configuration. See the guide about
|
|
158
|
+
[links to an installation](/how-to/apps/link-to-an-installation-from-your-site).
|
|
159
|
+
|
|
160
|
+
## Data that Picked keeps
|
|
161
|
+
|
|
162
|
+
The app keeps no data on its server. It keeps the data of each installation in labels of the
|
|
163
|
+
installation in Picked:
|
|
164
|
+
|
|
165
|
+
| Label | Type | Secret | Value |
|
|
166
|
+
| ------------------------- | ------ | ------ | ----------------------------------------------------------------------- |
|
|
167
|
+
| `vercel.access_token` | `text` | Yes | The Vercel access token. |
|
|
168
|
+
| `vercel.team_id` | `text` | No | The Vercel team. Not set for a personal account. |
|
|
169
|
+
| `vercel.configuration_id` | `text` | No | The integration configuration, `icfg_…`. The Configuration URL uses it. |
|
|
170
|
+
| `vercel.projects` | `json` | No | The chosen projects, with `id` and `name`. |
|
|
171
|
+
| `vercel.deliveries` | `json` | No | The last 20 deployments. |
|
|
172
|
+
| `vercel.last-event` | `text` | No | The `eventId` of the last `workspace.published` event. |
|
|
173
|
+
|
|
174
|
+
The pages of the app never get the access token. See
|
|
175
|
+
[How to store data for an installation](/how-to/apps/store-data-for-an-installation).
|
|
176
|
+
|
|
177
|
+
## Removal of the connection
|
|
178
|
+
|
|
179
|
+
`Disconnect` deletes `vercel.access_token`, `vercel.team_id`, `vercel.configuration_id` and
|
|
180
|
+
`vercel.projects`. `vercel.deliveries` and `vercel.last-event` stay, so the `Recent deploys`
|
|
181
|
+
table stays.
|
|
182
|
+
|
|
183
|
+
The integration stays on the Vercel account. The integration has no permission to remove
|
|
184
|
+
itself. A person removes it under **Integrations** in the Vercel dashboard.
|
|
185
|
+
|
|
186
|
+
Removal of the app from the project deletes all of its labels. The integration also stays on
|
|
187
|
+
the Vercel account then.
|
|
188
|
+
|
|
189
|
+
## Messages
|
|
190
|
+
|
|
191
|
+
| Message | When |
|
|
192
|
+
| ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
193
|
+
| `Waiting for Vercel…` | The new window of **Connect Vercel** is open. |
|
|
194
|
+
| `Connected to Vercel` | The connection is complete. |
|
|
195
|
+
| `Picked’s Vercel Integration is not configured on this deployment, so it cannot connect.` | The Picked environment has no Vercel Integration. |
|
|
196
|
+
| `Picked’s Vercel Integration is not configured on this deployment` | The new window started a connection, and the environment has no integration. |
|
|
197
|
+
| `Vercel sent no code` | Vercel sent the window back with no authorization code. |
|
|
198
|
+
| `This connection link has expired or was opened in another browser; start again` | The window is too old, or it is in a different browser. |
|
|
199
|
+
| `The app could not start connecting` | The window did not get the install page address. |
|
|
200
|
+
| `Allow pop-ups to connect` | The browser did not open the window. |
|
|
201
|
+
| `The connection window closed. If you finished connecting there, it shows here` | The window closed before it sent a result. |
|
|
202
|
+
| `Vercel named a different integration configuration; start again` | The configuration in the address is not the configuration of the token. |
|
|
203
|
+
| `Vercel could not be connected: <message>` | Vercel refused the authorization code. |
|
|
204
|
+
| `Vercel could not be connected` | The connection failed for a different reason. |
|
|
205
|
+
| `Vercel lists more projects than this page shows; the first 2,000 are listed.` | The team holds more than 2,000 projects. |
|
|
206
|
+
| `Vercel lists no projects for this account.` | The Vercel team or account has no project. |
|
|
207
|
+
| `Saved the projects to deploy` | **Save projects** is complete. |
|
|
208
|
+
| `Choose the projects to deploy` | The list of projects is not valid. |
|
|
209
|
+
| `Vercel has no such project for this team` | A chosen project is not in the Vercel team or account. |
|
|
210
|
+
| `<project>: deploying` | Vercel accepted the deployment. |
|
|
211
|
+
| `<project>: failed (<message>)` | Vercel refused the deployment. |
|
|
212
|
+
| `No project to deploy` | A button started a deployment with no chosen project. |
|
|
213
|
+
| `Vercel answered <status>: <message>` | Vercel refused a request. |
|
|
214
|
+
| `Vercel could not be reached` | The app cannot reach Vercel. |
|
|
215
|
+
| `Disconnected` | `Disconnect` is complete. |
|
|
216
|
+
| `Sign in again` | The session of the page expired. |
|
|
217
|
+
|
|
218
|
+
## Related
|
|
219
|
+
|
|
220
|
+
- [How to deploy to Vercel when you publish](/how-to/apps/connect-vercel)
|
|
221
|
+
- [How to install an app](/how-to/apps/install-an-app)
|
|
222
|
+
- [Apps](/reference/dashboard/apps)
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: reference
|
|
3
|
+
layout: docs
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Zoho CRM app
|
|
7
|
+
|
|
8
|
+
The Zoho CRM app gives workflows tools that make leads in Zoho CRM. It connects to Zoho with
|
|
9
|
+
an OAuth client that the person who installs the app makes in Zoho.
|
|
10
|
+
|
|
11
|
+
[How to send leads to Zoho CRM](/how-to/apps/connect-zoho-crm) gives the steps.
|
|
12
|
+
|
|
13
|
+
## Manifest
|
|
14
|
+
|
|
15
|
+
| Property | Value |
|
|
16
|
+
| --------------- | ----------------------------------------------------- |
|
|
17
|
+
| `handle` | `zoho-crm` |
|
|
18
|
+
| `name` | `Zoho CRM` |
|
|
19
|
+
| `scopes` | None. The app asks for no access to the project data. |
|
|
20
|
+
| `offlineAccess` | Not set |
|
|
21
|
+
| `events` | None |
|
|
22
|
+
| `slots` | `app-home` |
|
|
23
|
+
| `workflowTools` | `create_lead`, `check_connection` |
|
|
24
|
+
|
|
25
|
+
See [App manifest](/reference/apps/manifest) for each property.
|
|
26
|
+
|
|
27
|
+
## Slot
|
|
28
|
+
|
|
29
|
+
| Location | Title | Height | What it shows |
|
|
30
|
+
| ---------- | --------------------- | ------ | ---------------------------------------- |
|
|
31
|
+
| `app-home` | `Zoho CRM connection` | `360` | The app page. See [App page](#app-page). |
|
|
32
|
+
|
|
33
|
+
The height is in pixels.
|
|
34
|
+
|
|
35
|
+
## App page
|
|
36
|
+
|
|
37
|
+
| Part | What it does |
|
|
38
|
+
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
39
|
+
| `Redirect URI:` | The URL to give to the OAuth client in Zoho: `<app URL>/oauth/callback`. |
|
|
40
|
+
| **Client ID** | The client ID of the OAuth client. |
|
|
41
|
+
| **Client secret** | The client secret of the OAuth client. The page never shows a saved secret. |
|
|
42
|
+
| **Save client** | Stores the client. After this, the page shows `Client ID <client ID>, client secret set`. |
|
|
43
|
+
| **Replace client** | Shows the client form again, with a `Cancel` button. When the installation has a connection, the form shows `Saving a new client disconnects Zoho CRM.` |
|
|
44
|
+
| `Zoho data centre` | The data center of the Zoho account. See [Data centers](#data-centers). The default is `us`. |
|
|
45
|
+
| **Connect Zoho CRM** | Opens a new window at the sign-in page of Zoho. Shows when a client is stored and the installation has no connection. |
|
|
46
|
+
| Account line | `Connected to <organization> through <accounts server>`. When Zoho gives no organization name, `Zoho CRM` replaces it. |
|
|
47
|
+
| **Test connection** | Gets an access token from Zoho, and reads the name of the Zoho organization. |
|
|
48
|
+
| `Disconnect` | Removes the connection. See [Removal of the connection](#removal-of-the-connection). |
|
|
49
|
+
|
|
50
|
+
## Data centers
|
|
51
|
+
|
|
52
|
+
The `Zoho data centre` list holds these values. The app sends the person to the accounts
|
|
53
|
+
server of the data center that they choose.
|
|
54
|
+
|
|
55
|
+
| Value | Name in the list | Accounts server |
|
|
56
|
+
| ----- | -------------------------- | ------------------------------- |
|
|
57
|
+
| `us` | `United States (zoho.com)` | `https://accounts.zoho.com` |
|
|
58
|
+
| `eu` | `Europe (zoho.eu)` | `https://accounts.zoho.eu` |
|
|
59
|
+
| `in` | `India (zoho.in)` | `https://accounts.zoho.in` |
|
|
60
|
+
| `au` | `Australia (zoho.com.au)` | `https://accounts.zoho.com.au` |
|
|
61
|
+
| `jp` | `Japan (zoho.jp)` | `https://accounts.zoho.jp` |
|
|
62
|
+
| `uk` | `United Kingdom (zoho.uk)` | `https://accounts.zoho.uk` |
|
|
63
|
+
| `ca` | `Canada (zohocloud.ca)` | `https://accounts.zohocloud.ca` |
|
|
64
|
+
| `sa` | `Saudi Arabia (zoho.sa)` | `https://accounts.zoho.sa` |
|
|
65
|
+
| `cn` | `China (zoho.com.cn)` | `https://accounts.zoho.com.cn` |
|
|
66
|
+
|
|
67
|
+
The app accepts a connection only from one of these accounts servers. The app calls Zoho CRM
|
|
68
|
+
at the API domain that Zoho gives for the connection.
|
|
69
|
+
|
|
70
|
+
## Zoho scopes
|
|
71
|
+
|
|
72
|
+
The app asks Zoho for these scopes, with `access_type=offline`. Zoho then gives a refresh token:
|
|
73
|
+
|
|
74
|
+
| Scope | Use |
|
|
75
|
+
| ------------------------------ | --------------------------------------- |
|
|
76
|
+
| `ZohoCRM.modules.leads.CREATE` | Make leads. |
|
|
77
|
+
| `ZohoCRM.modules.leads.READ` | Read leads. |
|
|
78
|
+
| `ZohoCRM.org.READ` | Read the name of the Zoho organization. |
|
|
79
|
+
|
|
80
|
+
Zoho shows the consent page each time that a person connects.
|
|
81
|
+
|
|
82
|
+
## Workflow tool `create_lead`
|
|
83
|
+
|
|
84
|
+
| Property | Value |
|
|
85
|
+
| ------------------ | ----------------------------------------------------------------------------- |
|
|
86
|
+
| Tool name | `app.<installation slug>.create_lead`, for example `app.zoho-crm.create_lead` |
|
|
87
|
+
| Label in workflows | `Zoho CRM: Create Zoho lead` |
|
|
88
|
+
| Effect | `write` |
|
|
89
|
+
|
|
90
|
+
The tool makes one lead in the `Leads` module of Zoho CRM.
|
|
91
|
+
|
|
92
|
+
### Arguments
|
|
93
|
+
|
|
94
|
+
| Name | Label | Type | Required | Zoho field |
|
|
95
|
+
| ----------- | ------------ | -------- | -------- | ------------ |
|
|
96
|
+
| `lastName` | `Last name` | `string` | Yes | `Last_Name` |
|
|
97
|
+
| `firstName` | `First name` | `string` | No | `First_Name` |
|
|
98
|
+
| `email` | `Email` | `string` | No | `Email` |
|
|
99
|
+
| `company` | `Company` | `string` | No | `Company` |
|
|
100
|
+
|
|
101
|
+
The tool does not send an empty argument to Zoho.
|
|
102
|
+
|
|
103
|
+
### Output
|
|
104
|
+
|
|
105
|
+
| Name | Label | Type | Description |
|
|
106
|
+
| ------------ | -------------- | -------- | --------------------------------------------------------- |
|
|
107
|
+
| `zohoLeadId` | `Zoho lead id` | `string` | The ID of the new lead in Zoho. `test-run` in a test run. |
|
|
108
|
+
|
|
109
|
+
A test run of a workflow does not make a lead. The tool returns
|
|
110
|
+
`{ "zohoLeadId": "test-run" }`. It does not read the connection. It still fails when
|
|
111
|
+
`lastName` is empty.
|
|
112
|
+
|
|
113
|
+
### Errors
|
|
114
|
+
|
|
115
|
+
| Message | When |
|
|
116
|
+
| --------------------------------------------------------------------- | ----------------------------------------------------- |
|
|
117
|
+
| `lastName is required` | `lastName` is empty. |
|
|
118
|
+
| `Connect Zoho CRM on the app’s page in this project first` | The installation has no connection. |
|
|
119
|
+
| `Save your Zoho OAuth client on the app’s page in this project first` | The installation has no client. |
|
|
120
|
+
| `Zoho refused the request: <error>` | Zoho did not give an access token for the connection. |
|
|
121
|
+
| `Zoho answered without an access token` | Zoho gave no access token for the connection. |
|
|
122
|
+
| `Zoho CRM refused the lead (<status>)` | Zoho CRM did not make the lead. |
|
|
123
|
+
| `Zoho CRM could not be reached` | The app cannot reach Zoho CRM. |
|
|
124
|
+
|
|
125
|
+
## Workflow tool `check_connection`
|
|
126
|
+
|
|
127
|
+
| Property | Value |
|
|
128
|
+
| ------------------ | --------------------------------------------------------------------------------------- |
|
|
129
|
+
| Tool name | `app.<installation slug>.check_connection`, for example `app.zoho-crm.check_connection` |
|
|
130
|
+
| Label in workflows | `Zoho CRM: Check Zoho connection` |
|
|
131
|
+
| Effect | `read` |
|
|
132
|
+
|
|
133
|
+
The tool has no arguments.
|
|
134
|
+
|
|
135
|
+
### Output
|
|
136
|
+
|
|
137
|
+
| Name | Label | Type | Description |
|
|
138
|
+
| -------------- | ------------------- | --------- | ---------------------------------------------------------------------------------------------- |
|
|
139
|
+
| `connected` | `Connected` | `boolean` | `true` when Zoho gives an access token, and Zoho CRM answers the request for the organization. |
|
|
140
|
+
| `organization` | `Zoho organisation` | `string` | The name of the Zoho organization. Empty when the installation has no connection. |
|
|
141
|
+
|
|
142
|
+
The tool does not fail when the connection does not operate. It returns `connected: false`.
|
|
143
|
+
|
|
144
|
+
## Data that Picked keeps
|
|
145
|
+
|
|
146
|
+
The app keeps the data of each installation in labels of the installation in Picked:
|
|
147
|
+
|
|
148
|
+
| Label | Type | Secret | Value |
|
|
149
|
+
| -------------------- | ------ | ------ | ------------------------------------------------------------------------------------------------ |
|
|
150
|
+
| `zoho.client_id` | `text` | No | The client ID of the OAuth client. |
|
|
151
|
+
| `zoho.client_secret` | `text` | Yes | The client secret of the OAuth client. |
|
|
152
|
+
| `zoho.connection` | `json` | Yes | The connection: `accountsServer`, `apiDomain`, `refreshToken`, `connectedAt` and `organization`. |
|
|
153
|
+
|
|
154
|
+
The page of the app gets the client ID, and only the fact that a secret is set. See
|
|
155
|
+
[How to store data for an installation](/how-to/apps/store-data-for-an-installation).
|
|
156
|
+
|
|
157
|
+
## New client
|
|
158
|
+
|
|
159
|
+
**Save client** with a new client does these things:
|
|
160
|
+
|
|
161
|
+
1. The app stores the new client ID and client secret.
|
|
162
|
+
2. When the installation has a connection, the app tells Zoho to revoke the refresh token.
|
|
163
|
+
3. The app deletes `zoho.connection`.
|
|
164
|
+
|
|
165
|
+
After this, the installation has no connection.
|
|
166
|
+
|
|
167
|
+
## Removal of the connection
|
|
168
|
+
|
|
169
|
+
`Disconnect` tells Zoho to revoke the refresh token. It then deletes `zoho.connection`. The
|
|
170
|
+
client stays.
|
|
171
|
+
|
|
172
|
+
Removal of the app from the project also tells Zoho to revoke the refresh token. Picked then
|
|
173
|
+
deletes all of the labels of the installation.
|
|
174
|
+
|
|
175
|
+
The app ignores the answer from Zoho. When Zoho does not revoke the token, Picked still
|
|
176
|
+
deletes the connection.
|
|
177
|
+
|
|
178
|
+
## Messages
|
|
179
|
+
|
|
180
|
+
| Message | When |
|
|
181
|
+
| -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
182
|
+
| `Saved your Zoho OAuth client` | **Save client** is complete. |
|
|
183
|
+
| `Enter the client ID and client secret of your Zoho OAuth client` | The client ID or the client secret is empty. |
|
|
184
|
+
| `Picked refused the client: <reasons>` | Picked did not accept the labels of the client. |
|
|
185
|
+
| `Picked could not save the client; save it again` | Picked did not store the client. |
|
|
186
|
+
| `Save your Zoho OAuth client first` | **Connect Zoho CRM** started with no client. |
|
|
187
|
+
| `Unknown data centre` | The data center is not in the list. |
|
|
188
|
+
| `Waiting for Zoho…` | The new window of **Connect Zoho CRM** is open. |
|
|
189
|
+
| `Connected to <organization>` | The connection, or the test of the connection, is complete. `Connected to Zoho CRM` when Zoho gives no organization name. |
|
|
190
|
+
| `Testing…` | **Test connection** started. |
|
|
191
|
+
| `Zoho answered without an access token` | **Test connection** got no access token from Zoho. |
|
|
192
|
+
| `Zoho CRM could not be reached` | **Test connection** cannot reach Zoho CRM. |
|
|
193
|
+
| `Zoho sent no code` | Zoho sent the window back with no authorization code. |
|
|
194
|
+
| `This connection link has expired or was opened in another browser; start again` | The window is too old, or it is in a different browser. |
|
|
195
|
+
| `The app could not start connecting` | The window did not get the sign-in address of Zoho. |
|
|
196
|
+
| `Allow pop-ups to connect` | The browser did not open the window. |
|
|
197
|
+
| `The connection window closed. If you finished connecting there, it shows here` | The window closed before it sent a result. |
|
|
198
|
+
| `Zoho named an accounts server the app does not trust` | The accounts server is not in [Data centers](#data-centers). |
|
|
199
|
+
| `Zoho answered without a refresh token; connect again` | Zoho did not give a refresh token. |
|
|
200
|
+
| `Zoho refused the request: <error>` | Zoho refused the authorization code or the refresh token. When Zoho gives no error, the message is `Zoho refused the request`. |
|
|
201
|
+
| `Zoho could not be reached` | The app cannot reach the accounts server. |
|
|
202
|
+
| `Zoho CRM could not be connected` | The connection failed for a different reason. |
|
|
203
|
+
| `Zoho CRM is not connected` | **Test connection** with no connection. |
|
|
204
|
+
| `Zoho CRM answered <status>` | Zoho CRM refused the request for the organization. |
|
|
205
|
+
| `Disconnected` | `Disconnect` is complete. |
|
|
206
|
+
| `Sign in again` | The session of the page expired. |
|
|
207
|
+
|
|
208
|
+
When Zoho sends an `error` in place of a code, the window shows the value of that `error`.
|
|
209
|
+
|
|
210
|
+
## Related
|
|
211
|
+
|
|
212
|
+
- [How to send leads to Zoho CRM](/how-to/apps/connect-zoho-crm)
|
|
213
|
+
- [How to use an app tool in a workflow](/how-to/apps/use-an-app-tool-in-a-workflow)
|
|
214
|
+
- [Apps](/reference/dashboard/apps)
|
|
@@ -131,13 +131,14 @@ documentation uses, and it names the others.
|
|
|
131
131
|
|
|
132
132
|
## APIs and analytics
|
|
133
133
|
|
|
134
|
-
| Term
|
|
135
|
-
|
|
|
136
|
-
| **
|
|
137
|
-
| **
|
|
138
|
-
| **
|
|
139
|
-
| **
|
|
140
|
-
| **
|
|
134
|
+
| Term | What it is |
|
|
135
|
+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
136
|
+
| **Default Reports** | The Leads and Sessions reports that Picked Analytics keeps for each project. A project sets a mode for each area: `AUTOMATIC` (Leads only: applies when the project has a lead), `ON`, or `OFF`. The API field is `Project.defaultReports`. |
|
|
137
|
+
| **Delivery API** | The public, anonymous, read-only REST API that serves your published configuration and content. |
|
|
138
|
+
| **Management API** | The authenticated GraphQL API that controls your projects, experiences, and content. |
|
|
139
|
+
| **Preview token** | A token that lets a Delivery API request read unpublished content. |
|
|
140
|
+
| **Report** | An embedded analytics dashboard or question, attached to a project. |
|
|
141
|
+
| **User ID** | Your own ID for a visitor, such as the ID of their account. The GTM template sends it in the `user_id` field of the `session` context. It is not the visitor ID (`Lead.userId`). |
|
|
141
142
|
|
|
142
143
|
## Tools
|
|
143
144
|
|
|
@@ -147,6 +147,11 @@ type Project {
|
|
|
147
147
|
Picked's AI agents read it when they query or explain analytics. Null until set.
|
|
148
148
|
"""
|
|
149
149
|
analyticsContext: String
|
|
150
|
+
"""
|
|
151
|
+
The project's Default Reports: for each area, its mode and whether its reports apply.
|
|
152
|
+
Scope: `ORGANIZATION_PROJECTS_READ`.
|
|
153
|
+
"""
|
|
154
|
+
defaultReports: DefaultReports! @auth
|
|
150
155
|
"""The organization the project belongs to."""
|
|
151
156
|
organization: Organization!
|
|
152
157
|
"""
|
|
@@ -252,7 +257,7 @@ type Project {
|
|
|
252
257
|
"""
|
|
253
258
|
The Leads reports on the project, in order: how leads are acquired, the journeys behind them,
|
|
254
259
|
and how visits convert to leads. Each is a signed embed URL locked to the project, with an
|
|
255
|
-
editable date range.
|
|
260
|
+
editable date range. Empty when the Leads Default Reports do not apply to the project.
|
|
256
261
|
Scope: `ORGANIZATION_SESSIONS_READ`.
|
|
257
262
|
"""
|
|
258
263
|
leadReports: [LeadReport!]! @auth
|
|
@@ -276,7 +281,7 @@ type Project {
|
|
|
276
281
|
"""
|
|
277
282
|
The Sessions reports on the project, in order: how its sessions arrive, the journeys they take,
|
|
278
283
|
and which of them convert. Each is a signed embed URL locked to the project, with an editable
|
|
279
|
-
date range.
|
|
284
|
+
date range. Empty when the Sessions Default Reports do not apply to the project.
|
|
280
285
|
Scope: `ORGANIZATION_SESSIONS_READ`.
|
|
281
286
|
"""
|
|
282
287
|
analyticsSessionsReports: [AnalyticsSessionsReport!]! @auth
|
|
@@ -612,6 +617,67 @@ type ProjectCreatePayload {
|
|
|
612
617
|
}
|
|
613
618
|
```
|
|
614
619
|
|
|
620
|
+
### `DefaultReports`
|
|
621
|
+
|
|
622
|
+
```graphql
|
|
623
|
+
"""
|
|
624
|
+
The built-in Leads and Sessions reports Picked Analytics keeps for every project, and which of them
|
|
625
|
+
apply to one project.
|
|
626
|
+
"""
|
|
627
|
+
type DefaultReports {
|
|
628
|
+
"""
|
|
629
|
+
The Leads reports: how leads are acquired, the journeys behind them and how visits convert.
|
|
630
|
+
"""
|
|
631
|
+
leads: DefaultReportsArea!
|
|
632
|
+
"""
|
|
633
|
+
The Sessions reports: how sessions arrive, the journeys they take and which of them convert.
|
|
634
|
+
"""
|
|
635
|
+
sessions: DefaultReportsArea!
|
|
636
|
+
}
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
### `DefaultReportsArea`
|
|
640
|
+
|
|
641
|
+
```graphql
|
|
642
|
+
"""
|
|
643
|
+
One area of a project's Default Reports: its mode and whether its reports apply.
|
|
644
|
+
"""
|
|
645
|
+
type DefaultReportsArea {
|
|
646
|
+
"""The mode the project sets for the area."""
|
|
647
|
+
mode: DefaultReportsMode!
|
|
648
|
+
"""Whether the area's reports apply to the project."""
|
|
649
|
+
applies: Boolean!
|
|
650
|
+
}
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
### `DefaultReportsMode`
|
|
654
|
+
|
|
655
|
+
```graphql
|
|
656
|
+
"""Whether an area of the Default Reports applies to a project."""
|
|
657
|
+
enum DefaultReportsMode {
|
|
658
|
+
"""Applies once the project holds a lead. Leads only."""
|
|
659
|
+
AUTOMATIC
|
|
660
|
+
"""Always applies."""
|
|
661
|
+
ON
|
|
662
|
+
"""Never applies."""
|
|
663
|
+
OFF
|
|
664
|
+
}
|
|
665
|
+
```
|
|
666
|
+
|
|
667
|
+
### `DefaultReportsInput`
|
|
668
|
+
|
|
669
|
+
```graphql
|
|
670
|
+
"""
|
|
671
|
+
The input of `projectUpdate`'s `defaultReports`. Omit a field to keep its value.
|
|
672
|
+
"""
|
|
673
|
+
input DefaultReportsInput {
|
|
674
|
+
"""The Leads mode."""
|
|
675
|
+
leads: DefaultReportsMode
|
|
676
|
+
"""The Sessions mode. `AUTOMATIC` is rejected."""
|
|
677
|
+
sessions: DefaultReportsMode
|
|
678
|
+
}
|
|
679
|
+
```
|
|
680
|
+
|
|
615
681
|
### `ProjectUpdateInput`
|
|
616
682
|
|
|
617
683
|
```graphql
|
|
@@ -625,6 +691,8 @@ input ProjectUpdateInput {
|
|
|
625
691
|
context: String
|
|
626
692
|
"""The project analytics brief in Markdown. An empty string clears it."""
|
|
627
693
|
analyticsContext: String
|
|
694
|
+
"""The modes of the project's Default Reports."""
|
|
695
|
+
defaultReports: DefaultReportsInput
|
|
628
696
|
}
|
|
629
697
|
```
|
|
630
698
|
|