# Salesforce

La integración con Salesforce es un proceso que requiere varios pasos de configuración en Salesforce antes de cualquier conexión o configuración en Dapta. Estos son los pasos:

\
**Ingrese a Configuración**

Abra su cuenta de Salesforce y vaya a la configuración de ajustes en la parte superior derecha con el ícono de la herramienta.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfYwXRRQbtnbMe_rAb5RCUxo65koV8xqbUiVvYrbnAwslyALOyfEJCpPwum-CWVE6JY3p3eBHXePLngwqLro-Pde2f1xLKeF6A0Lp69IJzH0a4KKlqvEQuaLD7B8Upsw942HH0U?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

**Configuración de la aplicación**

Vaya a “Herramientas de la plataforma” y al apartado llamado “Gestión de aplicaciones” si está configurado en inglés o “Gestor de aplicaciones” en español

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcy1lOg41keIQSAKz8gA91uomPA4IhU_jp2OD-M6EEiASTWZqPJfwtIlDaTS0aHsXo3apcD7RzwDQg1bL_FITECrDaRPBT0JYNcueI2kYThDulQb7N3pq97B9J2Bg82y1oLf_mvGw?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

**Nueva aplicación**

Haga clic en "Crear nueva aplicación". Es muy importante que, si aparecen dos opciones para crearla, elijas "Nueva aplicación conectada" y luego "Crear una aplicación conectada".

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeI7opls9qQ3wjxWeS__anvtyLMdp5bCxjhp2gFi9xNmOn3sR8GiyRoB88LQ1EUdLOm9EiA3Qrtm7lMfhlJZDzOe7b7__DXQ7KPUrxOPpMRj8NKHzW1f8VTnjGk-IZ8d_VyIwgKfg?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfD3nhj7d6UQbYpXk1glvt16-h59s5hkhIfv0ZKv2jhMgN6gQzRC_Ktsm0tCXLT159taBq69wEGa3kkE7FiSNIIlZsIuV9eNApvzmQnTzAMNxPvq8gjkR3HbPzJuXzjiiu-ya-zFw?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

<br>

**Dapta URL**

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXct7dPI8D92RvjHudgmrLEduschuLLrhkbve167uXdUUEFTW3dm6yjkiUU4NlT1uuD4WviKpqjwUMHHhTKhoQm3c9bNlbAn0L3ZTQxxcaI2wB23iQqiFyMQKGXfFsvN5oZsjXT0?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

Una vez en esta pantalla, asegúrese de completar la información requerida de Dapta.

Para el nombre, puede usar cualquier nombre que le ayude a identificar la aplicación. Se recomienda algo como "Dapta conector". Para el correo electrónico, puede configurar uno propio para recibir correos electrónicos de Salesforce que detecten inconsistencias.

\
**Definición de permisos**

Una vez configurado, verifique los permisos necesarios. Para este tipo de integración, es fundamental configurar los permisos en "Acceso completo" para poder realizar operaciones de lectura y escritura a través de la API de Salesforce.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc7kAgT0wmwcsVEbC7nxIJnftEoZpQw0leRExAFFuWNsrjFqb7RRJznDpNQlcS-qAy5Ld7CxNWgOJD4vr_wAcKrB-HU1b6F32gxJukqQpGq5752q0SfqefBRiv4wZ5QMsPCDPH6?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcQVXgbxZIz7XczAQ90P1xFO4SPPyF0KvRMcVn5jmGHB0PaXFLmawpwUG_XH0cpRNgxGzsztPIo0AYd2xODsteNc8EStYT7pIf-b-3c6PvPdZbtlx1jdC1j1iTFg9TLbMUZr3Cw?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

También es importante verificar las opciones "Activar la configuración de OAuth" y "Requerir secreto" para la actualización del servidor web y del token. También se requiere la clave para "PKCE".

El último paso es verificar estas cuatro opciones:

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcc3CZKaTa5DWiihW4vXuPqTkNSKdYA0wzmWaE1stDG-J5_XfKuWixe7dGtUfkSOo9NJFymIzkt_gcLEAt6412DpaowGdx2jBmjNSn79bGIcCoe2SYnkekVS9fddRCh8UWKE8Sveg?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

Estas opciones son "Activar el flujo de credenciales del cliente", "Activar el flujo de autorización y credenciales", "Requerir credenciales de usuario en el cuerpo POST para el flujo de autorización y credenciales" y "Emitir token de acceso basado en tokens web JSON (JWT) para usuarios designados". Estas nos permitirán conexión mediante la API de Salesforce. Al guardar, se creará la aplicación.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc3z58Z1kxzpRHnupcoNxNPea62R3tjn-pmEuxMYXd-V-IvgD7sAYHfeDS68qJB8CqxmdQhYvHiVax5EEmYJ0NUwRh4RIZt0-ej06guON3AWHHDPbgEyy_BaXbQRD7MwSadePDZeA?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

**Ejecutar como usuario administrador**

Una vez creada la app puedes ir a la opción “Modificar” en las tres pestañas superiores e ir a la opción “Administrador de apps conectadas”

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc3z58Z1kxzpRHnupcoNxNPea62R3tjn-pmEuxMYXd-V-IvgD7sAYHfeDS68qJB8CqxmdQhYvHiVax5EEmYJ0NUwRh4RIZt0-ej06guON3AWHHDPbgEyy_BaXbQRD7MwSadePDZeA?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeU_S1xwu50AfD-FXEoxtxgOk3V9YRzwNqjph_CQCIS4qX9znsKvv_5l8Jr7YedVsbuxcplLyACN1hNFW_-6zdkd-B3RCeH5zQ__5X6dfMwUiL9NyYhSg7VLkzJGv9iUMKBzZpOKg?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

