Magento Integration


This integration document will guide you through the steps to integrate Odicci with Magento 2.0 onwards. We call upon the API in order to generate vouchers on the fly; using pre-defined cart price rules already set up in the admin of your Magento site. By using this integration, you can feed vouchers directly from the Magento e-commerce platform without having to pre-generate voucher codes and upload them into the Odicci platform. In order to get the best out of the Odicci platform we recommend integrating with Magento. However if your experiences do not use vouchers via the API, you do not need the API connection to publish your experiences.

With this integration, we DO NOT access the core site. 

How to Integrate?

Step 1 - Create your API Key

Within the Magento admin, navigate to Settings > Extensions > Integrations.

Click add a new integration. Enter a name for the integration, and enter the password you use to login.

Press “API” and set the resource access to “Custom”.

Make sure to check the box for:

1. Sales > Operations > Orders > Actions > View

Make sure to check the box for:

1. Products > Inventory > Catalog

2. Products > Inventory > Categories

Make sure to check the box for:

1. Marketing > Promotions > Catalog Price Rule

2. Marketing > Promotions > Cart Price Rule

Make sure to check the box for:

1. Reports > Sales > Orders

2. Reports > Sales > Coupons

Press “Save”, then you will see the new integration added to the list. Press “Activate”.

Approve the API access by pressing “Allow”.

You will then see the credentials to use for the integration within the Odicci platform. Press “Done”.

You should see it is authorised and active.

To see the credentials again, press the Pen symbol next to the integration you have set up and the details will be under the password insert section.

Step 2 - Activate your Magento Integration

In your Odicci account click on the icon in the top right corner and select settings. Within settings navigate to “Integrations”, scroll to Magento and click on ADD.

Make sure you have your Magento: Store URL, Consumer Key, Consumer Secret, Access Token, and Access Token Secret at hand; and copy / paste it to activate the integration.

If the API key is valid you will automatically you will see a success message.

Step 3 - Activate Voucher API in Odicci Platform

In your Odicci experience you can now set up prizes as vouchers via the API. Go to the prizes section.

Make sure the prize type is set to “Voucher“, and the voucher source is set to “Voucher API“. Set the amount of prizes are available. Make sure the Voucher API is set to Magento API. The cart rules set up in the Magento admin will automatically appear in the list. Select the appropriate rule for the prize and then press save.

Step 4 - Test Integration

In the studio, when editing success frames, make sure to either add “Voucher Codes” from the static components in the right hand panel. This will automatically add the dynamic merge tag %%voucher%% to ensure that it is populated when an end user wins a prize.

Play through the experience, and check the merge tag is populated with a voucher code.

Copy and paste the voucher into the cart with an item present and apply the discount.