To set up the integration, you need to complete several settings in amoCRM.
In Passquare settings, set the starting wallet card number. This number must be greater than the numbers of cards already created in the CRM.
- Open a contact card, go to card settings, and add these fields:
- Issue card (field type: checkbox);
- Card link (field type: text, API only);
- Card number (field type: text, API only);
- Push message (field type: text, if you plan to send personal push messages to customers);
- Any other fields you want to show on cards, for example balance, bonus, discount, delivery date, or others.
- Write down the IDs of all fields you will show on wallet cards, plus the IDs of Issue card, Card link, Card number, Push message, and Phone number.
To get the IDs of the Phone number and Email fields, contact amoCRM support. You can view other field IDs as follows: open a contact card, go to card settings, open the field you need, and copy the ID.
Example of the list you should have:
- Phone number 960067
- Issue card 1015819
- Card link 1015811
- Card number 1015813
- Push message 1015851
- Balance 960025
- Bonus 960045
- Discount 960065
- Delivery date 1015853
- Go to amoMarket. In the upper-right corner, click Web Hooks, then add a hook.
In the Specify URL… field, enter:
https://core.passquare.com/api/v2/amocrm/webhook/Passquare_public_key
Copy the public key from your Passquare account under Settings → API and insert it into the URL. In the All drop-down list, select Contact added and Contact changed. Save the settings.
- Open your Passquare account and go to Integration. If a demo period is active, end it.
Click the CRM system field, select amoCRM, then click Install integration. In the window that opens, choose your amoCRM account and click Allow.
- Fill in Additional parameters.
Use the list from step 2:
{ "data": { "phone": "amoCRM_phone_field_id", "sync": "amoCRM_issue_card_field_id" }, "card": { "number": "amoCRM_card_number_field_id", "link": "amoCRM_card_link_field_id" }, "variables": { "push": "amoCRM_push_message_field_id", "balance":"amoCRM_balance_field_id", "bonus":"amoCRM_bonus_field_id", "discount":"amoCRM_discount_field_id", "deliverydate": "amoCRM_delivery_date_field_id" }, "formUrl": "Passquare_new_card_registration_form_URL/" }
If you add your own fields, such as delivery date, create matching variables in Passquare under Settings → Variables, for example `deliverydate`. You can copy the card registration URL in Passquare under Card issuance → Edit form → Installation → Form URL.
Click Save, then turn the integration on.
If you already have issued cards in your Passquare account, go to Customers and, in the lower-right corner, click Write to CRM.
Integration details
- Bonus accrual and redemption, and discounts, are configured and processed in your amoCRM system.
- The wallet card is synced with the amoCRM contact card.
- For correct sync with amoCRM, contact cards and phone numbers must be unique. Merge or delete duplicates in amoCRM if needed.
- To issue cards from amoCRM, automatically update card data when amoCRM changes, and send push messages from amoCRM, your amoCRM plan must be Advanced or higher.
- If you issue cards from amoCRM, you need an SMS service to send customers the card install link automatically.
- After a card is issued, the customer and card usually appear in amoCRM within a few minutes to a few hours. The maximum delay is 24 hours. Timing depends on system load and the update queue.
- When customer data changes in amoCRM, Passquare and the customer card update within a few minutes to a few hours. The maximum delay is 24 hours. Timing depends on system load and the update queue.