> For the complete documentation index, see [llms.txt](https://woowup-docs.gitbook.io/woowup-developer-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://woowup-docs.gitbook.io/woowup-developer-docs/vtex/vtex-abandoned-cart-trigger.md).

# Trigger Carrito Abandonado

## Como configurar:&#x20;

En este tutorial se explicará cómo crear y activar un trigger para detectar los carritos abandonados por los usuarios. El motivo de este trigger es enviar un request  con la información del carrito abandonado a Woowup para poder disparar distintas campañas basadas en esta actividad.

### Creación del trigger

* Entrar a DS (dynamic storage) [http://TIENDA.ds.vtexcrm.com.br/](http://tienda.ds.vtexcrm.com.br/)
* Click en el tab **Trigger**;
* Click en el botón **Novo**;
* Escriba el nombre del trigger (por ejemplo Carrito WoowUp);
* En Entidade, seleccione el valor **Cliente**;
* En Status, marque **Ativo**;
* En Condição do trigger, seleccione **O valor de um atributo for alterado**;
* En Informe o atributo, seleccione **Última sessão**;

![](/files/-LU6wulz57_0T1Qf7G1T)

Una vez configurado el filtro adicional con sus valores, siga los pasos siguientes:&#x20;

1\. Haga clic en la pestaña **Agendamento**;&#x20;

2\. Seleccione una de las opciones de envío.&#x20;

Agendar ejecución para una fecha dinámica, [FECHA ACTUAL](https://help.vtex.com/es/tutorial/configurando-carrito-abandonado) más 2 horas;![ConfiguraçãoAgendamento](https://images.contentful.com/alneenqid6w5/1geardBUo2OSUyCAeYMoM2/9b177821fd32a2fb71c3f39460dd48c4/Configura_C3_A7_C3_A3oAgendamento.png)<br>

### Acción en caso Positivo

En la solapa de "Acciones en caso positivo" poner los siguientes datos:&#x20;

Acción: **Realizar un request HTTP**

**URL**:

```
https://admin.woowup.com/Webhooks/VtexAbandonedCart?app_id={APP_ID} 
```

{% hint style="warning" %}
Reemplazar {APP\_ID} por el numero que aparece en la URL de tu programa
{% endhint %}

![](/files/-LyZvtHcQGtuT3oGmlY2)

Verbo: **POST**&#x20;

**JSON**: (Copiar y pegar todo el código de llave a llave)

```javascript
{
    "email": "{!email}",
    "firstName": "{!firstName}",
    "lastName": "{!lastName}",  
    "interestBrands": "{!interestBrands}",
    "isNewsletterOptIn": "{!isNewsletterOptIn}",
    "isCorporate": "{!isCorporate}",
    "rclastcart": "{!rclastcart}",
    "rclastcartvalue": "{!rclastcartvalue}",
    "rclastsession": "{!rclastsession}",
    "rclastsessiondate": "{!rclastsessiondate}",
    "homePhone": "{!homePhone}",
    "phone": "{!phone}",
    "userId": "{!userId}",
    "document": "{!document}",
    "carttag": {!carttag},
    "checkouttag": {!checkouttag},
    "corporateDocument": "{!corporateDocument}",
    "corporateName": "{!corporateName}",
    "documentType": "{!documentType}",
    "gender": "{!gender}",
    "id": "{!id}",
    "accountId": "{!accountId}",
    "accountName": "{!accountName}",
    "dataEntityId": "{!dataEntityId}"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://woowup-docs.gitbook.io/woowup-developer-docs/vtex/vtex-abandoned-cart-trigger.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
