Credit Line Requests Guide
This guide explains how to manage credit line requests in the Envia Admin platform, from initial review through DocuSign contract creation and signing.
Access
Navigate to Contabilidad → Solicitudes de Crédito.
You need the credit-line-requests permission to view requests, and credit-line-requests-manage to update request details, upload files, and (note countries) upload the note format.
To approve/reject documents and validate the signed note, you need the credit-line-requests-review-documents permission.
To create DocuSign contracts, you additionally need the credit-line-requests-create-docusign-contract permission.
Workflow Overview
Client submits credit ticket
↓
Request created automatically (pending_commercial)
Slack `creditTicketCreated` (title/intro differ for new vs modification)
↓
Commercial team reviews → Approve or Reject
↓
[pending_finance] Finance team authorizes (or Reject)
↓
[document_review] Documents reviewed by legal team
↓
All documents approved
↓
┌─────────────────────────────────────────────┐
│ Note countries (e.g. Mexico): promissory note │
│ Legal uploads note format (note_sent) │
│ Client signs & uploads (note_review) │
│ Legal validates (note_validated) │
└─────────────────────────────────────────────┘
↓
Admin creates DocuSign contract (contract_sent)
↓
Both parties sign in DocuSign
↓
Webhook applies first credit line (CR) → status active
↓
[active] (or legal_review if CR cannot be applied automatically)Note countries (Mexico)
The promissory note step shown in the box above only applies to new credit in countries with a configured note form (currently Mexico). Modifications skip the note entirely: once all documents are approved, the next step is Create Contract in DocuSign.
If a document is rejected during legal review, the request moves to document_rejected and the client is asked to re-upload it. The client resubmit returns the request to document_review (the document stays pending until legal re-approves it). Once all required documents are approved again, note / Create Contract actions reappear.
Automatic expiration of pending requests
Requests that remain in pending_commercial for more than 30 days are automatically rejected by a daily system job (runs at 06:00 UTC). The linked ticket is set to Declined and a localized message is inserted as a visible comment. The rejected_by field is set to the system user (0) so these can be distinguished from manual rejections. If the client wishes to restart the process, a new credit line request must be submitted.
Reviewing a Request
- Open Contabilidad → Solicitudes de Crédito
- Use the filters to find requests by status, company, contract status, request type (new credit vs modification), or date range
- Click Ver info on any row to open the detail panel
The detail panel shows:
- The ticket on the right (with full ticket history)
- Request info on the left: request type badge (new credit vs modification) first, then requester, amounts, and status
- The document checklist below
SLA Indicator
The SLA column shows how many days have elapsed since the request was created:
- Green: On time
- Yellow: Delayed
- Red: Overdue
Approving or Rejecting a Request
In the detail panel, under Request Info:
Commercial approval
- Review the requested amount and term
- If approving: set the approved amount, approved days, and a credit line type, then approve → status becomes
pending_finance(resolved_by/resolved_atrecord the commercial approver) - If rejecting: select
rejectedand provide a mandatory rejection reason (rejected_by/rejected_at)
On a new credit, the pencil saves each field immediately (PATCH /details). On a modification, there is still one row per field with a pencil, but values stay in the UI until commercial approve (then approved_* are written). Approving a modification also copies the KYC/KYB variable map from a prior request. If amount, days, and billing cycle all match the company's current line, approval is blocked until at least one value changes.
Finance approval
When the request is in pending_finance, finance authorizes → status becomes document_review (finance_approved_by / finance_approved_at), or rejects → rejected with reason.
Base access (always required to use the finance approve action)
All of the following must be true for the authenticated admin:
| Requirement | Detail |
|---|---|
| Permission | credit-line-requests-manage |
| Permission | manage-credits-line (legacy credit-line manage) |
| Role | One of: Super Admin (1), Admin (2), or Finances (7) |
Authorization by approved days
On top of the base access, authorization depends on approved_days:
| Condition | Extra rule |
|---|---|
approved_days ≥ 45 | User must also have permission approve-long-credit-line. Country finance-reviewer map is not checked. |
approved_days < 45 | User email must be in the finance reviewers assigned to the company country (see table below). approve-long-credit-line is not required. |
If the UI shows a long-credit warning, the user is missing approve-long-credit-line for a ≥ 45-day request.
Finance reviewers by region (production / stage)
Reviewers are configured in CREDIT_LINE_REQUEST_FINANCE_GROUPS / CREDIT_LINE_REQUEST_FINANCE_COUNTRY_MAP (backend constants; mirrored on the frontend for UI gating). Non-productive environments redirect notifications/authorization checks to the localhost test reviewer.
| Region | Countries | Finance reviewers (email) |
|---|---|---|
| North America | MX, US, CA | cristobal.juarez@envia.com, gustavo.vazquez@envia.com |
| Europe | ES, IT, FR | ernesto.loya@envia.com, gustavo.vazquez@envia.com |
| India | IN | gustavo.vazquez@envia.com |
| Latam | CO, CL, AR, GT, BR | helver.montanez@envia.com, gustavo.vazquez@envia.com |
| Default (unmapped country) | — | gustavo.vazquez@envia.com |
TIP
After commercial approval, Slack notifies the finance reviewers for that country. After finance approval, Slack notifies the legal executive assigned to the ticket. In both messages the header and intro distinguish new credit (Credit line request #…) from a modification (Credit line modification #…); field blocks stay the same.
WARNING
Rejecting a request sends a notification to the client. Make sure the rejection reason is clear and professional.
Reviewing Documents
Under the Documents accordion in the detail panel:
For each document row:
- File documents: click Ver archivo to preview the uploaded file
- Data field documents: the submitted value is shown inline
To approve a document: click the ✓ icon → confirm in the dialog.
To reject a document: click the ✗ icon → enter a mandatory rejection reason → confirm.
Approve and reject are only available when the document has a value. Empty rows (for example KYC/KYB fields copied on commercial approve of a modification, or additional fields still waiting for an upload) stay pending until legal fills them. Bulk approve/reject also skips those empty rows.
To act on all documents that already have a value at once, use the Bulk Approve or Bulk Reject button at the top of the documents section.
TIP
Once all required documents are approved and the request is in document_review status, the next action becomes available: in note countries (Mexico) this is the Upload note format panel; in other countries it is the Create Contract button.
Promissory Note — Mexico / Note Countries
Note countries only
This section applies only to countries with a configured note form (currently Mexico). If the request is for another country, skip straight to Creating a DocuSign Contract.
When all required documents are approved on a note-country request, a note sub-flow appears in the detail panel. It has three stages:
1. Upload the note format
You need the credit-line-requests-manage permission.
- In the detail panel, an Upload note format panel appears (PDF/DOC/DOCX, max 10 MB)
- Select the note format file and click Upload
- Confirm in the dialog
The system stores the format, moves the request to note_sent, and posts a comment to the client's ticket with the signing instructions, including:
- The note must be printed on security paper (papel seguridad)
- It must be signed by hand in blue ink
- No scratches, stains, folds, or alterations
- The original must be mailed to the legal office (Departamento Legal – Paula Helguera) in Monterrey, Nuevo León
- A copy must also be uploaded to the platform for prior validation
2. Client uploads the signed note
The client downloads the format, signs it, and uploads a copy through their portal. This moves the request to note_review. While waiting, the admin panel shows a waiting notice and a link to download the format that was sent.
3. Validate the signed note
You need the credit-line-requests-review-documents permission.
- When the request is in
note_review, the panel shows a View signed link and Validate / Reject buttons - Review the uploaded signed copy
- Click Validate to approve → the request moves to
note_validatedand the Create Contract action becomes available - Click Reject to send it back → the uploaded copy is deleted and the request returns to
note_sentso the client can upload a corrected copy
TIP
For note countries, the Create Contract button only appears once the signed note has been validated (note_validated).
Creating a DocuSign Contract
- Confirm the request is in
document_reviewstatus (ornote_validatedfor note countries) and all required documents are approved - Click Create Contract (visible when preconditions are met). If there is no active DocuSign template for that country, person type, and request type (
newormodification), a warning is shown instead of the button. - Confirm in the dialog
The system will:
- Resolve the correct DocuSign template for the company's country, person type (kyb/kyc), and request type (
new) - Create an envelope in DocuSign and send it to the client for signature
- Update
contract_statustosentand request status tocontract_sent
The client receives a DocuSign email with the contract to sign electronically.
Modifications
For a modification, Create Contract uses the same button and POST /credit-line-requests/{id}/contract. The controller calls createModificationContract, which uses the modification DocuSign template for that country and person type. Dynamic client tabs come from credit_line_request_variable_values (same mapper as new credit). Fixed client tabs (same for KYB and KYC) include today's signature date, the company's current credit line, the date the current line was applied, and the newly approved amount, days, and billing cycle. Current and new amount tabs are formatted with the client's local currency and symbol. New credit is unchanged and also filters templates by request_type = new.
INFO
If no active DocuSign template is configured for the company's locale and person type, the button will fail with an error. Contact your administrator to add a template via Legal → Contratos DocuSign.
Contract Signed (Automatic)
When both parties complete signing in DocuSign:
- DocuSign sends a webhook to the platform
contract_statusis updated tosigned- The signed PDF is downloaded from DocuSign and stored
- The webhook loads the request from the envelope and follows
request_type:- New credit: first credit line (CR) is applied automatically when possible; otherwise the request moves to
legal_review - Modification: the current line is updated automatically (history event MD, surcharge is the difference vs the current limit). If the company has no current line, the request moves to
legal_review
- New credit: first credit line (CR) is applied automatically when possible; otherwise the request moves to
- A system comment is added to the linked ticket in the company's language
No manual activation step is required on the happy path.
Downloading the Signed Contract
Once contract_status = signed, use the Download Signed Contract button in the detail panel to download the signed PDF.
If the download fails (e.g. the PDF was not persisted automatically), use Sync Signed Contract to re-fetch it from DocuSign.
Exporting the List
Click Export CSV in the top-right of the requests table to download a CSV of the current filtered view. Large exports are streamed progressively.
Managing DocuSign Contract Configurations
Navigate to Legal → Contratos DocuSign to manage which DocuSign template is used per country, person type, and request type (new credit vs modification).
Adding a New Configuration
- Click Nuevo Contrato
- Fill in:
- Name: a descriptive name (e.g. "Credit Line MX — Business")
- DocuSign Template ID: the Template ID from your DocuSign account (Templates section)
- Country: select the locale
- Person Type:
KYB(business) orKYC(individual) - Request Type:
Nuevo créditoorModificación - Active: toggle on to make it available for contract creation
- Save
WARNING
Only one active configuration is allowed per country + person type + request type combination. You can keep one active new-credit template and one active modification template for the same country and person type. Activating a second one of the same type will fail with a conflict error. Deactivate the existing one first.
Editing a Configuration
Click the edit icon on any row. You can update the Template ID, name, or active status.
Frequently Asked Questions
Why can't I create a contract even though the request is approved?
Check that:
- All required documents have
approvedstatus (not just uploaded) - An active DocuSign configuration exists for the company's country, person type, and request type (
newfor first-time credit) - No envelope has already been sent (
contract_status = no_contract)
The webhook didn't fire — the contract is signed in DocuSign but status is still sent.
Use the Sync Signed Contract button to manually re-download the signed PDF and update the status.
The client says they didn't receive the DocuSign email.
Check the DocuSign account's envelope history. The platform only creates the envelope — email delivery is handled by DocuSign. Verify the client's email in the ticket.
Why don't I see the note / pagaré step?
The note step only appears for new credit in countries with a configured note form (currently Mexico). It does not appear for modifications — those go from approved documents straight to Create Contract. For other countries the flow is the same. Also confirm all required documents are approved — the upload panel only shows in document_review once they are.
I validated the signed note but the Create Contract button still doesn't appear.
Check that:
- The request reached
note_validated(the note was approved, not rejected) - No DocuSign envelope already exists (
contract_status = no_contract) - You have the
credit-line-requests-create-docusign-contractpermission
I rejected the signed note by mistake — how does the client fix it?
Rejecting deletes the uploaded copy and returns the request to note_sent. The client simply uploads a new signed copy from their portal, which moves the request back to note_review for validation. No data is lost beyond the rejected file.
