Demander integration with Cayena
Cayena calls the Demander API. Demander does not send data to Cayena on its own.
Cayena is a marketplace. The Cayena account and support stay with Cayena. Demander is not a Cayena product.
How the integration works
Section titled “How the integration works”Each company has one configuration. It holds the token, the order vendor, the catalog price list, and the status and unit mapping.
- Cayena authenticates with the company code and the token generated in Demander.
- It reads the active products, the prices on the configured list and, when lot expiration is configured, the expiration date.
- It looks up or creates the customer by CPF or CNPJ.
- It sends the order. The same Cayena number does not create a second order.
- It reads the status and, once the ERP stores the key, the NF-e.
The order is created with origin Cayena, on the vendor and initial status from the configuration. Status changes and the invoice follow the normal Demander flow, usually through the ERP integration.
What each side does
Section titled “What each side does”| Who | Responsibility |
|---|---|
| Cayena | Authenticate, read the catalog, send customer and order, read status and NF-e |
| Demander | Validate the call, store customer and order, return catalog, status and NF-e key |
| Company ERP | Update the order status and send the invoice through table 170 — Order invoice, with chaveNfe and serieNfe |
This API is not the REST Integration API. The address, the token and the format are different.
Before you turn it on
Section titled “Before you turn it on”- An active vendor, with a free number range for Cayena orders.
- A price list with the products Cayena may sell. A zero price, or a price only for one customer, does not enter the catalog.
- The unit mapping is optional. Without it, the catalog sends the product unit acronym.
- Initial status with
orderStatusCONFIRMED, and at least one delivery status. - An NF-e key with 44 digits on the order invoice, so Cayena can read the invoice.
The screenshots in this documentation are from company 5000 — Empresa de testes time de produto.