# Sharpen (/docs/workflows/integrations/sharpen)

> For the complete documentation index, see [llms.txt](https://docs.tandemcx.ai/llms.txt). Any page on this site can be fetched as Markdown by appending `.md` to its URL.

The Sharpen integration exposes the Sharpen platform to your workflows: query and
update SharpenDB, transfer conversations into queues, notify agents, look up
customer history, and drive agent-assist content during a live conversation.

## Setup

Connect the Sharpen integration on the **Integrations** page in the app. Once
connected, the nodes below become available in the Node Library and their
reference pages appear here. A node that requires this integration shows an
**Integration required** note on its reference page until it's connected.

## The managed "SharpenCX" SIP trunk

Connecting the integration also creates a SIP trunk named **SharpenCX** under
**Admin → SIP Trunks**. It is where your Sharpen-terminated phone numbers point at
Tandem workflows and agents, so a number can reach Tandem without moving off
Sharpen's carrier plumbing.

You do not create it and you cannot remove it. It appears when you connect the
integration and goes away when you disconnect it.

<Callout type="info">
    **This is being rolled out.** Two halves have to be in place before a call arrives, and they
    ship separately. If **SIP Trunks** isn't under **Admin** in your sidebar, the trunk isn't
    enabled for your organization yet. And marking a Sharpen number for Spark is a SharpenCX-side
    option that is not generally available — until it is, the trunk exists but its number picker has
    nothing to offer. Contact support to find out where your organization stands.
</Callout>

### Adding numbers to it

The trunk is created with **no phone numbers**, so nothing routes over it yet.
Open **SharpenCX** under **Admin → SIP Trunks** and add numbers under **Phone
Numbers**, then set the workflow each one goes to.

Numbers here are **picked from your own Sharpen inventory, not typed.** The list
offers only the numbers your organization owns in Sharpen and has marked for
Spark, and Tandem re-checks each number you add when you save. This is deliberate:
a number that has not been marked would sit on the trunk looking configured and
never take a call.

If the picker is empty and says no numbers are marked for Spark yet, that is the
normal state for an account that has not routed one here before, not a failure.
Mark the number in the SharpenCX admin, then come back to this trunk. A picker
that reports an error instead is a different thing — see Troubleshooting below.

### What you can change on it, and what you cannot

The integration owns the trunk's connection settings, so those are shown but not
editable:

| Section on the trunk   | Editable                                                            |
| ---------------------- | ------------------------------------------------------------------- |
| **Label**              | No — always "SharpenCX".                                            |
| **Phone Numbers**      | Yes, but only by picking from your Sharpen inventory.               |
| **Allowed Source IPs** | No, and none are set — the trunk is matched by the number dialed.   |
| **Outbound Address**   | No.                                                                 |
| **Workflow**           | Yes. This is the default for numbers with no workflow of their own. |
| **SIP Authentication** | Not offered.                                                        |
| **Variables**          | Yes.                                                                |

The trunk has no **Delete** action in its row, and adding a number to it from the
**Phone Numbers** page is not offered either — that page's **Add** flow takes a
number you type, which this trunk does not accept. Its numbers still appear there
as rows, and you can change or remove one from that row.

### If a number stops being marked for Spark

Un-marking a number in the SharpenCX admin does **not** remove it from this trunk.
The row stays, marked **No longer marked for Spark in SharpenCX**, and calls to
that number stop arriving in Tandem. Remove the row yourself when you meant
to retire it. Tandem leaves it in place on purpose: dropping numbers off a live
trunk on the strength of one reading of your Sharpen inventory would unroute
working calls during a Sharpen-side outage.

It does not get in your way in the meantime. A number already on the trunk is not
re-checked against Sharpen, so an un-marked one does not block you from editing,
or removing, any of the others.

## What you can do

- **Read and write data** — the SharpenDB nodes run SELECT / INSERT / UPDATE /
  DELETE against your tables, saving query results into variables you can use
  downstream with `$(name)`.
- **Route conversations** — transfer any call into a Sharpen queue with optional
  skill requirements and priority for skill-based routing, or create a queue
  callback so the customer keeps their place in line and an agent calls them back.
  A call that reached Tandem from Sharpen is handed back to Sharpen and leaves
  Tandem; if Tandem cannot confirm that the handback was sent, the node takes its
  `fallback` exit and the caller may already have reached the queue. Any other call is connected to Sharpen and stays on Tandem until it
  ends. If Sharpen does not take a call that started on Tandem, the caller stays on
  the line and the node takes its `fallback` exit. Support for calls that started on
  Tandem is being turned on for organizations in stages; until it is on for yours,
  the node takes its `invalidInput` exit for those calls.
- **Support agents** — push a toast notification to a specific agent, or set and
  dynamically update the content shown in Agent Assist during a live conversation.
- **Understand the caller** — look up a customer's recent conversation history
  (calls, holds, transfers) over a configurable window and branch on it.

## Troubleshooting

| What you see                                                                         | What it means                                                                                                                                                                                                    |
| ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| No numbers are marked for Spark yet                                                  | The expected state before your first number is routed here. Mark the number in the SharpenCX admin, then reopen this trunk.                                                                                      |
| Couldn't load your SharpenCX numbers                                                 | Tandem could not read your inventory: the stored keys were rejected, or Sharpen is unreachable. The message says which. **Retry**, then re-enter the keys if it holds.                                           |
| `is not a SharpenCX number marked for Spark on this account`                         | Only ever about a number you are **adding**: it was un-marked in Sharpen since the picker loaded. Re-mark it in the SharpenCX admin, or leave it off the trunk.                                                  |
| SharpenCX credentials were saved, but the "SharpenCX" SIP trunk could not be created | The keys are stored; only the trunk write failed. Save the integration again — it retries without duplicating anything.                                                                                          |
| The "SharpenCX" trunk's numbers could not be saved                                   | The numbers you picked did not reach the trunk. Nothing partial was written; save again from the trunk. This is not a credential problem.                                                                        |
| `Already in use by another organization: <number>`                                   | Another organization already routes that number to Tandem, so the save is refused. Only numbers you are adding are checked. Contact support if the number is yours.                                              |
| Calls to a Sharpen number are not reaching a workflow                                | Check the number is on the **SharpenCX** trunk **and** still marked for Spark in Sharpen. Both are required, and neither implies the other. A Sharpen number on any other SIP trunk takes no calls from Sharpen. |

## Nodes

<IntegrationNodes provider="sharpen" />

<Callout>
    For the full field-and-exit detail on any node — including which fields accept `$(name)`
    variables and which expose a `timeout` exit — open its reference page above.
</Callout>
