# When a placement goes wrong

A silent seller, a rejection, a price change or a removed link: close, reopen, move to another site, or change the seller.

Four tools handle a placement that went wrong. They work on self-serve placements only. They are tool calls and
API calls; an agent calls them only after you decided. In the app, a placement that was rejected or went silent
shows **Replace Site** among its actions, and you message the seller under **Messages**.

| Tool | Route | What it does |
|---|---|---|
| `line_item_close` | `POST /api/line-items/<id>/close` | Closes a failed placement, with a reason. |
| `line_item_reopen` | `POST /api/line-items/<id>/reopen` | Undoes a close. |
| `line_item_replace_site` | `GET` / `POST /api/line-items/<id>/replace-site` | Moves the placement to another site, or to another seller of the same site, with the same article. |
| `line_item_switch_seller` | `POST /api/line-items/<id>/switch-seller` | Moves the placement to another seller of the same site, before the seller accepts. |

Each change shows in the activity feed as a `placement_change` event, and as a note on the placement's thread.

## The seller is silent

1. Message the seller once (`line_item_message_publisher`). Wait for a reply.
2. Still silent? Move the placement to another site or seller (`line_item_replace_site`), or close it
   (`line_item_close`).

`line_items_operations` with `staleDays` finds the placements that have been quiet for that many days.

## The seller rejected it, or asks for a new site

The status is `rejected` or `pre_rejected`. Move the placement (`line_item_replace_site`), or close it
(`line_item_close`).

## Close a placement

`line_item_close` with a `reason` of at least 5 characters, for example "seller rejected: need a new site".

- Its status becomes `cancelled`.
- A seller who already had it (a notice or the article was sent, or the seller was working on it) is told that
  the order is cancelled. Your reason stays with Linkio; the seller does not see it.
- Undo it with `line_item_reopen`.

## Reopen a placement

`line_item_reopen` puts back the status and the inclusion that the placement had before you closed it. The seller
is not messaged. If a seller was told the order was cancelled, message them before you send the article again,
or move the placement with `line_item_replace_site`.

Only a placement you closed with `line_item_close` can be reopened. A placement that Linkio cancelled is not
reopened here: ask Linkio.

## Move to another site or seller

`line_item_replace_site` works also after the seller accepted or rejected the placement. It has two calls:

1. Without `offerToken`: it lists the sellers of the site you name (`domain`), what you would pay, and whether the
   move is allowed. Without `domain` it lists the sellers of the current site.
2. With an `offerToken` from that list and a `reason`: it moves the placement.

After the move:

- The old seller is told the order is cancelled.
- The new seller gets the placement with the status `assigned`. The article stays on the placement.
- Send the article to the new seller (`workflow_send_to_publisher`). If your own article names the old site,
  change it first (`order_byoc_update`).

The new site must be new to the brand: a site that another open placement of the same brand uses is refused.

## Change the seller before the seller accepts

`line_item_sellers` lists every seller that can take the placement's site now: owner or reseller, proven or not,
the price you would pay and which one is on it. `line_item_switch_seller` with a token from that list moves the
placement to that seller. You pay the listed price. After the seller accepts, use `line_item_replace_site`.

## What cannot be closed or moved here

A placement is refused when:

- the link is live, or the seller sent a published URL, or the seller is paid or being paid;
- a seller invoice is paid, part paid, disputed or refunded;
- the order is completed or cancelled, or it was paid through Linkio (a self-serve order never is);
- the placement is part of an exchange.

Each refusal has a code: see [Troubleshooting: refusal codes](/docs/self-serve/troubleshooting). For these cases,
ask Linkio. From an agent, `report_issue` reaches the Linkio team.

## The price changed

The seller asks for more, or agrees to less: change the agreed price with `line_item_agreed_price_set`. See
[Check the live link and pay the publisher](/docs/self-serve/qa-and-pay).

## The link was removed later

A placement with a published URL cannot be closed or moved here. Ask Linkio. From an agent, use `report_issue`
with the placement's id.