ESTO ES MUY IMPORTANTE. Asegúrese de marcar la opción "Ejecutar como" y de escribir su nombre de usuario. Esto no es muy intuitivo, pero debe escribir el nombre de usuario que aparece en su cuenta de Salesforce en la esquina superior derecha.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeQDX6Qe6o4cOzaAdaUYxCp1c7YdssH2U_ZBCNLbe4oeLZZfsYAkfEFfWu6Ozxe61Eq6tXkIxLT5BO7bVrJlQdWx37loE3ZXyI_wV6clFMyu3GzRVYzJvEm2cl2-l1rvcan7R5W?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

Asegúrese de escribirlo tal como aparece en la plataforma. Si no completa este paso, la conexión no funcionará.

Asegúrese de escribir también su nombre de usuario en la sección "Credenciales del cliente".

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXddK7cW3A5PlsCpU6gHZdyCQx0YfVXz9SfS6qxhq5ETbnecku-cjQF_rqhmtXTbAiX_I6TvpU_pacamrauU9JMRLeBMBqzoaIrGtTgCaFvVQNtRtjozITOU2frfC-QZUoZGIKoVyA?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

**Solicitar el token auth**

Una vez creada la aplicación, asegúrese de ir a “Administrar” y seleccionar la opción “Administrar” en “clave y secreto del consumidor”.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcgnbYKFsEMI91Gx-4lO0uSZAMAaoUuPtlR5_oFeJQ1BvhgnO1vnaIX6Tgr3gIuIG62fieoCvxaZno4f_sKRQl7wSUXISXDV6aWDj2iAntWpoi8sjz3wWKuYWRdos6n6uXcOYXKww?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

Esto le proporcionará la “clave del consumidor” y el “secreto del cliente”.

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfv91ctnT8w4hvf3oYPiiZFrA8ElT8Iipx3bxNT-cIxv4QqsJbd84JFDC7t28v6CiB6eDcAkOCvrrwnP355QRbSjEqnTd9HGj2lVxBbGVsQlFbZ3KRTejnR8nMhTHYLGO52E0at?key=-ACCrDuGgfHs9FB6bRCvHg)

**Realizar las solicitudes de API**

Una vez que tenga toda la información, puede proceder a completar las solicitudes a través de Dapta.

Lo primero que necesitará es un nodo de API personalizado con un método POST que solicite el token de Salesforce de esta manera.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcNf5V_ULytIO0UeoBR1V4viw_j3dS2Ylf17ZgGQCZIjFQNziG5I6lFwEIcIsV1TSSL9s9R-fe9yUKRQOV9qALkOqY2-EU2lpqZRDr3LVAgtcjyQfC-x544dWdGTwxA6bpnI3SI?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

Asegúrese de reemplazar “YOURCOMPANYDOMAIN” con el dominio real de su empresa y agregue el siguiente cuerpo que contendrá las credenciales que extrajo en los pasos anteriores.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXf7sB5T2-G2jD4ruTKO1ML4ft3mxGtHKPVBsiQBspD_B3OXfFbYWlxOex7BddhC0HmQAGB0XO5psJbUhhMUc_Rh2wCeRyOmm-ob-yVbO1_zWQ-vNqmznubzA5SnPdjSMlazUsKBfw?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

Este método de publicación generará un token con el que podrá realizar cualquier solicitud get o post agregándolo al encabezado como un token Bearer.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcy0NLsMwd7D2K3rwN7WkaK052Cd6gKOyhMoBKyINQVEuk1uaT2MIlZxb773ND9T7rJgvPYKjwmukllQu4vQ3kFIU5yYM9AWhwB5VGSrazMDCVKISfBaZwGB07KVrTVkWIZkFDB5w?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

**Recomendaciones**

La API de Salesforce le permite realizar consultas basadas en un formato SQL, por lo que si desea buscar información en particular, puede hacerlo configurando el siguiente cuerpo en el punto final ejemplificado anteriormente.

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdpUMhX6z9TZUGksOyuORb3mUtYp-Y_3jbq_rmvh3E8OAMm8xYfDa8cOqAByKGTqoqDFPqLaBl5X4vKiyAp6CvU_USja-n09AGf5Mael3cwIG_EJpaXExIYGa10SVR_vmvL-VIdZQ?key=-ACCrDuGgfHs9FB6bRCvHg)

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfqkkT5PmSoFwo00h-h40Aa9R4K7HC_BE_cnVtFYmxshKx1mOkUxJm-kD-3-HSXceNZTtzDZkXA8e74dgWZ_7N5UcTdZYSTO0RNs637CZwB4l10-LscFRvUoQmN85ZZNaP7CG4lUA?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

Si desea publicar información, ya sea actualizando objetos o creando nuevos, puede utilizar los métodos PATCH y POST habituales con la estructura de información que tenga en su CRM.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfgPLpzFacT6NbGGzqBNJGs4-8w8grtYw38RnJkZbkcLb-moxCp_qnF15MrCfO8w3UuSaxVZg4FcSBX6OZO93ZwBMo7CTRZlCzO26AqwVQ8pO_SKpvcqQ6QdOuL5CBYKEkoQeTE1g?key=-ACCrDuGgfHs9FB6bRCvHg" alt=""><figcaption></figcaption></figure>

<br>


---

# Agent Instructions: 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:

```
GET https://docs.dapta.ai/dapta-docs-es/integraciones/salesforce.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
